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

Convert proc_macro_back_compat lint to an unconditional error. #125596

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

nnethercote
Copy link
Contributor

We still check for the rental/allsorts-rental crates. But now if they are detected we just emit a fatal error, instead of emitting a warning and providing alternative behaviour.

The original "hack" implementing alternative behaviour was added in #73345.

The lint was added in #83127.

The tracking issue is #83125.

The direct motivation for the change is that providing the alternative behaviour is interfering with #125174 and follow-on work.

r? @estebank

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 27, 2024
@nnethercote
Copy link
Contributor Author

I'm not 100% certain this is the right way to do this, but it seems like a reasonable first attempt.

cc @petrochenkov @Aaron1011

@bors
Copy link
Contributor

bors commented May 27, 2024

☔ The latest upstream changes (presumably #125410) made this pull request unmergeable. Please resolve the merge conflicts.

@estebank
Copy link
Contributor

@bors try

Gonna do a crater run as a sanity check that we haven't missed something, but otherwise I'm ok with landing this change as is. We provide actionable user feedback while removing the hack and without blocking your other work. This is the best possible resolution, beyond a more advanced/generalized mechanism to handle popular dependency versions with known issues.

@bors
Copy link
Contributor

bors commented May 27, 2024

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rental-hard-error (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rental-hard-error --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Removing tests/ui/proc-macro/pretty-print-hack-show.remapped.stdout
Removing tests/ui/proc-macro/pretty-print-hack-show.local.stdout
Auto-merging compiler/rustc_lint_defs/src/lib.rs
Auto-merging compiler/rustc_lint_defs/src/builtin.rs
Auto-merging compiler/rustc_lint/src/lints.rs
Auto-merging compiler/rustc_lint/src/context/diagnostics.rs
CONFLICT (content): Merge conflict in compiler/rustc_lint/src/context/diagnostics.rs
Auto-merging compiler/rustc_expand/src/mbe/transcribe.rs
Automatic merge failed; fix conflicts and then commit the result.

To reduce indentation and improve readability.
We still check for the `rental`/`allsorts-rental` crates. But now if
they are detected we just emit a fatal error, instead of emitting a
warning and providing alternative behaviour.

The original "hack" implementing alternative behaviour was added
in rust-lang#73345.

The lint was added in rust-lang#83127.

The tracking issue is rust-lang#83125.

The direct motivation for the change is that providing the alternative
behaviour is interfering with rust-lang#125174 and follow-on work.
@nnethercote
Copy link
Contributor Author

I rebased.

@bors try

@bors
Copy link
Contributor

bors commented May 27, 2024

⌛ Trying commit cf0c2c7 with merge c57a122...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 27, 2024
Convert `proc_macro_back_compat` lint to an unconditional error.

We still check for the `rental`/`allsorts-rental` crates. But now if they are detected we just emit a fatal error, instead of emitting a warning and providing alternative behaviour.

The original "hack" implementing alternative behaviour was added in rust-lang#73345.

The lint was added in rust-lang#83127.

The tracking issue is rust-lang#83125.

The direct motivation for the change is that providing the alternative behaviour is interfering with rust-lang#125174 and follow-on work.

r? `@estebank`
@bors
Copy link
Contributor

bors commented May 27, 2024

☀️ Try build successful - checks-actions
Build commit: c57a122 (c57a122e6bc7d3e243f3b2a000b6916cb51ef149)

@nnethercote
Copy link
Contributor Author

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-125596 created and queued.
🤖 Automatically detected try build c57a122
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 27, 2024

if crate_matches {
// FIXME: make this translatable
#[allow(rustc::untranslatable_diagnostic)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks very translatable now

@craterbot
Copy link
Collaborator

🚧 Experiment pr-125596 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-125596 is completed!
📊 100 regressed and 1 fixed (466636 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Jun 1, 2024
@nnethercote
Copy link
Contributor Author

nnethercote commented Jun 1, 2024

Crater results are very much as expected.

The vast majority of the failures have the expected message:

error: using an old version of rental
|
= note: older versions of the rental crate no longer compile; please update to rental v0.5.6, or switch to one of the rental alternative

A few had "no space left on device" (just running out of disk space):

One had "error: failed to download aho-corasick v1.1.3" (clearly a network error)

Two had "collect2: fatal error: ld terminated with signal 7 [Bus error], core dumped" (linker crash?!)

Other notes

  • Most of the rental failures are in personal repos, presumably for long-abandoned personal projects.
  • Only 11 are are in published crates. They are all at least 3 years old.

This all looks fine to me. @estebank, what do you think?

@estebank
Copy link
Contributor

estebank commented Jun 4, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jun 4, 2024

📌 Commit cf0c2c7 has been approved by estebank

It is now in the queue for this repository.

@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 Jun 4, 2024
@nnethercote
Copy link
Contributor Author

@bors rollup

compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jun 4, 2024
…stebank

Convert `proc_macro_back_compat` lint to an unconditional error.

We still check for the `rental`/`allsorts-rental` crates. But now if they are detected we just emit a fatal error, instead of emitting a warning and providing alternative behaviour.

The original "hack" implementing alternative behaviour was added in rust-lang#73345.

The lint was added in rust-lang#83127.

The tracking issue is rust-lang#83125.

The direct motivation for the change is that providing the alternative behaviour is interfering with rust-lang#125174 and follow-on work.

r? `@estebank`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 4, 2024
…llaumeGomez

Rollup of 11 pull requests

Successful merges:

 - rust-lang#106186 (Add function `core::iter::chain`)
 - rust-lang#125596 (Convert `proc_macro_back_compat` lint to an unconditional error.)
 - rust-lang#125696 (Explain differences between `{Once,Lazy}{Cell,Lock}` types)
 - rust-lang#125917 (Create `run-make` `env_var` and `env_var_os` helpers)
 - rust-lang#125927 (Ignore `vec_deque_alloc_error::test_shrink_to_unwind` test on non-unwind targets)
 - rust-lang#125930 (feat(opt-dist): new flag `--benchmark-cargo-config`)
 - rust-lang#125932 (Fix typo in the docs of `HashMap::raw_entry_mut`)
 - rust-lang#125933 (Update books)
 - rust-lang#125944 (Update fuchsia maintainers)
 - rust-lang#125946 (Include trailing commas in wrapped function declarations [RustDoc])
 - rust-lang#125973 (Remove `tests/run-make-fulldeps/pretty-expanded`)

Failed merges:

 - rust-lang#125815 (`rustc_parse` top-level cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fa96e2c into rust-lang:master Jun 4, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone Jun 4, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 4, 2024
Rollup merge of rust-lang#125596 - nnethercote:rental-hard-error, r=estebank

Convert `proc_macro_back_compat` lint to an unconditional error.

We still check for the `rental`/`allsorts-rental` crates. But now if they are detected we just emit a fatal error, instead of emitting a warning and providing alternative behaviour.

The original "hack" implementing alternative behaviour was added in rust-lang#73345.

The lint was added in rust-lang#83127.

The tracking issue is rust-lang#83125.

The direct motivation for the change is that providing the alternative behaviour is interfering with rust-lang#125174 and follow-on work.

r? ``@estebank``
@nnethercote nnethercote deleted the rental-hard-error branch June 5, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants