Skip to content
New issue

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

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

Already on GitHub? # to your account

Test for the specific proc_macro_span API expected by proc-macro2 #429

Merged
merged 1 commit into from
Dec 31, 2023

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Dec 31, 2023

This prevents the disruptive failure mode from #398 with projects using old pinned versions of crates against newer versions of Rust nightly compiler.

The anyhow and thiserror build script have been using this approach for over 4 years, and while there were issues to iron out with the build script logic, with build systems (Cargo, Nix, rustc bootstrap), IDEs (rust-analyzer, IntelliJ, RustRover), and other tools (cargo-expand, sccache), at this point the approach is reliable enough to deploy in proc-macro2.

The only known outstanding issue is RustRover spurious rebuilds when running unit tests through RustRover's test tool window, which has a fix in progress. https://youtrack.jetbrains.com/issue/RUST-13133

@dtolnay dtolnay merged commit 3db1977 into master Dec 31, 2023
@dtolnay dtolnay deleted the probe branch December 31, 2023 01:35
Repository owner locked and limited conversation to collaborators Mar 26, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant