zig
zig copied to clipboard
Zig correctly imports files using incorrect import paths
Zig Version
0.10.0-dev.3383+3cf8f283d
Steps to Reproduce
Wasn't able to reproduce locally with a new Zig project, but you can see the bug in the following files:
- https://github.com/getty-zig/getty/blob/6a1ea14ec84b55ea5371db64084d0eda5f8493bc/src/ser/interfaces/map.zig#L1
- https://github.com/getty-zig/getty/blob/6a1ea14ec84b55ea5371db64084d0eda5f8493bc/src/ser/interfaces/seq.zig#L1
- https://github.com/getty-zig/getty/blob/6a1ea14ec84b55ea5371db64084d0eda5f8493bc/src/ser/interfaces/structure.zig#L1
The import paths are incorrect. They should be ../../lib.zig
, not ../../../lib.zig
. The latter lands us in the root of the project instead of in src/
, which is where lib.zig
is.
Expected Behavior
Since the import paths are incorrect, a compiler error should have been raised.
Actual Behavior
Everything compiles successfully, tests are ran with no issues, and the project works perfectly fine as a package, with absolutely no issues whatsoever related to the aforementioned files.