Invocation, options and results
Linktopaz vendor
topaz vendor
Input
topaz vendor accepts no positional operands. - selects the package root and defaults to the current directory.
- selects a local registry root. A dependency declared as <name> at <version> is read from <dir>/. A URL is not a registry directory and is rejected without a network request.
Without -, the command verifies each existing registry package under vendor/. It does not replace that content from another source.
The package manifest selects the language mode. -, -, output-format options, extra operands, missing values, repeated options, and attached values are rejected. topaz fetch is rejected during command validation.
Options and conflicts
| Option | Default | Contract | Conflicts |
|---|---|---|---|
--root <dir> | . | The explicit source root or package root for this invocation. | None listed |
--from <dir> | Not specified | Local registry root used by vendor. | None listed |
Output channels
stdout
stderr
Exit status
0
Every registry dependency was admitted and the lock was written. Zero registry dependencies is a successful operation that still validates and writes the package lock.
1
Invalid arguments or manifests, missing registry content, mismatched package names or versions, hash mismatches, symlinks or invalid vendor paths, failed copies, failed Lispex preparation, and lock publication failures.
Effects
Standard-library and path dependencies are not copied into the registry vendor tree. Their identities still participate in applicable package and lock validation.
With -, each candidate is admitted and hashed before its destination is replaced. Content is copied through a staging directory. The existing dependency directory is retained as a backup until the lock succeeds.
A failure before lock commitment restores previously replaced vendor directories when filesystem recovery succeeds. Recovery artifacts can remain after an I/O failure and do not establish a completed operation.
The command rejects symlinks within admitted package content and along vendor paths. It does not delete unrelated vendor entries or modify the registry source. Without -, vendored package bytes remain unchanged.
The package lock is written after dependency verification. Package-owned Lispex preparation outputs are updated when the manifest requires them.
Vendoring performs no network access. It reads the explicitly selected local registry or the existing vendor tree and never falls back to a remote registry.
The same manifest, registry package bytes, local dependency bytes, and installed preparation components produce the same vendor contents and lock bytes. Registry package selection uses exact name and version directories.
Temporary staging and backup names are not part of the installed package identity. Filesystem timestamps do not change the selected package or its content hash.
A candidate package must declare the requested name and exact version. When the dependency table supplies hash, candidate content must match it. When no hash is supplied, the admitted content hash is recorded in the new lock.
The command does not rewrite manifest pins. Subsequent compilation requires - for registry dependencies and checks vendored bytes against the lock.
Operation
LinkSupply a local registry to replace vendored dependencies, or verify the existing vendor tree. Dependency content is checked against its expected identity.
Option conditions
LinkThe - option selects registry content for vendor.
vendor uses topaz.toml [package].language; drop --language-version
Behavior contract
LinkCommand behavior
Arguments and rejection
topaz vendor accepts no positional operands. - selects the package root and defaults to the current directory.
- selects a local registry root. A dependency declared as <name> at <version> is read from <dir>/. A URL is not a registry directory and is rejected without a network request.
Without -, the command verifies each existing registry package under vendor/. It does not replace that content from another source.
The package manifest selects the language mode. -, -, output-format options, extra operands, missing values, repeated options, and attached values are rejected. topaz fetch is rejected during command validation.
Output
Successful vendoring leaves standard output empty. Standard error reports the number of registry packages verified or materialized and the written lock path.
An error is reported on standard error. A backup cleanup failure after the new lock is committed is a warning and does not change the successful result.
- is rejected because vendoring has no JSON report. The written topaz. uses the same format as topaz lock.
Exit status
Exit code 0 means every registry dependency was admitted and the lock was written. Zero registry dependencies is a successful operation that still validates and writes the package lock.
Exit code 1 covers invalid arguments or manifests, missing registry content, mismatched package names or versions, hash mismatches, symlinks or invalid vendor paths, failed copies, failed Lispex preparation, and lock publication failures.
A warning while removing an obsolete backup after commitment retains exit code 0 because the new vendor content and lock are already complete.
Filesystem effects
Standard-library and path dependencies are not copied into the registry vendor tree. Their identities still participate in applicable package and lock validation.
With -, each candidate is admitted and hashed before its destination is replaced. Content is copied through a staging directory. The existing dependency directory is retained as a backup until the lock succeeds.
A failure before lock commitment restores previously replaced vendor directories when filesystem recovery succeeds. Recovery artifacts can remain after an I/O failure and do not establish a completed operation.
The command rejects symlinks within admitted package content and along vendor paths. It does not delete unrelated vendor entries or modify the registry source. Without -, vendored package bytes remain unchanged.
The package lock is written after dependency verification. Package-owned Lispex preparation outputs are updated when the manifest requires them.
Network access
Vendoring performs no network access. It reads the explicitly selected local registry or the existing vendor tree and never falls back to a remote registry.
Reproducibility
The same manifest, registry package bytes, local dependency bytes, and installed preparation components produce the same vendor contents and lock bytes. Registry package selection uses exact name and version directories.
Temporary staging and backup names are not part of the installed package identity. Filesystem timestamps do not change the selected package or its content hash.
Packages and locks
A candidate package must declare the requested name and exact version. When the dependency table supplies hash, candidate content must match it. When no hash is supplied, the admitted content hash is recorded in the new lock.
The command does not rewrite manifest pins. Subsequent compilation requires - for registry dependencies and checks vendored bytes against the lock.
Why
Materialization has one command spelling because the removed fetch command requested the same local registry operation. - supplies replacement content, while its absence requests verification of content already present.
Source evidence
- compiler/crates/topaz_cli/src/command/flags.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/command/dispatch.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/command/validation.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/package/vendor.rs at
b48527d0a174
The linked public CLI recipe checks the exact displayed argument rejection before the requested operation. It does not execute the successful operation or verify its effects.
Materializing or verifying a registry tree and writing its lock are outside the execution allowlist. The linked safe recipe exercises argument rejection. Remote registry commands are not provided as execution recipes because the contract accepts local registries and the runner excludes remote access.
Example contract
LinkExample contract
The invocation topaz vendor main. is expected to exit with 1.
The command has no positional source operand. The adapter-supplied fixture operand is deliberately rejected before its operation; this is an arity example, not a successful vendor session.
Why
Dependency materialization follows the selected package manifest. Rejecting a source operand prevents the command from appearing to fetch dependencies for an unrelated file.
Source evidence
- compiler/crates/topaz_cli/src/command/flags.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/command/dispatch.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/command/validation.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/package/vendor.rs at
b48527d0a174
Example
LinkArgument-rejection example
Linkfunction identity<T>(value: T) -> T {value}
Expected result
Expected result
Textual rejection details remain Pending in the reference model. The independent Tools example gate expects exit 1.
The command has no positional source operand. The adapter-supplied fixture operand is deliberately rejected before its operation; this is an arity example, not a successful vendor session.
Source evidence
- compiler/crates/topaz_cli/src/command/flags.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/command/dispatch.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/command/validation.rs at
b48527d0a174 - compiler/crates/topaz_cli/src/package/vendor.rs at
b48527d0a174
Verification scope
LinkObserved with Topaz 5.21.3 on 2026-11-06T08:36:29.642Z. This invocation passed; exit 1. 3 assertions were evaluated against the independent expected result. Execution record. This result covers the displayed invocation.