-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let user $DFLAGS override build settings as much as possible #2796
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=61s Full 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
-Werror
or-w
.dub
setting 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 addallowWarnings
tobuildRequirements
. Users should, at least, be able to add-wi
toDFLAGS
and have the preference respected.This isn't so much a problem with
dmd
orldc
in my experience as they mostly report deprecations, the problem is withgdc
where every deprecation is a warning and the-Werror
makes builds fail where they otherwise should have succeeded with only some warnings.