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

Make builds and tests consistent #1222

Merged
merged 4 commits into from
Feb 28, 2024
Merged

Make builds and tests consistent #1222

merged 4 commits into from
Feb 28, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Feb 27, 2024

What

Change the install make target to use the lock file, by adding --locked to all cargo install commands. Also encourage --locked usage elsewhere in CLI help output, and fix old make targets that are no longer needed since the split.

Why

Cargo install won't use the Cargo.lock file at all unless the --locked option is passed. This means that installs in CI are pulling in whatever the latest versions of software that match the Cargo.toml specification. This allows any developer of any dependency to have control over what runs in CI, or on developer machines. It is the main reason to rely on the Cargo.lock file and only update the lock file intentionally.

Cargo build automatically uses the lock file and only modifies it if it needs modifying. Install is one command that unfortunately doesn't use the lock file at all.

Recently the fact that the lock file wasn't in use caused CI to break:

@leighmcculloch leighmcculloch marked this pull request as ready for review February 27, 2024 01:34
@leighmcculloch leighmcculloch enabled auto-merge (squash) February 27, 2024 01:44
Copy link
Contributor

@psheth9 psheth9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !!

@leighmcculloch leighmcculloch merged commit e70a4a4 into main Feb 28, 2024
11 of 13 checks passed
@leighmcculloch leighmcculloch deleted the consistent-builds branch February 28, 2024 21:38
elizabethengelman pushed a commit to AhaLabs/stellar-cli that referenced this pull request Feb 28, 2024
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