-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Migrate build-rs to the Cargo repo #14786
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
[package] | ||
name = "build-rs" | ||
version = "0.2.0" | ||
rust-version.workspace = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to call out that this MSRV seems way too high for this crate.
We may want to lower this in the future.
be583bc
to
d7e0567
Compare
The "6 months" it uses differs from dtolnay/rust-toolchain. Hopefully this means it will make update PRs at the right time.
FYI I didn't see this had been created already and build-rs-test-lib is just a package that hosts a buildscript that can smoke test invoking the API in a build script context; I don't think it should need anything special. The changes from v0.1 to v0.2 are a simplification of implementation, removal of the glob reexports, and basic integration of how the crate can do whatever version smoothing is considered desirable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One relevant comment on API stability of the API for unstable cfg directives, and the rest is mostly just me boggling at code I wrote weirdly while transcribing my understanding of the buildscript protocol into code, and don't need to be addressed here.
Plus my explicit public 👍 to making build-rs an intentionally produced cargo artifact.
@@ -0,0 +1,2 @@ | |||
> This crate is maintained by the Cargo team for use by the wider | |||
> ecosystem. This crate follows semver compatibility for its APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to explicitly exempt the unstable
feature here, and/or migrate it to using a cfg (like procmacro2_semver_exempt
) instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption is that its fine as that feature is documented as unstable. I'm not even sure why that line is encouraged in the policy. Pretty much every lib is assumed to follow semver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Some areas may need to polish, but as Ed said we should defer them to separate PRs.
Since the FCP was completed. Going to merge this now. @bors r+ |
@weihanglo: 🔑 Insufficient privileges: Not in reviewers |
Update cargo 15 commits in 4a2d8dc636445b276288543882e076f254b3ae95..69e595908e2c420e7f0d1be34e6c5b984c8cfb84 2024-11-09 19:10:33 +0000 to 2024-11-16 01:26:11 +0000 - refactor(fingerprint): Track the intent for each use of `UnitHash` (rust-lang/cargo#14826) - fix(toml): Update frontmatter parser for RFC 3503 (rust-lang/cargo#14792) - docs(unstable): Move -Zwarnings from stable to unstable section (rust-lang/cargo#14827) - Simplify English used in guide (rust-lang/cargo#14825) - feat(resolver): Stabilize resolver v3 (rust-lang/cargo#14754) - docs: Clean up doc comments (rust-lang/cargo#14823) - fix(remove): On error, suggest other dependencies (rust-lang/cargo#14818) - Always include Cargo.lock in published crates (rust-lang/cargo#14815) - fix(build-rs)!: Updates from an audit (rust-lang/cargo#14817) - feat(rustdoc): diplay env vars in extra verbose mode (rust-lang/cargo#14812) - Migrate build-rs to the Cargo repo (rust-lang/cargo#14786) - chore(ci): Check for clippy `correctness` (rust-lang/cargo#14796) - git: do not validate submodules of fresh checkouts (rust-lang/cargo#14605) - refactor: clone-on-write when needed for InternedString (rust-lang/cargo#14808) - fix(docs): typo in cargo-fmt.md (rust-lang/cargo#14805)
Update cargo 15 commits in 4a2d8dc636445b276288543882e076f254b3ae95..69e595908e2c420e7f0d1be34e6c5b984c8cfb84 2024-11-09 19:10:33 +0000 to 2024-11-16 01:26:11 +0000 - refactor(fingerprint): Track the intent for each use of `UnitHash` (rust-lang/cargo#14826) - fix(toml): Update frontmatter parser for RFC 3503 (rust-lang/cargo#14792) - docs(unstable): Move -Zwarnings from stable to unstable section (rust-lang/cargo#14827) - Simplify English used in guide (rust-lang/cargo#14825) - feat(resolver): Stabilize resolver v3 (rust-lang/cargo#14754) - docs: Clean up doc comments (rust-lang/cargo#14823) - fix(remove): On error, suggest other dependencies (rust-lang/cargo#14818) - Always include Cargo.lock in published crates (rust-lang/cargo#14815) - fix(build-rs)!: Updates from an audit (rust-lang/cargo#14817) - feat(rustdoc): diplay env vars in extra verbose mode (rust-lang/cargo#14812) - Migrate build-rs to the Cargo repo (rust-lang/cargo#14786) - chore(ci): Check for clippy `correctness` (rust-lang/cargo#14796) - git: do not validate submodules of fresh checkouts (rust-lang/cargo#14605) - refactor: clone-on-write when needed for InternedString (rust-lang/cargo#14808) - fix(docs): typo in cargo-fmt.md (rust-lang/cargo#14805)
Update cargo 15 commits in 4a2d8dc636445b276288543882e076f254b3ae95..69e595908e2c420e7f0d1be34e6c5b984c8cfb84 2024-11-09 19:10:33 +0000 to 2024-11-16 01:26:11 +0000 - refactor(fingerprint): Track the intent for each use of `UnitHash` (rust-lang/cargo#14826) - fix(toml): Update frontmatter parser for RFC 3503 (rust-lang/cargo#14792) - docs(unstable): Move -Zwarnings from stable to unstable section (rust-lang/cargo#14827) - Simplify English used in guide (rust-lang/cargo#14825) - feat(resolver): Stabilize resolver v3 (rust-lang/cargo#14754) - docs: Clean up doc comments (rust-lang/cargo#14823) - fix(remove): On error, suggest other dependencies (rust-lang/cargo#14818) - Always include Cargo.lock in published crates (rust-lang/cargo#14815) - fix(build-rs)!: Updates from an audit (rust-lang/cargo#14817) - feat(rustdoc): diplay env vars in extra verbose mode (rust-lang/cargo#14812) - Migrate build-rs to the Cargo repo (rust-lang/cargo#14786) - chore(ci): Check for clippy `correctness` (rust-lang/cargo#14796) - git: do not validate submodules of fresh checkouts (rust-lang/cargo#14605) - refactor: clone-on-write when needed for InternedString (rust-lang/cargo#14808) - fix(docs): typo in cargo-fmt.md (rust-lang/cargo#14805)
What does this PR try to resolve?
Fixes #12432
How should we test and review this PR?
This pulls in https://github.com/cad97/build-rs at eb389d1 with the following changes:
Cargo.toml
metadata.github
,.gitignore
,Cargo.lock
We'll need to integrate
test-lib
into our processes but that seemed more invasive, so I wanted to leave that for a future PR.Additional information
Infra changes are being coordinated in https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Transfering.20.60build-rs.60.20crate.20to.20rust-lang/near/480779960
Context: per Cargo's charter, we approved this transfer in an FCP.