Перейти к содержимому
Топаз6.0 · До релиза
Загрузка →

Поиск в документации

Спецификация 6.0

Выберите результат стрелками и нажмите Enter, чтобы открыть его.

Введите имя API, номер диагностики, правило или тему проекта.

    Диагностика TPZ3001

    An import path could not be resolved under the active module root.

    Diagnostic and cause

    Ссылка

    Unresolved module

    Семейство
    topaz
    Этап
    resolve
    Код
    TPZ3001

    Причина и условия

    An import of a user module requires a source file at the exact dotted path under the selected root. A missing file produces TPZ3001.

    Действия

    Add the module at its dotted path or correct the import spelling. Export the declarations that importers need.

    Compiler phase: resolve.

    Compiler explanation: An import path could not be resolved under the active module root.

    Message templates. The marker ⟨value⟩ stands for text computed for the reported program.

    • entry file ⟨value⟩ does not exist Source

    Observed for the candidate in Topaz 5.21.3. Execution

    • error[TPZ3001]: no module file for missing (expected missing.tpz by exact scalars)

    The imported user module has no source file at its exact path under the selected root. The example imports missing without providing missing.tpz.

    Правилоdiagnostics.tpz3001.rule

    Trigger and repair

    An import of a user module requires a source file at the exact dotted path under the selected root. A missing file produces TPZ3001.

    Response

    Ссылка

    Add the module at its dotted path or correct the import spelling. Export the declarations that importers need.

    Reproduction and verification

    Ссылка

    Rejected program

    Ссылка
    example.tpzRejected programОткрыть песочницу →
    1. import missing
    Ожидаемый выводНенулевой код завершения
    Нет стандартного вывода.
    $ topaz check example.tpz · Целевой продукт 5.21.3
    Ожидаемый результат

    Ожидаемый результат

    Этап отклонения resolve. Ненулевой код завершения.

    The expected diagnostic, cause, source location, and accompanying diagnostics are specified below. The verification status records whether this program has been run.

    Corrected program

    Ссылка
    example.tpzCorrected programОткрыть песочницу →
    1. import missing
    Ожидаемый выводКод завершения 0
    $ topaz check example.tpz · Целевой продукт 5.21.3
    missing.tpzCorrected programОткрыть песочницу →
    1. export let value = 1
    Ожидаемый результат

    Ожидаемый результат

    Проверка принимает программу. Код завершения 0.

    This program applies the repair described above. The verification status records whether it has been run.

    Меню

    Загрузка →