Account for version number in NtIdent hack#76331
Merged
bors merged 1 commit intorust-lang:masterfrom Sep 6, 2020
Merged
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.
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
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. |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 9e7ef65 has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Sep 5, 2020
…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.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Sep 5, 2020
…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.
Collaborator
Collaborator
|
☀️ Test successful - checks-actions, checks-azure |
Member
Merged
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 17, 2020
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-sysortime-macros-impl) is a prefix of theproper part of the path.
See #76070 (comment)
for more details.