Repository navigation
Add locked and offline dependency modes - #9
Merged
Merged
Conversation
LunaStev
marked this pull request as ready for review
August 7, 2026 03:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--lockedtovex build,run,check, andfetch.--offlineto the same package-oriented commands.--lockedand--offlinewithvex update, which intentionally refreshes refs and rewrites the lockfile.Why
Vex already pins transitive Git dependencies, but callers could not require that
vex.lockremain unchanged or guarantee that a command would avoid the network. That made strict CI and disconnected builds difficult to express.These modes turn the existing reproducibility behavior into enforceable policy without exposing raw compiler flags or introducing a central registry.
Behavior
--lockedrequires a version 2 lockfile that exactly matches the manifest graph. Missing or stale lockfiles fail with instructions to runvex fetch.--lockedmay download a commit already pinned by the lockfile when its managed checkout is missing.--offlinenever clones or fetches. It can switch an existing checkout to a locally available locked commit.--locked --offlineprovides the strictest reproducible build mode.Validation
cargo fmt --checkcargo test --locked(14 unit tests and 1 Git integration test passed)cargo clippy --locked --all-targets -- -D warningscargo build --lockedvex run --locked --offline; output:Hello World.vex update --offline.