How would people feel about having
sconsUtils targets that generate files useful for editor integrations?
I’ve already got a script for VSCode+Python that works okay as something I run manually, but build integration would both make it more convenient and provide a nice way to make it available to others.
I started looking into doing the same for C++ today, but it looks like trying to tell VSCode about C++ include paths without doing something inside
sconsUtils is probably impossible. I assume the same is true for any other editor, because you can’t currently process our dependency-declaration information (the stuff in
ups/<package>.cfg) without actually being inside a
I haven’t thought this through in detail, but I’m thinking maybe having explicit targets for different editors, maintained on a totally volunteer basis, which would write whatever files are helpful for that editor. Those targets would of course not be included in the default build target.
An alternative might be to just have sconsUtils export any information an editor or other tool might want in a generic format. I don’t know of any well-established standard for that for C++, aside from perhaps CMake’s CMAKE_EXPORT_COMPILE_COMMANDS JSON format - but that isn’t something editors can necessarily read natively, and it would require downstream tools to parse information out of command-line arguments that
sconsUtils knows directly. A custom format might be better, such as a JSON or YAML file that maps more directly to the
SCons environment content.