Cherry on top for redub: looking for a module import analyzer

Hipreme msnmancini at hotmail.com
Wed Jul 24 12:29:37 UTC 2024


It is possible to make root builds way faster, specially for 
those which contains a lot of code. That being said, I would need 
an implementation of import analyzing library.

It should work as simply as: send a source file path and import 
paths then  it returns: the imported files by this file which it 
were found on:

```d

struct SourceFile
{
     string importPath, string sourcePath;
}

SourceFile[] getDependencies(string inputFile, string[] 
importPaths);

```

If that kind of work has been done in this area, I could do an 
improvement to redub.
Keep in mind that this is not a guaranteed improvement since the 
time it needs to analyze the imports can't be greater than the 
time won by using object files.




More information about the Digitalmars-d mailing list