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

Store marker_rustc_driver with the toolchain, that it belongs to #142

Closed
Tracked by #60
xFrednet opened this issue Jun 16, 2023 · 1 comment · Fixed by #144
Closed
Tracked by #60

Store marker_rustc_driver with the toolchain, that it belongs to #142

xFrednet opened this issue Jun 16, 2023 · 1 comment · Fixed by #144
Assignees
Labels
A-driver Area: Driver or something related to the internal working of a driver. A-marker-cargo Area: All things connected to `cargo_marker` C-enhancement Category: New feature or request D-rustc-driver Driver: Rustc Driver
Milestone

Comments

@xFrednet
Copy link
Member

xFrednet commented Jun 16, 2023

Marker's rustc driver is bound to a specific nightly toolchain version. When running the driver, we need to be certain, that the correct toolchain is used.

The best solution I see right now, would be to use rustup as a proxy like it's used for most tools. This would require:

  • Creating the rustup file called marker_rustc_driver
  • Installing the marker_rustc_driver in the correct toolchain folder
  • Ensure the invocation uses the right path (rustup +<toolchain> which marker_rustc_driver should work just fine)

A project with a rust-toolchain file might interfere with this. This needs to be tested.

@xFrednet xFrednet changed the title It should be possible to store multiple rustc drivers on one system separated by the toolchain. Store marker_rustc_driver with the toolchain, that it belongs to (Probably using proxies) Jun 16, 2023
@xFrednet xFrednet added C-enhancement Category: New feature or request A-marker-cargo Area: All things connected to `cargo_marker` D-rustc-driver Driver: Rustc Driver A-driver Area: Driver or something related to the internal working of a driver. labels Jun 16, 2023
@xFrednet xFrednet added this to the v0.0.1 milestone Jun 16, 2023
@xFrednet
Copy link
Member Author

xFrednet commented Jun 17, 2023

It turns out, that rustup, has a hard-coded list of valid proxy names. This means that we can't use it directly like I planned. However, rustup +<toolchain> which marker_rustc_driver works just fine, as that command doesn't check the tool name :)

https://github.com/rust-lang/rustup/blob/843459f893091f89b2dd5c7a977da1b3eb28df1b/src/lib.rs#L42-L61

@xFrednet xFrednet self-assigned this Jun 17, 2023
@xFrednet xFrednet changed the title Store marker_rustc_driver with the toolchain, that it belongs to (Probably using proxies) Store marker_rustc_driver with the toolchain, that it belongs to Jun 17, 2023
@bors bors bot closed this as completed in f9feb8d Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-driver Area: Driver or something related to the internal working of a driver. A-marker-cargo Area: All things connected to `cargo_marker` C-enhancement Category: New feature or request D-rustc-driver Driver: Rustc Driver
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant