cognitive-engineering-lab / rustc_plugin

A framework for writing plugins that integrate with the Rust compiler
MIT License
135 stars 16 forks source link

feat: Bump rust toolchain for rustc 1.82 in rustc_plugin 🚧 #30

Open makspll opened 3 weeks ago

makspll commented 3 weeks ago

I was going to update rustc_utils too but MirPass is no longer public (not sure if on purpose) https://github.com/rust-lang/rust/pull/129926

makspll commented 3 weeks ago

Having issues after bumping this in bevy_mod_scripting

error: cannot satisfy dependencies so `rustc_ast` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = note: `rustc_ast` was unavailable as a static crate, preventing fully static linking
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `compiler_builtins` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_std_workspace_core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `libc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `cfg_if` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `miniz_oxide` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `adler` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `hashbrown` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_std_workspace_alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `std_detect` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_demangle` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `addr2line` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `gimli` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `object` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `memchr` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `panic_unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

Not sure if this is due to the changes here

makspll commented 3 weeks ago

Adding #![features(rustc_private)] to my binaries helped, not sure if that's now necessary, the errors where coming from me importing the main lib into each binary without that feature

willcrichton commented 3 weeks ago

Yeah unfortunately every compiler version update tends to break something in our extended tool ecosystem. Is there a reason you need latest rustc?

makspll commented 3 weeks ago

I need rust 1.82 because I am running codegen on this crate https://github.com/bevyengine/bevy/blob/61d4048acb45572f5dd3a9f9245042be1a91e526/Cargo.toml#L13 which is its MSRV

makspll commented 3 weeks ago

The modifications here work fine in the linked PR, I've had to add rustc_private features to my binaries as I said above (I can't remember if that's a big deal or not), but other than that it's fine