Is there a method to get multiple source roots for a file?
It's a strange ask, but like, for a given file - can we enumerate all of the source roots from that file down to repo root?
The only thing I've really come upon is
where I would populate each folder path for a file, all the way to root - which feels... blah
08/02/2022, 3:16 AM
Not really. A file only has one source root, which is the innermost matching dir.
So I think ascending the filesystem is the way to go
what's the use-case?
08/02/2022, 3:19 AM
I've run into this a few times before, and just left the problem until later.
The current use case is back to the C++ backend, using dependency inference to locate headers, when they don't match the source file usage.
I'm also using it to enumerate include directories for gcc