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

Fix issue 11989 -- deprecate TickDuration, it's no longer used anywhere. #15024

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

schveiguy
Copy link
Member

See prior work dlang/druntime#2886

Note all the changes to assert statements are to work around https://issues.dlang.org/show_bug.cgi?id=23800

Once this is removed, all that is going away anyway.

Any ideas on how to do the _assertThrownDep better?

Note also that this deprecates the to overload, which is one of the banes of my D existence!

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @schveiguy!

Bugzilla references

Auto-close Bugzilla Severity Description
11989 enhancement Introduce a new monotonic clock type and phase out TickDuration

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#15024"

@schveiguy
Copy link
Member Author

The change in dmd/runnable I think is just testing for some struct, not specifically TickDuration. So I think the change there is correct, ping @rainers in case you have a chance to take a look. It's a really old bug.

@schveiguy
Copy link
Member Author

Don't merge this until the docs are examined.

@schveiguy
Copy link
Member Author

OK, I think this is good to merge, the docs are as good as I can get them. For some reason deprecated templates do not show as deprecated in ddoc, not sure why.

@rainers
Copy link
Member

rainers commented Mar 23, 2023

I think is just testing for some struct, not specifically TickDuration

Sounds good. IIRC it just needed a symbol from the runtime that isn't built with debug information.

assert(TickDuration.min < TickDuration.max);
assert(TickDuration.min - TickDuration(1) == TickDuration.max);
assert(TickDuration.max + TickDuration(1) == TickDuration.min);
assert((zero == TickDuration(0)) == true);
Copy link
Contributor

Choose a reason for hiding this comment

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

What are these == true additions for?

Copy link
Contributor

Choose a reason for hiding this comment

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

ping @schveiguy ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oof, I missed this comment!

Note all the changes to assert statements are to work around https://issues.dlang.org/show_bug.cgi?id=23800

That is why.

Copy link
Member Author

Choose a reason for hiding this comment

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

ping @dkorpel in case the context isn't clear 2 weeks later. Would love to see this merged for the next release.

@RazvanN7 RazvanN7 merged commit 525d90a into dlang:master Apr 7, 2023
@schveiguy schveiguy deleted the deprecatetickduration branch April 7, 2023 13:36
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.

5 participants