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

Opt-out of duplicate check #99

Open
oberrich opened this issue Sep 1, 2024 · 0 comments
Open

Opt-out of duplicate check #99

oberrich opened this issue Sep 1, 2024 · 0 comments

Comments

@oberrich
Copy link

oberrich commented Sep 1, 2024

Based on the discussion in #3, it seems that when you declare a distributed_slice within a library it automatically gets prefixed with the crate's name, thus the duplicate check shouldn't be necessary.
It appears however that the inclusion of multiple semvers of the crate can result in duplicate declarations.

Unfortunately, the duplicate check has two unwanted consequences: an extra .linkm2_ section as well as a potential panic!.
I tried adding println!("cargo:rustc-link-arg-bins=/MERGE:.linkme_=.data,.linkm2_=.rdata") to the build.rs script in an attempt to get rid of the section(s), but that didn't seem to have any effect.

It would be helpful to have a feature flag, like no_dupcheck, to conditionally opt-out of the duplicate checks introduced in #53 when creating a release build.

Also, is there any way to prevent multiple semvers from causing duplicate slices in the first place?

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

No branches or pull requests

1 participant