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

cargo-bitbake: Add an option to trust lockfiles #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BKDaugherty
Copy link

@BKDaugherty BKDaugherty commented Aug 31, 2023

Description

When using Cargo Bitbake in combination with lockfiles, I was a little surprised that cargo-bitbake didn't just read from the lockfile directly as that has the resolution information I'd like to use.

--require-lockfile can now be used to blindly trust an existing lockfile without performing resolution. This is done so that users can avoid performing resolution if they already have a lockfile checked in.

I could see a fair argument here that the right way of doing this is likely staying more similar to the rest of the family of cargo tools, and accepting something like a --locked and --offline flag, and if we attempt to access the network or modify the Lockfile while performing resolution, we panic.

That being said, this was the easiest thing for my company to do without thinking about it too much, so we went with this 🤷 . Would love to discuss how cargo bitbake is intended to interact with lockfiles in the ecosystem as a whole if anyone has ideas!

Caveat: this won't work with workspaces / virtual manifests correctly, but this tool doesn't seem to handle them, so I don't think this is really a regression.

Test Plan

I tested this by running it on all of my companies recipes, but can do some more testing / testing in a public way if desired!

`--require-lockfile` can now be used to blindly trust an existing
lockfile without performing resolution. This is done so that users can
avoid performing resolution if they already have a lockfile checked in.
@cornelius-span
Copy link

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants