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

Build with --locked in CI #340

Merged
merged 1 commit into from
Jan 27, 2023
Merged

Build with --locked in CI #340

merged 1 commit into from
Jan 27, 2023

Conversation

danielocfb
Copy link
Collaborator

@danielocfb danielocfb commented Jan 27, 2023

If we bump dependencies manually in Cargo.toml we may end up forgetting about adjusting Cargo.lock in the process, depending on how we go about it. That's not great for users as it will cause spurious changes when they build a checkout.
Luckily for us, it's an easy thing to detect: we should build with --locked, which will cause the build process to fail if the two files do not agree. Use it in our CI workflow accordingly.

Signed-off-by: Daniel Müller [email protected]

If we bumping dependencies manually in Cargo.toml we may end up
forgetting about adjusting Cargo.lock in the process, depending on how
we go about it. That's not great for users as it will cause spurious
changes when they build a checkout.
Luckily for us, it's an easy thing to detect: we should build with
--locked, which will cause the build process to fail if the two files do
not agree. Use it in our CI workflow accordingly.

Signed-off-by: Daniel Müller <[email protected]>
@insearchoflosttime
Copy link
Collaborator

nice! out of curiosity, how did you discover the locked flag for cargo?

@insearchoflosttime insearchoflosttime merged commit f19f8b7 into libbpf:master Jan 27, 2023
@danielocfb danielocfb deleted the topic/locked branch January 27, 2023 22:35
@danielocfb
Copy link
Collaborator Author

nice! out of curiosity, how did you discover the locked flag for cargo?

Thanks for the review! I think I had been aware of it for a while, but for this particular use case it may have been the comments over in #187 that mentioned --locked that lead me into looking into its utility for our use cases a bit more and that made me recollect that 4bd2a13 managed to forget updating Cargo.lock and so 52ab250 included a bunch of unrelated changes more or less by accident.

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.

3 participants