Skip to content

Conversation

@atilaneves
Copy link
Contributor

If we transition to enabling DIP1000 by default (which we want to do), users will have to add -preview=dip1000 to maintain the current behaviour, with possible code breakage for those who don't. This might be a problem in dependencies.

To gently nudge the transition, this PR prints out a deprecation warning so that users are encouraged to user either preview or revert switches explicitly. After a grace period we can deprecate -preview=dip1000.

Nothing changes for now except for the annoying message.

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @atilaneves! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

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

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#12159"

@Geod24
Copy link
Member

Geod24 commented Jan 27, 2021

I'd be much more comfortable with pushing for this switch if we made sure most libraries in Buildkite compiled with it.

"Please use -revert=dip1000 to maintain current behavior.");
deprecationSupplemental(
Loc.initial,
"https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1000.md");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahem, this DIP is superseeded

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I guess the link should be this then?

@MoonlightSentinel
Copy link
Contributor

MoonlightSentinel commented Jan 27, 2021

Sorry to hijack this PR but this will create yet another flag that requires two global members instead of one => #11705

@wilzbach
Copy link
Contributor

Wouldn't a much better solution to only show deprecations if there's code that would be broken with the new default?
Otherwise, everyone will just ignore the warning and complain about breakage once it's the default.

@atilaneves
Copy link
Contributor Author

Wouldn't a much better solution to only show deprecations if there's code that would be broken with the new default?

I hadn't considered that. Let me take a look at the code and see how to get it done. Thanks for the suggestion!

@dkorpel
Copy link
Contributor

dkorpel commented Mar 24, 2022

Closing this in favor of #12578

@dkorpel dkorpel closed this Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants