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
Deprecation (dmd-1.x) #909
Conversation
The deprecation() function works similar to the error() or warning() functions but only prints messages if global.params.useDeprecated is false. If it is, it uses the error() function to actually print the messages and halt the program. This patch also tries to make the messages consistent with the behaviour. Some messages said that some feature was deprecated when it has been completely removed in reality and should be plain errors or vice versa. Finally, deprecations are reported with Deprecation instead of Error (and all the error messages are normalized and produced by a single function).
This is tied to #908. dmd developers, please merge or reject in lockstep. |
The corresponding D2 pull request has been merged. |
I can update this pull request too if needed, just let me know (since Walter tend to do all D1 merging himself I'm not sure it makes any sense to do so). |
@WalterBright Which is easier for d2 -> d1 syncing? You end to be the one that does them all. |
Sigh, it doesn't compile: dmc -c -I..\root;\dm\include -o -cpp -DDM_TARGET_CPU_X86=1 dsymbol |
Ignore that, my fault. |
@WalterBright That patch was outdated though, I wouldn't be surprised if it didn't compile (o at least merge), I was waiting for feedback. I'll take a look at the D1 code, update any missing bits and do a new pull request. |
OK, it wasn't as outdated as I thought, here are a couple of very minor fixes and cleanups: #1206 |
The deprecation() function works similar to the error() or warning()
functions but only prints messages if global.params.useDeprecated is
false. If it is, it uses the error() function to actually print the
messages and halt the program.
This patch also tries to make the messages consistent with the
behaviour. Some messages said that some feature was deprecated when it
has been completely removed in reality and should be plain errors.