Closed ghost closed 10 years ago
Btw, are comment lines supported in a package file? Thought #
might work, but no dice. The package format page doesn't seem to mention comments.
JSON doesn't support comments.
In another ticket it was talked about how comments could fit in and Sönke suggested SDL which does seem like a more proper fit for dub project files because it also has more features (tags, namespaces, attributes, comments, with values: dates, times, strings, numbers, floats, arrays...).
https://github.com/Abscissa/SDLang-D
it looks like xml & json merged together:
<tag ns:attribute="value" ns2:attribute2="2014/04/15"><othertag person="name" /></tag>
would be:
tag ns:attribute="value" \ -- notice the line break
ns2:attribute2=2014/04/15 {
othertag person="name" # some comment
// othertag person="name2" => 2 entries make an array?
/* notag because:commented="out" */
}
which D can use as a tree and loop through / select based on attributes and namespaces, and I like this option, it wouldn't be breaking to add it aside
Typically dub will complain when I don't specify mainSourceFile, but when I have example code where the only sources I need is one single file then using
mainSourceFile
alone is not enough, e.g.:This will create a linker error, even though
mainSourceFile
is the only file I need. As a workaround I have to duplicate the work and writesourceFiles
:I'd rather avoid having to copy-paste a lot.