Some build systems such as CMake and Meson issue a compile_commands.json file intended to be read by linters.
This could be used as alternative to Dub to provide the import paths and other options.
The compile_commands.json provide one entry per source file with the build options:
Some build systems such as CMake and Meson issue a
compile_commands.json
file intended to be read by linters. This could be used as alternative to Dub to provide the import paths and other options.The
compile_commands.json
provide one entry per source file with the build options:It should be quite easy to parse the command field and extract the relevant import dirs, versions, debug flags etc.