Release D 2.102.0

Steven Schveighoffer schveiguy at gmail.com
Thu Feb 2 15:56:56 UTC 2023


On 2/2/23 10:01 AM, jmh530 wrote:

> I was reading through some of the PRs referenced in [issue 
> 23548](https://issues.dlang.org/show_bug.cgi?id=23548), and a little 
> confused by the takeaway. It currently searches for Di, then D files. If 
> it finds none of them, then it searches for C/h files. Is that right? Is 
> this search order described in the spec anywhere?

Previously, it would search in each path, and look for the files in the 
order of di, then d, then i, then c. So based on the order of the paths, 
it might find a matching C file before a matching D file in a later 
import path.

Now, it searches all the paths for D files first, then all the paths for 
C files second, ensuring that it will prefer D files.

The spec I don't think covers how files are searched for module 
definitions. The compiler command line docs have some information on 
what files are expected to contain, but doesn't seem to specify 
priorities or how they are searched. I don't know if it should be 
covered in the spec or the compiler docs.

-Steve


More information about the Digitalmars-d-announce mailing list