본문으로 건너뛰기
토파즈6.0 · 출시 전
다운로드 →

문서 검색

명세 6.0

방향키로 결과를 고르고 Enter를 눌러 여세요.

API 이름, 진단 번호, 규칙 또는 프로젝트 주제를 입력하세요.

    도구

    compiler preview

    Writes an observation from the linked SELF compiler or a selected producer.

    Invocation, options and results

    링크

    topaz compiler preview

    호출 형식
    1. topaz compiler preview [entry]

    입력

    Use topaz compiler preview [entry] --out-dir <dir>. Accept --locked, --self-source, --root <dir>, --terminal ast, --terminal typed or --terminal rust-source, --producer stage1 or --producer stage2, and --language-version <version>.

    The default terminal is typed. Without a producer allow only ast or typed and use the linked compiler preview. AST preview requires one entry file. Typed preview allows an entry or package mode.

    An explicit producer requires --terminal rust-source. --self-source requires --producer stage2 --terminal rust-source, accepts no entry and conflicts with --locked. It selects the embedded compiler source set rather than a caller package.

    Require one output directory outside the selected source root. Reject --compiler, --verbose, compiler budget flags, format selectors, repeated options, equals forms, missing values, unsupported terminals and producers and every unlisted option. Reject --locked for an explicit standalone entry.

    옵션과 충돌

    옵션기본값계약충돌
    --lockedfalse

    Verify topaz.lock before compiling the selected package.

    --self-source
    --self-sourcefalse

    Stage 2 compiler preview only: compile the embedded compiler source set --self-source requires compiler preview --producer stage2 --terminal rust-source Also rejects combination with --compiler.

    --locked
    --root <dir>entry directory; . in package mode

    The explicit source root or package root for this invocation.

    없음
    --out-dir <dir>미지정

    run the linked self compiler and write a typed-terminal observation to --out-dir; add --producer stage1|stage2 --terminal rust-source for an explicit compiler producer; Stage 2 also accepts --self-source to compile the embedded compiler source set Required. compiler preview requires --out-dir

    없음
    --terminal ast|typed|rust-sourcetyped

    compiler preview: ast or typed; compiler observe: typed or rust-source (defaults: preview=typed, observe=rust-source)

    없음
    --producer stage1|stage2미지정

    compiler preview only: select a fail-closed compiler producer (requires rust-source) --producer requires --terminal rust-source Also rejects combination with --compiler.

    없음
    --language-version <5.21>5.21

    language version selector

    없음

    출력 채널

    stdout

    stderr

    종료 상태

    0

    A complete preview for the requested producer and terminal is published.

    1

    Arguments, source or language admission, package state, producer execution, bundle construction or publication fails.

    효과

    Use the same outside source root check and managed bundle publication rules as compiler observe. Stage complete output and replace only an existing valid managed observation bundle.

    Read the selected source tree or embedded self source without modifying it. Retain existing output if replacement cannot be installed. Do not emit or run a native program.

    Do not download a producer, compiler or dependency and do not contact a registry. Use only the explicitly admitted installed producer and local input facts.

    Successful runs without host resource failure are repeatable. Canonical preview bytes are stable for the same selected producer identity, source set and logical paths, package facts, language profile, terminal and installed product.

    Stage 1 and Stage 2 provenance may differ even when their semantic phases agree. Such a difference is meaningful evidence and remains visible to provenance comparison.

    Entry omission selects package mode except when --self-source selects the embedded compiler source set. Package mode validates the package and uses already materialized dependencies.

    --locked verifies the existing matching package lock without updating it. Registry dependencies and Lispex package configuration require this explicit option even when a lock already exists. Without it, only packages with neither requirement may load their local path dependencies using declared content hashes.

    Missing or changed dependency content fails without materialization. A locked operation also rejects a missing or stale lock. The embedded compiler source set does not acquire a caller package lock or vendor dependency merely from the current directory.

    Operation

    링크

    Producer and terminal selection control which compiler result is inspected. Confirm the installed compiler support before choosing a producer.

    Option conditions

    링크

    --terminal applies to compiler observe or compiler preview only

    --producer applies to compiler preview only

    --producer requires --terminal rust-source

    --self-source requires compiler preview --producer stage2 --terminal rust-source

    --locked applies to package-mode check, run, emit, build, test, doc, bench, compiler observe, compiler preview. Selected-entry test also accepts it when --root contains topaz.toml.

    --compiler cannot be combined with bootstrap --producer or --self-source

    compiler preview requires --out-dir

    Without --producer, compiler preview supports only --terminal ast or typed

    --self-source does not accept an entry path

    --locked does not apply to --self-source

    Behavior contract

    링크
    규칙tools-commands-compiler-preview.rule.behavior

    Command behavior

    Arguments and rejection

    Use topaz compiler preview [entry] --out-dir <dir>. Accept --locked, --self-source, --root <dir>, --terminal ast, --terminal typed or --terminal rust-source, --producer stage1 or --producer stage2, and --language-version <version>.

    The default terminal is typed. Without a producer allow only ast or typed and use the linked compiler preview. AST preview requires one entry file. Typed preview allows an entry or package mode.

    An explicit producer requires --terminal rust-source. --self-source requires --producer stage2 --terminal rust-source, accepts no entry and conflicts with --locked. It selects the embedded compiler source set rather than a caller package.

    Require one output directory outside the selected source root. Reject --compiler, --verbose, compiler budget flags, format selectors, repeated options, equals forms, missing values, unsupported terminals and producers and every unlisted option. Reject --locked for an explicit standalone entry.

    Output

    Write a human completion line identifying the output directory to standard output after publishing a valid preview. Write producer failures and recovery guidance to standard error. No human banner is written before validation succeeds.

    The output is a topaz.compiler.observation-bundle/v1 directory with the requested AST, typed or generated source phase, diagnostic records and explicit producer provenance. Stage 1 and Stage 2 products retain the identities required by their own record schemas.

    --format json is rejected because the JSON and JSON Lines members are fixed bundle artifacts. A preview does not offer a separate stdout JSON report.

    Exit status

    Exit 0 only when a complete preview for the requested route is published.

    Exit 1 for invalid arguments, unsupported source or language profile, invalid package state, producer failure, invalid bundle data or unsafe or failed publication.

    A producer failure remains a failure. Recovery may recommend a new explicit compiler observe invocation, but this invocation must not execute it or silently downgrade its terminal.

    Filesystem effects

    Use the same outside source root check and managed bundle publication rules as compiler observe. Stage complete output and replace only an existing valid managed observation bundle.

    Read the selected source tree or embedded self source without modifying it. Retain existing output if replacement cannot be installed. Do not emit or run a native program.

    Network access

    Do not download a producer, compiler or dependency and do not contact a registry. Use only the explicitly admitted installed producer and local input facts.

    Reproducibility

    Successful runs without host resource failure are repeatable. Canonical preview bytes are stable for the same selected producer identity, source set and logical paths, package facts, language profile, terminal and installed product.

    Stage 1 and Stage 2 provenance may differ even when their semantic phases agree. Such a difference is meaningful evidence and remains visible to provenance comparison.

    Packages and locks

    Entry omission selects package mode except when --self-source selects the embedded compiler source set. Package mode validates the package and uses already materialized dependencies.

    --locked verifies the existing matching package lock without updating it. Registry dependencies and Lispex package configuration require this explicit option even when a lock already exists. Without it, only packages with neither requirement may load their local path dependencies using declared content hashes.

    Missing or changed dependency content fails without materialization. A locked operation also rejects a missing or stale lock. The embedded compiler source set does not acquire a caller package lock or vendor dependency merely from the current directory.

    이유

    Preview requests a particular compiler development route rather than the installed compiler selected by observe. Returning output from another route would conceal a producer failure. A terminal phase and explicit producer make the requested evidence precise.

    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.

    The reviewed recipe rejects an unknown terminal before preview generation. Successful preview, producer selection and managed bundle replacement require fixtures outside the execution allowlist.

    Example contract

    링크
    규칙tools-commands-compiler-preview.rule.invocation

    Example contract

    The invocation topaz compiler preview main.tpz --language-version 5.21 --terminal invalid is expected to exit with 1.

    Reject an unknown terminal before observation generation or compiler preview execution.

    이유

    The terminal selects which compiler representation an observation contains. Rejecting an unknown terminal prevents the command from silently choosing a different representation.

    Example

    링크

    Argument-rejection example

    링크
    main.tpzArgument-rejection example플레이그라운드 열기 →
    1. function identity<T>(value: T) -> T {
    2. value
    3. }
    대상 제품 5.21.3
    기대 결과

    기대 결과

    Textual rejection details remain Pending in the reference model. The independent Tools example gate expects exit 1.

    Reject an unknown terminal before observation generation or compiler preview execution.

    Verification scope

    링크

    Observed 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.

    Related references

    링크

    Compiler selection →

    Packages, locks and targets →

    메뉴

    다운로드 →