I have the automated builds setup for my snap, but it seems like the build is not respecting the Cargo.lock file for my project because it is updating dependencies that I have not told it to.
I am using a release of a crate that is one version older than the latest available release and my project will not compile with the latest one. When I compile locally or on my other automated builds Cargo will use the versions of the packages that are specified in the
Cargo.lock file until I explicitly run
cargo update to update the lock file.
Here is the build log from the Snapcraft CI server:
Here is the build log from my CI build:
Here is the commit from my project:
The snapcraft build updating the
termimad crate from
This is still happening for me and is breaking my snap builds whenever somebody updates a certain library I depend on because snapcraft isn’t respecting my
Is there somewhere I should create a bug for this?
You can file bugs for snapcraft at http://bugs.launchpad.net/snapcraft. I noticed this post is not in the snapcraft category and was originally made during holidays where folks may have missed it. Perhaps they will see it now, but regardless I recommend filing a snapcraft bug for this.
Thanks @ijohnson @zicklag!
I noticed this when I recently added support for rust workspaces. Workspaces should support Cargo.lock.
I just put together a PR to hopefully improve Cargo.lock support for all projects. https://github.com/snapcore/snapcraft/pull/2915
Once it’s done building, it should be available to install with:
snap refresh snapcraft --channel edge/pr-2915
It would be awesome if you could give it a test run on your project!
FWIW I’m not really experienced with Rust, so if you have any thoughts on further improving the rust plugin, or this PR specifically, please let us know!
Hey @cjp256 thanks for that! I’ll try it out when I can.
@zicklag FYI, the fixes can be found in
edge now that they’ve been merged.
Awesome, thanks for your work on this.
I’m going to try it out hopefully within the next couple of days and I’ll let you know how it goes.