A vendored dependency is an upstream artifact in the repository, so builds work without network
access. Each one has an entry under vendored: in config/versions.yaml.
YAML contract
| Field | Required | Effect |
|---|---|---|
vendor_dir |
Yes | Repository path of the artifacts |
version |
No | Main pin: a tag, commit SHA or version |
vendor_script |
No | Script that fetches the artifacts again |
check_script |
No | Script that compares the artifacts with the pins |
pins |
No | Sub-pins as flat key-value pairs |
vendored:
gitlab_system_note_actions:
version: <commit-sha>
vendor_dir: config/vendored
check_script: scripts/vendored/gitlab_system_note_actions/check.sh
iglu:
vendor_dir: config/schemas/iglu
vendor_script: scripts/vendored/iglu/bump.sh
check_script: scripts/vendored/iglu/check.sh
pins:
orbit_query: <version>Script contract
mise vendor -- <name> and mise check:vendored -- <name> run scripts/vendored/run.sh. The
runner exports these variables, then runs the script of the entry:
| Variable | Value |
|---|---|
VENDOR_NAME |
Key of the entry under vendored: |
VENDOR_VERSIONS_FILE |
Absolute path of config/versions.yaml |
VENDOR_DIR |
Absolute path of vendor_dir |
VENDOR_VERSION |
Value of version, or empty |
vendor_scriptwrites the artifacts to$VENDOR_DIR. It can write checksums to the versions file. It exits 0 on success.check_scriptchanges no file. It exits 0 when the artifacts match the pins.
Workflows
Bump an Iglu schema version
- Change the pin under
vendored.iglu.pinsinconfig/versions.yaml. - Run
mise vendor -- iglu. - Check:
mise check:vendored -- igluexits 0, andcargo buildpasses.
Add a vendored dependency
- Add an entry under
vendored:inconfig/versions.yaml. - Add the scripts under
scripts/vendored/<name>/and make them executable. - Run
mise vendor -- <name>. - Check:
mise check:vendored -- <name>exits 0, andmise versions:validateexits 0.
No Rust change is necessary. orbit_versions::VERSIONS reads the new entry at compile time.