-
Notifications
You must be signed in to change notification settings - Fork 128
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
taplo install failing because --locked isnt default for bin crates #970
Comments
cargo-make defaults do not force the installation. it adds force only if it needs to install (due to crate not already installed or wrong version installed). so it doesn't install it again and again. The current definition is at: https://github.com/sagiegurari/cargo-make/blob/36c93a6134ca4c795941576fdf8b7b4a2c19f9ae/src/lib/descriptor/makefiles/toml.toml#L5C1-L18C1 basically: install_crate = { crate_name = "taplo-cli", binary = "taplo", test_arg = [
"--help",
] } so you can modify that definition in your makefile to define the specific version you want and that should solve it for you. |
My apology if I incorrectly concluded that However, this issue is about not using |
if you add a specific version to the above definition, it will add the locked automatically and no need to define the env var. sorry if the docs that mentioned it aren't clear enough |
I would like cargo make to install the latest version, using |
thats something i think I can add, or you can PR that. wdyt? |
great. I can PR it. |
Describe The Bug
The
format-toml
task uses taplo, which is broken atm. A new release is pending with tamasfe/taplo#473 , but that is taking a while to be finished.However the real solution is to install bin crates using
--locked
.Also it is weird that the default task is using
--force
- if the appropriate version is already installed, why force a re-install??The workaround atm is to add
CARGO_MAKE_CRATE_INSTALLATION_LOCKED = "true"
to theenv
section, but that should be the default for bin crates. c.f. https://stackoverflow.com/questions/76989793/why-cargo-install-needs-locked-to-work, https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfileTo Reproduce
Use "format-toml" task.
Error Stack
Code Sample
The text was updated successfully, but these errors were encountered: