Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude #[state_version] doc-test #2132

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

chipshort
Copy link
Collaborator

Not sure if this is specific to M1 ARM, but for me it causes this error:

---- packages/derive/src/lib.rs - entry_point (line 101) stdout ----
LLVM ERROR: Global variable '_ZN8rust_out4main46_doctest_main_packages_derive_src_lib_rs_101_018__CW_STATE_VERSION17hc5f83b3b1105f862E' has an invalid section specifier 'cw_state_version': mach-o section specifier requires a segment and section separated by a comma.
Couldn't compile the test.

Since we only expect it to work correctly on wasm anyways, I just disabled it.

@chipshort chipshort requested a review from aumetra April 26, 2024 09:45
@aumetra
Copy link
Member

aumetra commented Apr 26, 2024

mach-o section specifier

Yeah, this seems to be MacOS-specific. Other platforms use either ELF or PE/PE32+ nowadays.
Excluding this seems fine.

@chipshort chipshort merged commit 7d067a1 into main Apr 26, 2024
30 checks passed
@chipshort chipshort deleted the chipshort/exclude-state-version-test branch April 26, 2024 10:10
@aumetra
Copy link
Member

aumetra commented Apr 26, 2024

@chipshort by the way, how does this impact running unit tests of contracts on MacOS? Does it also break that?

Because if it also breaks that, we either need to find a way to exclude that if we compile to Mac targets, or we have to change the section name so LLVM works

@chipshort
Copy link
Collaborator Author

Good catch! If I add it to the burner contract, it does indeed break cargo test for me there.
I'll try guarding it with #[cfg(target_arch = "wasm32")]. That should in theory solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants