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

Account for version number in NtIdent hack #76331

Merged
merged 1 commit into from
Sep 6, 2020

Conversation

Aaron1011
Copy link
Member

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 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 #76070 (comment)
for more details.

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
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 4, 2020
@Aaron1011
Copy link
Member Author

r? @petrochenkov

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.

@Aaron1011 Aaron1011 added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 4, 2020
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 4, 2020

📌 Commit 9e7ef65 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2020
@petrochenkov petrochenkov added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 4, 2020
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.
@bors
Copy link
Contributor

bors commented Sep 6, 2020

⌛ Testing commit 9e7ef65 with merge ffaf158...

@bors
Copy link
Contributor

bors commented Sep 6, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: petrochenkov
Pushing ffaf158 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 6, 2020
@bors bors merged commit ffaf158 into rust-lang:master Sep 6, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 6, 2020
@spastorino
Copy link
Member

discussed in T-compiler meeting.

@rustbot modify labels: beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 10, 2020
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.48.0, 1.47.0 Sep 17, 2020
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 17, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants