Diagnostic and cause
링크Extern declaration problem
- 계열
- topaz
- 단계
- resolve
- 코드
TPZ5030
원인과 조건
Import each extern module by an identity declared in topaz.toml. A missing module under an already declared extern namespace is rejected as TPZ5030.
관련 규칙 · Extern declaration problem →대응
Declare the extern interface in topaz.toml and check its names and signatures. Import the module identity that the package declares.
Compiler phase: check/package.
Compiler explanation: An extern module or function declaration is missing, malformed, duplicated, or not declared for an imported extern module.
Message templates are Pending. The explanation above is not an observed CLI message.
Import each extern module by an identity declared in topaz.toml. A missing module under an already declared extern namespace is rejected as TPZ5030.
Extern declaration problem
Import each extern module by an identity declared in topaz.toml. A missing module under an already declared extern namespace is rejected as TPZ5030.
Response
링크Declare the extern interface in topaz.toml and check its names and signatures. Import the module identity that the package declares.
Reproduction and verification
링크Rejected program
링크import host.missing { twice }export function main(args: Array<string>, stdin: string) -> Result<int, string> {Ok(0)}
표준 출력 없음.[package]name = "diagnostic_extern"version = "0.1.0"language = "5.21"entry = "main.tpz"[extern.host.math]hash = "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"abi_hash = "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"[[extern.host.math.functions]]name = "twice"params = ["int"]result = "int"[extern.host.math.replay]fixture = "replay/host-math.jsonl"[extern.host.math.sandbox]kind = "replay"
{"module":"host.math","function":"twice","args":[{"$":"int","value":"21"}],"result":{"$":"int","value":"42"}}
기대 결과
This complete package fixture uses invocationArgs without a positional source file.
Repaired program
링크import host.math { twice }export function main(args: Array<string>, stdin: string) -> Result<int, string> {Ok(0)}
[package]name = "diagnostic_extern"version = "0.1.0"language = "5.21"entry = "main.tpz"[extern.host.math]hash = "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"abi_hash = "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"[[extern.host.math.functions]]name = "twice"params = ["int"]result = "int"[extern.host.math.replay]fixture = "replay/host-math.jsonl"[extern.host.math.sandbox]kind = "replay"
{"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.