You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error messages spell file paths differently between runs when an import directory is added twice #1246
When the same directory is on the import path under two spellings, error messages name files with whichever spelling the import-directory set happens to yield first. That order changes between processes, so the same command prints different paths.
Repro
deduce.py already adds the stdlib directory as an absolute path, and --dir lib adds it again as a relative path:
for seed in 1 2 3 4; do
PYTHONHASHSEED=$seed python deduce.py --dir lib test/should-error/private_lemma_hint_stdlib.pf 2>&1 \
| grep -o "in module Nat ([^)]*)"
done
Observed
in module Nat (lib/NatMult.pf:21)
in module Nat (lib/NatMult.pf:21)
in module Nat (/home/runner/deduce/lib/NatMult.pf:21)
in module Nat (/home/runner/deduce/lib/NatMult.pf:21)
Expected
The same output on every run. Either normalize import directories when adding them (flags.add_import_directory, e.g. resolve to one canonical form so duplicates collapse), or search them in a fixed order (flags.import_directories is a set[str]).
Where found
While comparing diagnostics for every test/should-validate and test/should-error file between processes for the prelude-snapshot work (#1217). Three files differed only in this path spelling, including between two runs that did not use a snapshot. The comparison script had added lib and the absolute lib/ path. CI doesn't add the same directory twice, so the .err fixtures stay stable.
Activity
Search import directories in a fixed order, once each (#1246) (#1300)