Makefile: add --locked #312
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#312
Loading…
Reference in New Issue
No description provided.
Delete Branch "abdul124/artiq-zynq:lock_makefile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Freeze
Cargo.lock
and use same version of dependencies for each build.I have not seen any problem of cargo build changing the lockfile. How do you trigger it?
Running
make
command to directly build the target instead of usingnix build
updates theCargo.lock
file. Also, after further testing,cargo xbuild
tends to ignore the--locked
or--frozen
flag. It updates the lock file first before passing these flags over to cargo. Is there any particular reason for usingcargo xbuild
over other alternatives likebuild-std
flag from cargo?Only in special circumstances where this is actually desirable (e.g. you added a dependency to Cargo.toml), no?
These are the changes it did:
Sounds like you'd want these changes anyway?
With missing dependencies the build would not work.
It tends to add latest version of dependencies from
crates.io
in case of missing dependencies which are incompatible with the rust version we are using. For instance, it addsnum-traits
0.2.19 which requires rust 1.62.0 to run and hence build fails. However, since the build will fail regardless (because of missing dependencies), I guess its mostly about what error message it throws. Also, for reproducibility wouldn't it be better to have the lock file locked unless we manually try to update it via cargo update?That's just one of many issues with rust/cargo and trying to enforce the systematic use of --locked (or even --offline) is not really solving the problem.
Pull request closed