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

Linter: Support for running cargo check without toolchain proxy in non-rustup environments #194

Open
DaAlbrecht opened this issue Dec 17, 2024 · 3 comments
Labels
A-Linter Related to the linter and custom lints C-Bug A bug in the program

Comments

@DaAlbrecht
Copy link
Contributor

Currently the build system for bevy_lint enforces a specific toolchain proxy via the +<channel> syntax in the cargo check command, assuming the use of rustup. This is incompatible with setups where cargo is installed outside of rustup for example with Nix.

@BD103 BD103 added A-Linter Related to the linter and custom lints C-Bug A bug in the program labels Dec 17, 2024
@BD103
Copy link
Member

BD103 commented Dec 17, 2024

Does Nix allow installing specific nightly toolchains and components? If not, we may not be able to support it.

@Multirious
Copy link

Multirious commented Dec 18, 2024

Does Nix allow installing specific nightly toolchains and components? If not, we may not be able to support it.

Yep, it allows. When packaging and installing in Nix, we can declare a specific toolchain version as dependency.

  • Simplest way is probably to just add a config/env to not pass +... to cargo and just select the current cargo in PATH.
  • Config/env var for explicit cargo location at runtime.
  • Config/env var for explicit cargo location at compile time.

Oh, I just remembered that the driver has to be compiled specifically for a single nightly version. An env variable at compile time is probably the only useful option here.

@BD103
Copy link
Member

BD103 commented Dec 18, 2024

We could also add a feature flag, such as --feature nix, so the user can specify explicitly that they are not using Rustup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Related to the linter and custom lints C-Bug A bug in the program
Projects
None yet
Development

No branches or pull requests

3 participants