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

It could be much easier for static analyzers to understand indexmap if the has_std is not generated by the build script #184

Closed
architect-z opened this issue Apr 20, 2021 · 2 comments · Fixed by #267

Comments

@architect-z
Copy link

Instead we can just use features.

FYI: intellij-rust/intellij-rust#4631

@bluss
Copy link
Member

bluss commented Apr 20, 2021

The build script feature flag has unfortunately been a headache, but it was made that way to avoid breaking changes in the 1.x release series. You can now use the explicit std feature since 1.5.2 (but there is no explicit way to say "no std").

@mike-kfed
Copy link

Seems like the build.rs is gone in master - yay, rooting for a new release :)
I just ran into this issue. Indexmap 1.9.1 is a deep dependency and our CI failed when using rustc flags that ensure our code-quality requirements. If you want to see what I mean, run this cargo new test && cd test && cargo add dicom && RUSTFLAGS="-D missing_docs" cargo build produces a documentation unrelated compiler error because of build.rs. Switching to normal Cargo.toml features, i.e. master branch, fixes the problem.
Somehow the missing_docs makes the build.rs believe std is not available... (I guess because the indexmap crate itself doesn't build with that flag)
Anyways workaround for other CI users export CARGO_FEATURE_STD="std", helps others hopefully.

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 a pull request may close this issue.

3 participants