-
-
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
make deprecationWarnings/Errors consistent #2553
base: master
Are you sure you want to change the base?
Conversation
I can't think of why it would converge, unless this is to do with not having a separation between deprecation and warnings. |
(accidentally closed)
yes that's exactly what converged, because DUB treats warnings as errors by default, but in other compilers deprecations are not warnings. So in GDC deprecations used to error, but in other compilers they didn't. This PR changes that. |
@ibuclaw : IMHO the lack of separation between deprecations and warnings is quite problematic. The approach taken by DMD here is, I think, the more sensible one. I assume you just hooked into GCC's machinery and that's what it does by default ? |
Yes. And the problem is that dmd (the front-end) has warnings. |
Yes, but it's unlikely to change anytime soon. |
I think having warnings that you can individually turn on and off, making them error, log or ignore, is a better approach than what DMD has. So I think what GDC does is actually quite useful and this PR makes DUB use that functionality to make GDC behave like the other compilers. (and the user can still restrict and extend it further) |
Oh yes. :-)
|
c52f662
to
0e06f83
Compare
✅ PR OK, no changes in deprecations or warnings Total deprecations: 14 Total warnings: 0 Build statistics: statistics (-before, after)
-executable size=5331080 bin/dub
-rough build time=91s
executable size=5331144 bin/dub
rough build time=80s Full build output
|
There was different behavior in GDC and deprecationWarnings did not perform expected results with DMD and LDC.
0e06f83
to
c045f1d
Compare
There was different behavior in GDC and deprecationWarnings did not perform expected results with DMD and LDC.
I added
-Wextra
to GDC, but haven't had a response from @ibuclaw yet if we should or should not include it here.GDC emits deprecation warnings when importing deprecated modules (which makes sense I think), but this diverges from the other compilers. This was the initial reason why I noticed that deprecations break builds, which didn't happen with other compilers. (dub_test_root imports all modules, even if they are deprecated)
We should probably also fix
dub_test_roots
to emitdeprecated static import
for deprecated symbols, as well as handling them properly. But I think that's for another PR.