-
Notifications
You must be signed in to change notification settings - Fork 121
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
Minimum version dependency installation #381
Comments
cool idea. |
Huh, Indeed, having something more "global" would be nice, to avoid having to redundantly specify the To do this with [tasks.install-xargo-locked]
private = true
description = "Installs xargo 0.9.8 reproducibly"
install_crate = { crate_name = "xargo", binary = "xargo", test_arg = "--help", min_version = "0.9.8" }
install_crate_args = ["--locked", "--version", "0.9.8"]
[tasks.install-xargo-latest]
private = true
description = "Installs xargo 0.9.8, fetching latest if available."
install_crate = { crate_name = "xargo", binary = "xargo", test_arg = "--help", min_version = "0.9.8" }
[tasks.install-xargo]
run_task = [
{ name = "install-xargo-locked", condition = { env_set = ["REPRODUCIBLE_BUILD"] } },
{ name = "install-xargo-latest" },
] Which kinda feels extremely boilerplate-y for my tastes. |
first of all, you don't have to duplicate things, right? you can extend for example: [tasks.install-xargo-locked]
extend = "install-xargo-latest"
install_crate_args = ["--locked", "--version", "0.9.8"]
[tasks.install-xargo-latest]
private = true
description = "Installs xargo 0.9.8, fetching latest if available."
install_crate = { crate_name = "xargo", binary = "xargo", test_arg = "--help", min_version = "0.9.8" } which makes things more readable and maintainable. |
…ARGO_MAKE_CRATE_INSTALLATION_FROZEN and CARGO_MAKE_CRATE_INSTALLATION_LOCKED environment variables #381
@roblabla I just pushed support for this global flag. |
I just took a quick look (didn't run it yet, just going over the code), I think you forgot to prefix the version with |
woops. right. thanks. |
Code updated and added relevant docs as well. |
Just ran 0.29 on my project, the LOCKED installation works perfectly fine :). I'm not entirely sure FROZEN makes sense for cargo install? When I tried installing xargo with --frozen, cargo complained with
(Full command: [cargo-make] INFO - Execute Command: So I'm not sure how --frozen is supposed to be used 👀. |
ya, frozen does seem only relevant for dependencies. will remove that. |
@roblabla just released a new version with this. |
Features Description
I'm currently dealing with bitrot happening in my kernel, which stopped building after leaving it untouched for a couple months. It turns out that newer version of build dependencies stopped building on the rustc version pinned by my project, which caused the build to fail.
It'd be nice to find a way to tell cargo-make to leverage the
min-version
and cargo's--locked
parameter to ensure reproducibility of the builds.Describe the solution you'd like
A flag or an environment variable to cargo-make (
--reproducible
,CARGO_MAKE_REPRODUCIBLE=true
?) that, when set, causes every crate installed throughinstall_crate = { crate_name = "xargo", min_version = "1.0.0" }
to be installed as if ran withcargo install --version 1.0.0 --locked
.The text was updated successfully, but these errors were encountered: