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
Fix issue 20164: print deprecation if a deprecated module is imported from a local function or a mixin. #10346
Fix issue 20164: print deprecation if a deprecated module is imported from a local function or a mixin. #10346
Conversation
Thanks for your pull request and interest in making D better, @FeepingCreature! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#10346" |
/******************************************* | ||
* Print deprecation warning if we're deprecated, when | ||
* this module is imported from scope sc. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a DDoc "Params" statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Thanks for tackling this! It is lacking tests though. |
234b7e5
to
e748850
Compare
Oops! Forgot to git add the test :) |
e748850
to
2b76a3b
Compare
Added test for 20163 too. |
Last nit: Your commit should reference both issues so that it appears in the changelog. |
3401b1b
to
0c2dadb
Compare
Didn't know you could reference both. Fixed. Ddoc syntax too. Is it okay for the 20163 test to use the 20164 import? |
…is imported from a local function or a mixin.
0c2dadb
to
f202a72
Compare
Bot didn't pick up the issue number. Trying a different syntax... edit: Now it got it. edit: Buildkite failure seems random. |
There's two locations where this can come up, so I moved the import deprecation checking code into a helper in dmodule. Not sure if this is the right way to go or if there's a more natural place that's always checked when a module is imported; I couldn't find one offhand.
Ping @Geod24. Hi :)