D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 12846 - Phobos git HEAD: std.datetime spewing out tons of deprecation messages
Summary: Phobos git HEAD: std.datetime spewing out tons of deprecation messages
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-03 14:20 UTC by hsteoh
Modified: 2014-06-14 23:23 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description hsteoh 2014-06-03 14:20:11 UTC
Updated dmd/druntime/phobos to git HEAD today, and got a whole bunch of deprecation messages from std.datetime:

-----
/usr/src/d/phobos/std/datetime.d(27194): Deprecation: function core.time.Duration.hours is deprecated - Please use getOnly instead. Too many people were confusing hours with total!"hours"().
/usr/src/d/phobos/std/datetime.d(27194): Deprecation: function core.time.Duration.minutes is deprecated - Please use getOnly instead. Too many people were confusing minutes with total!"minutes"().
/usr/src/d/phobos/std/datetime.d(27196): Deprecation: function core.time.Duration.hours is deprecated - Please use getOnly instead. Too many people were confusing hours with total!"hours"().
/usr/src/d/phobos/std/datetime.d(27196): Deprecation: function core.time.Duration.minutes is deprecated - Please use getOnly instead. Too many people were confusing minutes with total!"minutes"().
/usr/src/d/phobos/std/datetime.d(27194): Deprecation: function core.time.Duration.hours is deprecated - Please use getOnly instead. Too many people were confusing hours with total!"hours"().
/usr/src/d/phobos/std/datetime.d(27194): Deprecation: function core.time.Duration.minutes is deprecated - Please use getOnly instead. Too many people were confusing minutes with total!"minutes"().
/usr/src/d/phobos/std/datetime.d(27196): Deprecation: function core.time.Duration.hours is deprecated - Please use getOnly instead. Too many people were confusing hours with total!"hours"().
/usr/src/d/phobos/std/datetime.d(27196): Deprecation: function core.time.Duration.minutes is deprecated - Please use getOnly instead. Too many people were confusing minutes with total!"minutes"().
-----

This probably should be fixed in std.datetime. :)
Comment 1 Steven Schveighoffer 2014-06-03 14:35:03 UTC
https://github.com/D-Programming-Language/druntime/pull/822

Proposed and pulled within 1 hour. Please comment. I think it needs to be rescinded.
Comment 2 Jonathan M Davis 2014-06-03 16:39:09 UTC
Well, it's all of two lines that are affected. https://github.com/D-Programming-Language/phobos/pull/2227 had fixed them, but I after some complaints were raised in the already pulled https://github.com/D-Programming-Language/druntime/pull/822, I removed that commit from my 2227 pull (which was just merged). I've created a separate pull request here:

https://github.com/D-Programming-Language/phobos/pull/2228
Comment 3 Jonathan M Davis 2014-06-14 23:23:54 UTC
Okay. This has been fixed (now using split rather than getOnly, but either way, the affected has been updated).