Diagnostic and cause
СсылкаModule path collision
- Семейство
- topaz
- Этап
- resolve
- Код
TPZ3004
Причина и условия
A module path is rejected with TPZ3004 when two same-kind sibling entries match the same normalized or case-folded module name.
Связанное правило · Trigger and repair →Действия
Rename or remove one candidate, then update its imports. Keep module path spellings distinct after normalization and case folding.
Compiler phase: resolve.
Compiler explanation: Two physical module candidates collide under exact, normalized, or folded path identity.
Message templates. The marker ⟨value⟩ stands for text computed for the reported program.
- the path
⟨value⟩collides with another candidate under the module name keys⟨value⟩ Source - the modules
⟨value⟩and⟨value⟩resolve to the same physical file; one physical file cannot have two module identities Source
Observed for the candidate in Topaz 5.21.3. Execution
- error[TPZ3004]: the path
libcollides with another candidate under the module name keys: Lib.tpz / lib.tpz
More than one filesystem entry matches a module segment after Unicode normalization or case folding. Here lib.tpz and Lib.tpz collide on a filesystem that preserves both names.
Trigger and repair
A module path is rejected with TPZ3004 when two same-kind sibling entries match the same normalized or case-folded module name.
Response
СсылкаRename or remove one candidate, then update its imports. Keep module path spellings distinct after normalization and case folding.
Reproduction and verification
СсылкаRejected program
Ссылкаimport lib
Нет стандартного вывода.export let value = 1
export let other = 2
Ожидаемый результат
Ожидаемый результат
Этап отклонения resolve. Ненулевой код завершения.
diagnostic-tpz3004 at
example.tpz:1:8
The expected diagnostic, cause, source location, and accompanying diagnostics are specified below. The verification status records whether this program has been run.
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.