Open shadolight opened 5 years ago
release-debug is not "release + debug", it means "like release but with debug info".
This is a build type meant for profiling, and debugging an optimized binary.
Interesting... I did not realize that! Thanks for the clarification.
The misleading part (at least for me) is that, if you use visuald itself to create a project, it creates by default both a debug and a release configuration - obviously the .sln and .visualdproj then contain both configurations. (And this is standard for VS when you create a project irrespective of the language).
It would have been nice if dub did that too - at the moment dub overwrites any previously generated sln/visualdproj files, so if you want both you have to rename + merge the 2 configurations yourself.
I guess the issue is that dub generate and dub build is actually pretty similar in how you call it (i.e. pretty much the same API) and, since you only build a single configuration at a time, dubgenerate has the same behavior.
It is how it's done in C++; but it doesn't fit DUB very much. You can just generate a visuald project everytime.
dub generate -a <arch> -b debug -c <configuration>
dub generate -a <arch> -b release -c <configuration>
You want to prefer those two particular build types, but:
In the end it's easier to regenerate the .visuald with a script. You can use --combined to have a .sln with a single project too.
Sure, it is not the way dub is designed to work, and sure, you can generate the visuald project of your choice each time.
In fact, generating the release version for visuald with dub is actually a bit useless - for the same dub commandline "effort" to generate it you might as well just just build it! The only really useful configurations to build for visuald would be the 'debug'-related ones, although I can imagine it could be useful for some people to have all configurations added to the solution from a single 'dun generate visuald' invocation - maybe there are people that will prefer to get & fetch all the dependencies with dub (for which it is very good), but then to generate a VS solution once with all configurations included - and from there on switch to visuald 100% without needing dub again.
Personally I'm fine to switch between the 2, so not a high priority for me at all. So, yeah, probably not much of an issue if nobody else is asking for this - maybe someone (not sure who?) can close it.
System information
Bug Description
"Dub generate visuald" generates incorrect configurations when passed the "-b=release-debug" switch (with the intention to build both the Release and Debug configurations in a VisualD project with a single dub invocation):
<prj>
.visualdproj, but they are in fact identical release versions (and even share the same name). The<additionalOptions>
flag is correct:<additionalOptions>
flag is correct<additionalOptions>
flag is correct.Note there is a related bug present in "dub build", for which this issue has been opened.
How to reproduce?
Expected Behavior
1; 2 x 32 bit Configurations (1 x Debug and 1 x Release version) should be generated targeting COFF format:
2; 2 x 32 bit Configurations (1 x Debug and 1 x Release version) should be generated targeting OMF format:
3; 2 x 64 bit Configurations (1 x Debug and 1 x Release version) should be generated targeting COFF format: