Diagnostic and cause
링크Physical path escapes root
- 계열
- topaz
- 단계
- resolve
- 코드
TPZ3005
원인과 조건
An imported source whose canonical physical path lies outside the selected root is rejected with TPZ3005 before its source is loaded.
관련 규칙 · Trigger and repair →대응
Place the source inside the root or choose a root that contains its physical location. Check symbolic-link targets as well as import spellings.
Compiler phase: resolve.
Compiler explanation: A module resolves through a physical path or symlink outside the module root.
Message templates. The marker ⟨value⟩ stands for text computed for the reported program.
- the entry
⟨value⟩resolves outside the root (symlink/alias containment) Source ⟨value⟩resolves outside the root (symlink/alias containment) Source
The imported path crosses a symbolic link to a physical source outside the selected root. Textual containment of the import path does not admit the target.
Trigger and repair
An imported source whose canonical physical path lies outside the selected root is rejected with TPZ3005 before its source is loaded.
Response
링크Place the source inside the root or choose a root that contains its physical location. Check symbolic-link targets as well as import spellings.
Reproduction and verification
링크Product diagnostic test
링크import lib
export let value = 1
기대 결과
기대 결과
The separate diagnostic product test validates this command, runtime diagnostic, or filesystem setup. The shared example runner does not execute that assertion plan.
Prepare the files shown above, then complete this setup.
Create the symbolic link root/ with target .. Keep the link and its target within the same temporary test directory.
Run topaz check root/.
Expect exit status 1, empty standard output, and TPZ3005.
The imported path crosses a symbolic link to a physical source outside the selected root. Textual containment of the import path does not admit the target.
The primary location is root/.
Expect exactly one diagnostic.
The diagnostic product test checks these expectations with the same files and command.
Corrected program
링크import lib
export let value = 1
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
This program applies the repair described above. The verification status records whether it has been run.