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

문서 검색

명세 6.0

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

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

    진단 TPZ5032

    An extern module is missing a deterministic replay fixture, has invalid replay data, or calls an entry not present in replay.

    Diagnostic and cause

    링크

    Invalid extern replay or sandbox binding

    계열
    topaz
    단계
    check
    코드
    TPZ5032

    원인과 조건

    An imported extern module needs a valid deterministic replay binding. Malformed replay data is rejected at the module import.

    대응

    Provide the replay fixture required by the declared extern module. Correct malformed fixture data and add the missing operation entry.

    Compiler phase: check/package.

    Compiler explanation: An extern module is missing a deterministic replay fixture, has invalid replay data, or calls an entry not present in replay.

    Message templates. The marker ⟨value⟩ stands for text computed for the reported program.

    • extern module ⟨value⟩ has an invalid deterministic replay binding: ⟨value⟩ Source

    An imported extern module needs a valid deterministic replay binding. Malformed replay data is rejected at the module import.

    규칙diagnostics.tpz5032.p5.rule

    Invalid extern replay or sandbox binding

    An imported extern module needs a valid deterministic replay binding. Malformed replay data is rejected at the module import.

    Response

    링크

    Provide the replay fixture required by the declared extern module. Correct malformed fixture data and add the missing operation entry.

    Reproduction and verification

    링크

    Rejected program

    링크
    main.tpzRejected program플레이그라운드 열기 →
    1. import host.math { twice }
    2. export function main(args: Array<string>, stdin: string) -> Result<int, string> {
    3. Ok(0)
    4. }
    기대 출력0이 아닌 종료 코드
    표준 출력 없음.
    $ topaz check --language-version 5.21 --compiler self · 대상 제품 5.21.3
    topaz.tomlRejected program플레이그라운드 열기 →
    1. [package]
    2. name = "diagnostic_extern"
    3. version = "0.1.0"
    4. language = "5.21"
    5. entry = "main.tpz"
    6. [extern.host.math]
    7. hash = "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    8. abi_hash = "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
    9. [[extern.host.math.functions]]
    10. name = "twice"
    11. params = ["int"]
    12. result = "int"
    13. [extern.host.math.replay]
    14. fixture = "replay/host-math.jsonl"
    15. [extern.host.math.sandbox]
    16. kind = "replay"
    replay/host-math.jsonlRejected program플레이그라운드 열기 →
    1. {"module":"host.math","function":"twice","args":"not-array","result":{"$":"int","value":"42"}}
    기대 결과

    기대 결과

    거절 단계 check. 종료 코드가 0이 아닙니다.

    • TPZ5032 →

      diagnostics-invalid-extern-replay at main.tpz:1:8

    This complete package fixture uses invocationArgs without a positional source file.

    Repaired program

    링크
    main.tpzRepaired program플레이그라운드 열기 →
    1. import host.math { twice }
    2. export function main(args: Array<string>, stdin: string) -> Result<int, string> {
    3. Ok(0)
    4. }
    기대 출력종료 코드 0
    $ topaz check --language-version 5.21 --compiler self · 대상 제품 5.21.3
    topaz.tomlRepaired program플레이그라운드 열기 →
    1. [package]
    2. name = "diagnostic_extern"
    3. version = "0.1.0"
    4. language = "5.21"
    5. entry = "main.tpz"
    6. [extern.host.math]
    7. hash = "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    8. abi_hash = "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
    9. [[extern.host.math.functions]]
    10. name = "twice"
    11. params = ["int"]
    12. result = "int"
    13. [extern.host.math.replay]
    14. fixture = "replay/host-math.jsonl"
    15. [extern.host.math.sandbox]
    16. kind = "replay"
    replay/host-math.jsonlRepaired program플레이그라운드 열기 →
    1. {"module":"host.math","function":"twice","args":[{"$":"int","value":"21"}],"result":{"$":"int","value":"42"}}
    기대 결과

    기대 결과

    검사가 프로그램을 받아들입니다. 종료 코드 0.

    This complete package fixture uses invocationArgs without a positional source file.

    메뉴

    다운로드 →