Skip to content
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

Merged
merged 1 commit into from Oct 22, 2012
Merged

Deprecation (dmd-1.x) #909

merged 1 commit into from Oct 22, 2012

Conversation

llucax
Copy link
Contributor

@llucax llucax commented Apr 25, 2012

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.

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).
@ghost ghost assigned WalterBright Sep 25, 2012
@andralex
Copy link
Member

This is tied to #908. dmd developers, please merge or reject in lockstep.

@yebblies
Copy link
Member

yebblies commented Oct 7, 2012

The corresponding D2 pull request has been merged.

@llucax
Copy link
Contributor Author

llucax commented Oct 7, 2012

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).

@braddr
Copy link
Member

braddr commented Oct 7, 2012

@WalterBright Which is easier for d2 -> d1 syncing? You end to be the one that does them all.

WalterBright added a commit that referenced this pull request Oct 22, 2012
@WalterBright WalterBright merged commit 2343302 into dlang:dmd-1.x Oct 22, 2012
@WalterBright
Copy link
Member

Sigh, it doesn't compile:

dmc -c -I..\root;\dm\include -o -cpp -DDM_TARGET_CPU_X86=1 dsymbol
{
^
dsymbol.c(210) : Error: 'getLoc' is not a member of 'Dsymbol'
if (!loc.filename) // avoid bug 5861.
^
dsymbol.c(211) : Error: undefined identifier 'loc', did you mean 'Loc'?
Module *m = getModule();
^
dsymbol.c(213) : Error: undefined identifier 'getModule'
loc.filename = m->srcfile->toChars();
^
dsymbol.c(216) : Error: invalid simple type name destructor
return loc;
^
dsymbol.c(218) : Error: reference must refer to same type or be const
Fatal error: too many errors
--- errorlevel 1

@WalterBright
Copy link
Member

Ignore that, my fault.

@llucax
Copy link
Contributor Author

llucax commented Oct 22, 2012

@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.

@llucax
Copy link
Contributor Author

llucax commented Oct 22, 2012

OK, it wasn't as outdated as I thought, here are a couple of very minor fixes and cleanups: #1206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants