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.
Связанное правило · Invalid extern replay or sandbox binding →Действия
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.
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
Ссылка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":"not-array","result":{"$":"int","value":"42"}}
Ожидаемый результат
Ожидаемый результат
Этап отклонения check. Ненулевой код завершения.
diagnostics-invalid-extern-replay at
main.tpz:1:8
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.