-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Account for version number in NtIdent hack #76331
Conversation
Issue rust-lang#74616 tracks a backwards-compatibility hack for certain macros. This has is implemented by hard-coding the filenames and macro names of certain code that we want to continue to compile. However, the initial implementation of the hack was based on the directory structure when building the crate from its repository (e.g. `js-sys/src/lib.rs`). When the crate is build as a dependency, it will include a version number from the clone from the cargo registry (e.g. `js-sys-0.3.17/src/lib.rs`), which would fail the check. This commit modifies the backwards-compatibility hack to check that desired crate name (`js-sys` or `time-macros-impl`) is a prefix of the proper part of the path. See rust-lang#76070 (comment) for more details.
(rust_highfive has picked a reviewer for you, use r? to override) |
The fact that we only noticed this after the beta crater runs seems like a good sign - if this was causing a significant amount of breakage in practice, I would have expected a crate author to have opened an issue by now. However, I still think we should beta-backport this, since this PR just fixes what PR #73084 was supposed to do in the first place. |
@bors r+ |
📌 Commit 9e7ef65 has been approved by |
…t, r=petrochenkov Account for version number in NtIdent hack Issue rust-lang#74616 tracks a backwards-compatibility hack for certain macros. This has is implemented by hard-coding the filenames and macro names of certain code that we want to continue to compile. However, the initial implementation of the hack was based on the directory structure when building the crate from its repository (e.g. `js-sys/src/lib.rs`). When the crate is build as a dependency, it will include a version number from the clone from the cargo registry (e.g. `js-sys-0.3.17/src/lib.rs`), which would fail the check. This commit modifies the backwards-compatibility hack to check that desired crate name (`js-sys` or `time-macros-impl`) is a prefix of the proper part of the path. See rust-lang#76070 (comment) for more details.
…t, r=petrochenkov Account for version number in NtIdent hack Issue rust-lang#74616 tracks a backwards-compatibility hack for certain macros. This has is implemented by hard-coding the filenames and macro names of certain code that we want to continue to compile. However, the initial implementation of the hack was based on the directory structure when building the crate from its repository (e.g. `js-sys/src/lib.rs`). When the crate is build as a dependency, it will include a version number from the clone from the cargo registry (e.g. `js-sys-0.3.17/src/lib.rs`), which would fail the check. This commit modifies the backwards-compatibility hack to check that desired crate name (`js-sys` or `time-macros-impl`) is a prefix of the proper part of the path. See rust-lang#76070 (comment) for more details.
☀️ Test successful - checks-actions, checks-azure |
…ulacrum [beta] backports * Ignore rustc_private items from std docs rust-lang#76571 * Fix HashMap visualizers in Visual Studio (Code) rust-lang#76389 * Account for version number in NtIdent hack rust-lang#76331 * Account for async functions when suggesting new named lifetime rust-lang#75867 * Fix loading pretty-printers in rust-lldb script rust-lang#76015 This also bumps to the released stable compiler.
Issue #74616 tracks a backwards-compatibility hack for certain macros.
This has is implemented by hard-coding the filenames and macro names of
certain code that we want to continue to compile.
However, the initial implementation of the hack was based on the
directory structure when building the crate from its repository (e.g.
js-sys/src/lib.rs
). When the crate is build as a dependency, it willinclude a version number from the clone from the cargo registry (e.g.
js-sys-0.3.17/src/lib.rs
), which would fail the check.This commit modifies the backwards-compatibility hack to check that
desired crate name (
js-sys
ortime-macros-impl
) is a prefix of theproper part of the path.
See #76070 (comment)
for more details.