Diagnostic and cause
LinkEntry is outside module root
- Family
- topaz
- Phase
- resolve
- Code
TPZ3002
Cause and conditions
An entry path containing a complete .. segment is rejected with TPZ3002 before the resolver requests source files.
Related rule: Trigger and repairResponse
Pass the direct entry path without .. and choose a root directory that contains the entry.
Source evidence
- compiler/crates/topaz_diag/src/explain.rs at
151141d7bb44· 351-359 - compiler/crates/topaz_self_frontend/topaz/resolver/graph.tpz at
151141d7bb44· 555-555 - compiler/crates/topaz_self_frontend/topaz/resolver/graph.tpz at
151141d7bb44· 542-568 - compiler/crates/topaz_self_frontend/topaz/resolver.tpz at
151141d7bb44· 64-87 - compiler/crates/topaz_cli/src/compile/check.rs at
151141d7bb44· 284-341 - compiler/crates/topaz_kernel/src/lib.rs at
151141d7bb44· 294-315 - compiler/crates/topaz_resolve/src/provider.rs at
151141d7bb44· 291-300 - compiler/crates/topaz_cli/src/compile/self_host.rs at
151141d7bb44· 822-851 - TPZ3002 at
f42fbeb4f27e - TPZ3002 repair at
151141d7bb44
Compiler phase: resolve.
Compiler explanation: The selected entry file is not contained by the active module root.
Message templates are Pending. The explanation above is not an observed CLI message.
The entry or root contains a parent path segment. The resolver also rejects a root equal to the entry or a root that does not contain it. The CLI checks the latter two cases before resolution.
Trigger and repair
An entry path containing a complete .. segment is rejected with TPZ3002 before the resolver requests source files.
Source evidence
- compiler/crates/topaz_self_frontend/topaz/resolver/graph.tpz at
151141d7bb44· 542-568 - compiler/crates/topaz_self_frontend/topaz/resolver.tpz at
151141d7bb44· 64-87 - compiler/crates/topaz_cli/src/compile/check.rs at
151141d7bb44· 284-341 - compiler/crates/topaz_kernel/src/lib.rs at
151141d7bb44· 294-315 - compiler/crates/topaz_resolve/src/provider.rs at
151141d7bb44· 291-300 - compiler/crates/topaz_cli/src/compile/self_host.rs at
151141d7bb44· 822-851 - TPZ3002 at
f42fbeb4f27e - TPZ3002 repair at
151141d7bb44
Response
LinkPass the direct entry path without .. and choose a root directory that contains the entry.
Reproduction and verification
LinkProduct diagnostic test
Linklet value = 1
Expected result
Expected result
The separate diagnostic product test validates this command, runtime diagnostic, or filesystem setup. The shared example runner does not execute that assertion plan.
Run topaz check parent/.
Expect exit status 1, empty standard output, and TPZ3002.
The entry or root contains a parent path segment. The resolver also rejects a root equal to the entry or a root that does not contain it. The CLI checks the latter two cases before resolution.
The primary location is parent/.
Expect exactly one diagnostic.
The diagnostic product test checks these expectations with the same files and command.
Source evidence
- compiler/crates/topaz_self_frontend/topaz/resolver/graph.tpz at
151141d7bb44· 542-568 - compiler/crates/topaz_self_frontend/topaz/resolver.tpz at
151141d7bb44· 64-87 - compiler/crates/topaz_cli/src/compile/check.rs at
151141d7bb44· 284-341 - compiler/crates/topaz_kernel/src/lib.rs at
151141d7bb44· 294-315 - compiler/crates/topaz_resolve/src/provider.rs at
151141d7bb44· 291-300 - compiler/crates/topaz_cli/src/compile/self_host.rs at
151141d7bb44· 822-851 - TPZ3002 at
f42fbeb4f27e - TPZ3002 repair at
151141d7bb44
Corrected program
Linklet value = 1
Expected result
Expected result
Checking accepts the program. Exit code 0.
This program applies the repair described above. The verification status records whether it has been run.
Source evidence
- compiler/crates/topaz_self_frontend/topaz/resolver/graph.tpz at
151141d7bb44· 542-568 - compiler/crates/topaz_self_frontend/topaz/resolver.tpz at
151141d7bb44· 64-87 - compiler/crates/topaz_cli/src/compile/check.rs at
151141d7bb44· 284-341 - compiler/crates/topaz_kernel/src/lib.rs at
151141d7bb44· 294-315 - compiler/crates/topaz_resolve/src/provider.rs at
151141d7bb44· 291-300 - compiler/crates/topaz_cli/src/compile/self_host.rs at
151141d7bb44· 822-851 - TPZ3002 at
f42fbeb4f27e - TPZ3002 repair at
151141d7bb44