Select a compiler
СсылкаRun topaz compiler status - to inspect the installed compiler before choosing an implementation. Run topaz version to identify the product release.
An explicit - selects SELF. An explicit - selects the reference compiler for verification. When the selector is absent, compiler-bearing commands use SELF. A rejected operation does not silently switch to the reference compiler.
Default selection source · Selection validation source
Compiler selection and artifact selection answer different questions. - chooses an implementation. emit - requests Rust source. A native build target can use SELF. Read the command reference for the supported combinations.
Select the language mode
СсылкаFor an entry-file invocation, the current language mode is used when - is absent. The public 5.21.x CLI accepts the current 5.21 mode. A product patch version such as 5. identifies a release, not a separate language mode.
Language selector source
During package-mode compilation, [package]. in topaz. supplies the language mode before entry-source loading. An explicit language selector must agree with the manifest. A different manifest mode or a conflicting selector is rejected.
Package selection source
Keep the selected package root consistent across check, run, and build invocations. An entry operand normally selects an entry-file route. The test command also preserves package context when its selected root contains a manifest.
Command scope
СсылкаCompiler selection applies to parse, dump-, check, run, test, fmt, lsp, emit, build, doc, bench, and compiler observe.
Compiler-bearing command source
Package management, storage, embedded Lispex, lookup, metadata, and compiler inspection commands use their own command contracts. They reject an explicit - selector. This includes compiler preview, compiler status, compiler validate, and compiler compare.
Selector applicability source
compiler preview selects its producer through its preview options. Combining - with - or - is rejected. Producer selection does not change the default used by a later check or build invocation.
Confirm the selection
СсылкаAdd - to a compiler-bearing invocation to report the selected compiler on standard error. The report distinguishes an explicit choice from the current default with explicit and current-.
Selection report source
An LSP session may receive its package root during initialize. Its compiler selection is reported after the workspace supplies the language mode.
topaz compiler status - returns installed compiler identity, the default and reference selectors, and command support conditions. Read that inventory alongside the command's options and conflicts. Status output describes the installed tool. A successful status request is not a successful check or build.
Status output source
Usage profiles
СсылкаA check usage profile adds checks for an intended use. The check contract defines its inputs, diagnostics, and reports. Installed profile availability remains a distribution evidence question.
Type checking without a mode flag
СсылкаType checking without a mode flag
Use topaz check <entry> for type checking. - is rejected during command validation.
Причина
The check command performs type checking with or without the ineffective flag. Both spellings request the same operation, so the flag has no separate intent to preserve.
Type checking without a mode flag rejection
- Семейство
- topaz-cli
- Этап
- command
- Операция
- argument-validation
- Категория
- types-option
Причина и условия
Use topaz check <entry> for type checking. - is rejected during command validation.
Действия
Run topaz check <entry> without -.
Type checking without a mode flag examples
СсылкаReject the unused types option
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
Type checking without a mode flag rejection→tools-unknown-option
Check with the canonical command
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
Named metadata commands and long options
СсылкаNamed metadata commands and long options
Use topaz version for the installed release report. topaz - and topaz - are rejected during command validation.
Use - for additional command details. - is rejected during command validation.
Причина
The version aliases request the same installed release report as the version command. The short verbosity alias requests the same additional detail as the verbose option. Neither alias expresses a different intent.
Named metadata commands and long options rejection
- Семейство
- topaz-cli
- Этап
- command
- Операция
- argument-validation
- Категория
- metadata-spellings
Причина и условия
Use topaz version for the installed release report. topaz - and topaz - are rejected during command validation.
Use - for additional command details. - is rejected during command validation.
Use topaz version for the installed release report. topaz - and topaz - are rejected during command validation.
Use - for additional command details. - is rejected during command validation.
Действия
Use topaz version and add - when a detailed report is needed.
Named metadata commands and long options examples
СсылкаReject the version flag alias
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
Named metadata commands and long options rejection→tools-unknown-option
Reject the short version alias
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
Named metadata commands and long options rejection→tools-unknown-option
Reject the short detail alias
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
Named metadata commands and long options rejection→tools-unknown-option
Read the installed release
Ссылкаlet value = 1
Topaz 5.21.3
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
Topaz 5.21.3
Request the detailed release report
Ссылкаlet value = 1
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
Separate option values
СсылкаSeparate option values
An option and its value occupy separate arguments, as in -. The - form is rejected during command validation.
This rule applies to CLI options. Arguments after - are program data and preserve their spelling.
Причина
The joined and separate forms supply the same value to the same option. A separate argument preserves that intent with one spelling and matches the command synopsis.
Separate option values rejection
- Семейство
- topaz-cli
- Этап
- command
- Операция
- argument-validation
- Категория
- value-separator
Причина и условия
An option and its value occupy separate arguments, as in -. The - form is rejected during command validation.
Действия
Pass each option and its value as separate arguments, such as -.
Separate option values examples
СсылкаReject an equals format value
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
Separate option values rejection→tools-unknown-option
Reject an equals language value
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
Separate option values rejection→tools-unknown-option
Pass values as separate arguments
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
One occurrence of each option
СсылкаOne occurrence of each option
An option appears at most once in an invocation. Repeated occurrences are rejected even when their values agree. The order of conflicting values does not select a winner.
Repeated options are rejected as unexpected arguments. This rule does not reinterpret program arguments after -.
Причина
Each option selects one value or behavior. Rejecting repeated selectors prevents argument order from changing that choice and applies equally when the values agree.
One occurrence of each option rejection
- Семейство
- topaz-cli
- Этап
- command
- Операция
- argument-validation
- Категория
- option-occurrence
Причина и условия
An option appears at most once in an invocation. Repeated occurrences are rejected even when their values agree. The order of conflicting values does not select a winner.
Связанное правило · One occurrence of each option →Действия
Give each CLI option once and resolve conflicting choices before invoking Topaz.
One occurrence of each option examples
СсылкаReject a repeated language selector
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
One occurrence of each option rejection→tools-unknown-option
Reject conflicting formats in one order
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
One occurrence of each option rejection→tools-unknown-option
Reject conflicting formats in the other order
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
One occurrence of each option rejection→tools-unknown-option
Give each option once
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
Reject a repeated boolean option
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
One occurrence of each option rejection→tools-unknown-option
One JSON format selector
СсылкаOne JSON format selector
Use - for JSON output from check, compiler status, explain, bench, lispex embed info. - is rejected during command validation. lispex embed info requires - and does not accept a human output format. Each command retains its own output fields and streams.
The format selector changes the representation of a command result. It does not merge the different records. check writes its diagnostic JSON to standard error. The other listed commands write one report to standard output. lispex embed info requires JSON. The other listed commands retain their human output format. Timing values vary between benchmark executions.
Причина
The old JSON switch and the format selector request the same report representation. The shared selector preserves that intent while each command retains its own report. Export inspection and diagnostic reporting remain distinct operations.
One JSON format selector rejection
- Семейство
- topaz-cli
- Этап
- command
- Операция
- argument-validation
- Категория
- json-format
Причина и условия
Use - for JSON output from check, compiler status, explain, bench, lispex embed info. - is rejected during command validation. lispex embed info requires - and does not accept a human output format. Each command retains its own output fields and streams.
Действия
Use - with a CLI that implements the Topaz 6.0 output selector.
One JSON format selector examples
СсылкаReject --json for compiler status
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
One JSON format selector rejection→tools-unknown-option
Select JSON for compiler status
Ссылкаlet value = 1
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
Стандартный вывод содержит объект JSON. Полная схема не определена.
Reject --json for diagnostic explanation
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
One JSON format selector rejection→tools-unknown-option
Select JSON for diagnostic explanation
Ссылкаlet value = 1
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
Стандартный вывод содержит объект JSON. Полная схема не определена.
Reject --json for benchmark report
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Код завершения 1.
One JSON format selector rejection→tools-unknown-option
Benchmark JSON with --format json
Ссылкаfunction identity<T>(value: T) -> T {value}
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
Стандартный вывод содержит объект JSON. Полная схема не определена.
The benchmark checks the fixture without running it and writes a JSON report. Timing values vary between executions.
Reject --json for embedded component report
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения command. Ненулевой код завершения.
One JSON format selector rejection→tools-unknown-option
Select JSON for embedded component report
Ссылкаlet value = 1
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
Стандартный вывод содержит объект JSON. Полная схема не определена.
Keep the check diagnostic format
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
A command is required
СсылкаName the help command
Use topaz help for command and option help. topaz is rejected during command validation.
An invocation must name a command. A missing command is a usage error with exit status 1 and empty standard output. The CLI reports the missing command on standard error and directs the user to topaz help. This textual failure has no TPZ code or source location.
Причина
An explicit help command requests the command reference. An omitted command supplies no operation and can result from a missing script argument. Requiring an explicit request keeps that mistake observable.
Missing command
- Семейство
- topaz-cli
- Этап
- command
- Операция
- argument-validation
- Категория
- missing-command
Причина и условия
Use topaz help for command and option help. topaz is rejected during command validation.
Действия
Supply the command to run. Use topaz help to read the command and option help.
Request help explicitly
СсылкаReject an invocation without a command
Ссылкаlet value = 1
Нет стандартного вывода.Ожидаемый результат
Request help by name
Ссылкаlet value = 1
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
topaz help prints the installed command and option help. Its wording and command inventory can grow. This example checks successful completion and an empty standard error stream.