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

Issue 5481 - Support deprecated("message") #463

Merged
merged 1 commit into from Oct 7, 2012
Merged

Conversation

yebblies
Copy link
Member

Add an optional message to deprecated.

@andralex
Copy link
Member

This is a highly useful feature. I think we should merge it in and document it properly.

@ghost
Copy link

ghost commented Sep 29, 2012

If the code to handle @disable is similar to @deprecated we could consider implementing messages for the former too in another pull request. http://d.puremagic.com/issues/show_bug.cgi?id=8728

@nazriel
Copy link
Contributor

nazriel commented Oct 6, 2012

LGTM 👍
Indeed it is very useful.

@yebblies what do you think about adding unittest for failure (without -d) and asserting about correct deprecated message being displayed?

@9rnsr @dawgfoto what you think?

@yebblies
Copy link
Member Author

yebblies commented Oct 6, 2012

@nazriel Does the autotester support that? I don't remember any other tests that check the output from dmd.

@dnadlinger
Copy link
Member

@yebblies: Kenji recently added support for that, see e.g. 21f32ed.

@nazriel
Copy link
Contributor

nazriel commented Oct 6, 2012

@yebblies won't https://github.com/D-Programming-Language/dmd/blob/master/test/d_do_test.d#L178 work?
I think I saw it somewhere in action for Error message enhancement PR

Edit: Ups, @klickverbot was faster. And yea, that's exactly the PR I was looking for.

@yebblies
Copy link
Member Author

yebblies commented Oct 6, 2012

Awesome, done. The duplicated error messages are caused by a different bug.

@nazriel
Copy link
Contributor

nazriel commented Oct 6, 2012

Umm, auto tester bug or I am blind? Because I see no difference between expected and actual output (for example here http://d.puremagic.com/test-results/pull.ghtml?runid=316239)

DOWN: so the latter. NOT good *grins

@yebblies
Copy link
Member Author

yebblies commented Oct 6, 2012

Path separators

@WalterBright
Copy link
Member

LGTM

@braddr
Copy link
Member

braddr commented Oct 6, 2012

This pull needs a quick rebase due to a conflict introduced by pulling in the other deprecation refactoring pull.

Add an optional message to deprecated.
@yebblies
Copy link
Member Author

yebblies commented Oct 7, 2012

Done.

@nazriel
Copy link
Contributor

nazriel commented Oct 7, 2012

@9rnsr @dawgfoto any final words? Can we merge it please?

9rnsr added a commit that referenced this pull request Oct 7, 2012
Issue 5481 - Support deprecated("message")
@9rnsr 9rnsr merged commit 2c4f26e into dlang:master Oct 7, 2012
@9rnsr
Copy link
Contributor

9rnsr commented Oct 7, 2012

Merged!

@yebblies
Copy link
Member Author

yebblies commented Oct 7, 2012

Thanks all!

@andralex
Copy link
Member

andralex commented Oct 7, 2012

Great work everyone. This solves a known, long-standing issue to which we had no good solution. A solution has been proposed, implemented, and reviewed by the community and got approved by the BDFL. Congratulations to all involved!

braddr pushed a commit to braddr/dmd that referenced this pull request Oct 22, 2012
@yebblies yebblies deleted the issue5481 branch November 22, 2013 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants