Skip to content
Topaz6.0 · Before release
Download

Search documentation

Specification 6.0 · Not released · Tested product 5.21.3

Use arrow keys to choose a result. Press Enter to open.

Type an API name, diagnostic number, rule, or project topic.

    Diagnostics

    TPZ3002: Entry is outside module root

    The selected entry file is not contained by the active module root.

    Diagnostic and cause

    Link

    Entry 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.

    Response

    Pass the direct entry path without .. and choose a root directory that contains the entry.

    Source evidence

    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.

    Rulediagnostics.tpz3002.rule

    Trigger and repair

    An entry path containing a complete .. segment is rejected with TPZ3002 before the resolver requests source files.

    Source evidence

    Response

    Link

    Pass the direct entry path without .. and choose a root directory that contains the entry.

    Reproduction and verification

    Link

    Product diagnostic test

    Link
    example.tpzProduct diagnostic testOpen in Playground
    1. let value = 1
    target product 5.21.3
    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/../example.tpz --language-version 5.21.

    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/../example.tpz:1:1.

    Expect exactly one diagnostic.

    The diagnostic product test checks these expectations with the same files and command.

    Source evidence

    Corrected program

    Link
    example.tpzCorrected program
    1. let value = 1
    Expected outputexit 0
    $ topaz check example.tpz · target product 5.21.3
    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

    Menu

    Download