Closed ZILtoid1991 closed 2 weeks ago
As in dub.sdl? It’s already supported by internally using dub to convert to .json. Although removing the dependency on dub would be nice.
If it is simple to do it, I may do it.
There are 2 ways to do it:
IMHO, there is no reason for dub to have more than 1 format. This only makes its codebase more extensive and diverges community from following a standard. What I indeed think it would be better was using json with comments, but I don't want to diverge that much from what dub project done.
By the way, wha tdo you mean with "some kind of build script"?
Adding an option for some kind of build script. Most other build system have a pretty complex script system, that can do things. It would be nice for things like either getting it to download a binary for a C library, checking other dependencies, etc.
Since I do that more or less of that in my build selector tool for Hipreme Engine, I really doubt that I would do that here. Also, doing languages is far harder than using APIs. I thought about making redub use plugin scripts, but since I don't have too many uses for it since I already use it as a library, I didn't do it.
SDL support improved through dub's SDL -> JSON conversion caching. It will only ever do the conversion if SDL is newer than json or if JSON wasn't created
Have got some ideas on how to integrate at least build plugins.
"plugins": {
"genmodules": "some/path/genmodules.d"
}
"preBuildPlugins": {
"genmodules": ["inputFile", "outputFile"]
}
Then it would work like this: import redub.api;
mixin entrypoint(!((ref ProjectDetails d)
{
//modify project details here
return true;
)};
This issue was closed since v1.14.0 with the addition of redub plugins: https://github.com/MrcSnm/redub?tab=readme-ov-file#redub-plugins
With that , you got your custom build scripts (I've done that for removing rdmd from my engine also)
I did think about writing my own SDL parser, as I use that a lot in my projects, and I also have appropriated the components of the old std.experimental.xml (now newxml) project, so I can use its lexer and take influences from the design of the XML DOM (current SDL DOM is primitive).