Let user $DFLAGS override build settings as much as possible#2796
Let user $DFLAGS override build settings as much as possible#2796Geod24 merged 1 commit intodlang:masterfrom
Conversation
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
|
✅ PR OK, no changes in deprecations or warnings Total deprecations: 0 Total warnings: 0 Build statistics: statistics (-before, +after)
-executable size=5228376 bin/dub
-rough build time=62s
+executable size=5232472 bin/dub
+rough build time=61sFull build output |
|
Currently you can work around this by using |
Can you explain me how this solution would go as I didn't know you could do that? |
"dependencies": {
"vibe-d": { "version": "~>0.9", "dflags" : [ "-preview=in", "-revert=dtorfields" ] }
}It will apply transitively, so |
My issue is more of the flags being put in the wrong place and overwriten rather then not applying transitively: The same thing happens if I put There should be a way to have flags be passed later on the command line so that their values are respected, that's what I'm trying to fix. |
|
Have you tried |
|
@Geod24 I think there is a common use case which Dub doesn't support very well. While developers working on a given project may find that adding |
Yes, that fixes it, but my issue is not about having a way to disable it, it's having an easy-access way to do it. Editing the
I agree with this. Gentoo, for which I maintain D packages, does require disabling |
|
@the-horo : I can see the use case being useful, I myself had my share of similar issues. |
This change is mostly about being able to build programs without
-Werroror-w.dubsetting up so that warnings are errors by default can be nice for developers making their code more correct but it is useless for consumers. Currently, there is no way to disable that without modifying the project configuration to addallowWarningstobuildRequirements. Users should, at least, be able to add-witoDFLAGSand have the preference respected.This isn't so much a problem with
dmdorldcin my experience as they mostly report deprecations, the problem is withgdcwhere every deprecation is a warning and the-Werrormakes builds fail where they otherwise should have succeeded with only some warnings.