aboutsummaryrefslogtreecommitdiff
path: root/src/Package.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2022-11-27 14:17:55 +0000
committermlugg <mlugg@mlugg.co.uk>2023-01-22 19:00:03 +0000
commit5f9186d0ce78ce1eb7db9634849b38d2e90d071e (patch)
treeab46e6e77fe60874eb9f52779196ecbd8e4deabc /src/Package.zig
parent6d71d79dc27ddd6f66913a34fd6cd40691a8c959 (diff)
downloadzig-5f9186d0ce78ce1eb7db9634849b38d2e90d071e.tar.gz
zig-5f9186d0ce78ce1eb7db9634849b38d2e90d071e.zip
AstGen: detect and error on files included in multiple packages
Previously, if a source file was referenced from multiple packages, it just became owned by the first one AstGen happened to reach; this was a problem, because it could lead to inconsistent behaviour in the compiler based on a race condition. This could be fixed by just analyzing such files multiple times - however, it was pointed out by Andrew that it might make more sense to enforce files being part of at most a single package. Having a file in multiple packages would not only impact compile times (due to Sema having to run multiple times on potentially a lot of code) but is also a confusing anti-pattern which more often than not is a mistake on the part of the user. Resolves: #13662
Diffstat (limited to 'src/Package.zig')
0 files changed, 0 insertions, 0 deletions