Fix Issue 19107 - -de produces compilation error, -dw does not#8519
Fix Issue 19107 - -de produces compilation error, -dw does not#8519wilzbach merged 2 commits intodlang:masterfrom JinShil:fix_19107
Conversation
|
Thanks for your pull request, @JinShil! Bugzilla references
|
|
I think this will reveal a lot of potential problems in the D ecosystem that will need to be fixed as certain warnings and deprecations have been gagged for years. |
|
This is indirectly blocking #8443 |
|
Have you checked if this has any impact on performance? Not a dmd expert but performing semantics twice sounds like might be expensive. As an alternative, would it be possible to count if any warning/deprecation messages would have been emitted during gagging, and only run the semantics a second time in that case? |
It appears Line 4791 in 750f024
Yeah, I think I can do that. Other reviewers, please let me now if that is preferred. |
|
With dlang/phobos#6642 merged (Thank you!), how can I cause this PR to pick up the new bits? I thought it would do it automatically. Do I need to wait, or initiate a new commit hash, or just close and re-open the PR? |
|
I just found out this same pattern, running semantic twice, is used elsewhere in the compiler: Lines 3439 to 3458 in 750f024 |
Implemented as a second commit. |
Only auto-tester will rebuild after another PR has been merged, all other CI require a new commit hash (some do a rebuild after close/reopen, but not all). For all of them there's a way to restart them via their Web interface, but it's typically a very painful process (especially now that we have so many). |
DAutoTest too.
What's ga and gp? |
Part of my local aliases. Sorry forgot that they are non-standard. |
|
There's |
Do you mean If you mean we should display deprecations when |
Sorry, I was trying to suggest instead of counting for the warnings (and then re-running the semantic), you could immediately print them directly if a respective global flag like (It assumed that was what |
|
I think that would mean that the user will see warnings/deprecations from speculative attempts at resolving semantics that are expected to fail. |
|
Yes I understood that, but I was talking about the fact that there's only one place where |
|
I don't think that will work because you only want to show deprecation messages if the entire |
|
@CyberShadow What's up with DAutoTest? Is it a dub failure? |
|
Definitely a Dub failure, though never saw it print an error in that format before. @wilzbach Do you know? It looks like it tried all those mirrors already? Also I thought treating network failures as "No versions" was due to be fixed. Or was it not a network failure? |
|
Not sure why it spuriously appears, but maybe dlang/dub#1513 helps at least in the future. |
|
@CyberShadow I've tried re-running DAutoTest several times, and it just won't pass. Other PRs I've submitted pass fine. Could you please dig a little bit and see if you can find anything? |
|
The Actually, the stable branch has been failing to build for a while now: http://dtest.dlang.io/history/stable @wilzbach Any idea if anything between that success/failure could have introduced a regression? |
No. Sorry, we haven't done much at dlang.org (https://github.com/dlang/dlang.org/commits/master) in the last weeks. However, I agree that this is unrelated - I have seen this error way too often over the last week :/ |
|
FYI: this will also help #7241 to move forward. |
On the long run we should probably use a more elegant solution, like having a queue of gagged errors/deprecations/warnings and just print them without having to copy parts of the AST and perform semantic twice. This would negligibly increase the memory usage, but it will increase performance. |
|
A naive attempt at fixing our problem by bumping the dub version used at dlang.org: dlang/dlang.org#2432 |
|
Seems like DAutoTest is entirely broken for |
Due to the error gagging, deprecations are not being displayed in
typeSemantic. This PR remedies that by runningtypeSemanticagain without gagging if it previously succeeded. It's not a very elegant solution, but I don't think there's any other way without a major DMD refactor.See discussion in the following PRs for more context:
CyberShadow/ae#33
#8443
cc @CyberShadow