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

Update Rust toolchain to nightly-2023-02-03 #2184

Closed
wants to merge 4 commits into from

Conversation

tedinski
Copy link
Contributor

@tedinski tedinski commented Feb 3, 2023

Description of changes:

This PR is blocked on waiting for #2149 to be merged first.
Once that's merged, this PR should be rebased and force pushed.

The following upstream changes had impact this week:

This change caused all stubbing code to fail (CI will fail) and I could use help with it:

I think what we're seeing is that queries.global_ctxt()? is now "held" by rustc_driver across the after_expansion call, and consequently our use of queries.global_ctxt().unwrap().enter() fails here:

queries.global_ctxt().unwrap().peek_mut().enter(|tcx| {

This might be a bug with that change in upstream rust? @celinval what do you think?

Resolved issues:

Resolves #2114

Testing:

  • How is this change tested? ci

  • Is this a refactor change? no

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

celinval and others added 4 commits January 23, 2023 12:39
to overcome an issue with async generators. Updated the
codegen_generator to follow the new logic implemented in
rust-lang/rust#105977
@tedinski tedinski changed the title Toolchain next Update to nightly-2023-02-03 Feb 3, 2023
@tedinski tedinski changed the title Update to nightly-2023-02-03 Update Rust toolchain to nightly-2023-02-03 Feb 3, 2023
@celinval
Copy link
Contributor

celinval commented Feb 4, 2023

Yeah, it could've been a mistake on their side. @oli-obk was this restriction done on purpose?

We could work around it by moving the stubbing code to the after_analysis callback. My guess is that after_parsing might be too soon, since we deal with path resolution and the macro might've not been expanded yet.

@oli-obk
Copy link

oli-obk commented Feb 4, 2023

Ah no, that's a bug on our end. I think we could just pass the TyCtxt into the after_analysis query, but short term we should just stop holding the lock on the rustc side

@celinval
Copy link
Contributor

celinval commented Feb 6, 2023

Ah no, that's a bug on our end. I think we could just pass the TyCtxt into the after_analysis query, but short term we should just stop holding the lock on the rustc side

@oli-obk do you think you can own the fix, or do you want us to submit a patch upstream?

@oli-obk
Copy link

oli-obk commented Feb 6, 2023

I'll handle it, should be fixed in the next few days

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 7, 2023
Avoid locking the global context across the `after_expansion` callback

r? `@petrochenkov`

This was noticed in model-checking/kani#2184 (comment)

This didn't have a perf impact, as it's just an additional 2 or 3 RefCell locks being created.
@oli-obk
Copy link

oli-obk commented Feb 8, 2023

The upstream patch has landed, but I think it didn't make today's nightly build, so you'll need to wait another day

@celinval
Copy link
Contributor

celinval commented Feb 8, 2023

Perfect! Thanks a lot @oli-obk.

RalfJung pushed a commit to RalfJung/miri that referenced this pull request Feb 9, 2023
Avoid locking the global context across the `after_expansion` callback

r? `@petrochenkov`

This was noticed in model-checking/kani#2184 (comment)

This didn't have a perf impact, as it's just an additional 2 or 3 RefCell locks being created.
@qinheping
Copy link
Contributor

closed as #2291 created.

@qinheping qinheping closed this Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update rust toolchain version for Kani 0.21
4 participants