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

Cfg missing during build script build #440

Closed
dtolnay opened this issue Oct 19, 2019 · 4 comments · Fixed by #534
Closed

Cfg missing during build script build #440

dtolnay opened this issue Oct 19, 2019 · 4 comments · Fixed by #534
Labels
C-build-failure Category: This is a crate that failed to build

Comments

@dtolnay
Copy link
Member

dtolnay commented Oct 19, 2019

Crate name: proc-macro2
Old working build: https://docs.rs/crate/proc-macro2/1.0.4/builds/186665
Build failure link: https://docs.rs/crate/proc-macro2/1.0.6/builds/192719

Additional details:
With the switch to rustwide, it seems that --cfg entries from our [package.metadata.docs.rs] are no longer seen by our build script (but still present when building the crate), which causes the build to fail.

Notice how in the working 1.0.4 build the rustc invocation that builds build.rs has --cfg procmacro2_semver_exempt. From tracing through the types in the failing 1.0.6 build, I believe that failure could only happen if --cfg procmacro2_semver_exempt is set for the lib.rs rustc invocation but not for the build.rs rustc invocation.

Relevant part of Cargo.toml: https://github.com/alexcrichton/proc-macro2/blob/1.0.6/Cargo.toml#L18-L20

Diff between working build current failing build: dtolnay/proc-macro2@1.0.4...1.0.6
(no relevant changes on our end).

@dtolnay dtolnay added the C-build-failure Category: This is a crate that failed to build label Oct 19, 2019
@dtolnay
Copy link
Member Author

dtolnay commented Oct 26, 2019

FYI @pietroalbini -- this was causing the failure you saw in #23 (comment).

@jyn514
Copy link
Member

jyn514 commented Dec 7, 2019

@dtolnay it looks like this error started occurring after the switch to rustwide (#407). It's probably due to rust-lang/cargo#4423 - as you can see in the build logs --target is set in the latest (broken) build, but not in the old one.

@elichai
Copy link

elichai commented Dec 19, 2019

@dtolnay I don't think this is an issue with docs.rs.
dtolnay/proc-macro2#207

@jyn514
Copy link
Member

jyn514 commented Jan 7, 2020

This was fixed in #491, 1.0.7 is live: https://docs.rs/crate/proc-macro2/1.0.7

@jyn514 jyn514 closed this as completed Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-build-failure Category: This is a crate that failed to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants