This has happened to several people, and can be reproduced easily:
extract dmd 2.074.1
extract dmd 2.075.0 over it.
Write some code that imports std.datetime.
result: linker errors.
What is happening is 2.075 split std.datetime into a std.datetime package. This creates a situation where both std/datetime.d and std/datetime/package.d exist. The compiler imports the former and ignores the latter.
However, the library is built with only the package file, so the symbol mangling is completely different for the new version.
I propose that if the compiler sees such a situation, it should throw an ambiguity error instead of picking one or the other. This would at least prevent such head-scratching errors.
Comment #1 by aldacron — 2022-06-23T12:44:54Z
*** Issue 18123 has been marked as a duplicate of this issue. ***
Comment #2 by dlang-bot — 2022-09-03T12:15:26Z
@dkorpel created dlang/dmd pull request #14407 "Fix 17699 - Importing a module that has both modulename.d and modulename/package.d should be an error" fixing this issue:
- Fix 17699 - Importing a module that has both modulename.d and modulename/package.d should be an error
https://github.com/dlang/dmd/pull/14407
Comment #3 by robert.schadek — 2024-12-13T18:53:44Z