Bug 12846 – Phobos git HEAD: std.datetime spewing out tons of deprecation messages

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-06-03T14:20:00Z
Last change time
2014-06-14T23:23:54Z
Assigned to
nobody
Creator
hsteoh

Comments

Comment #0 by hsteoh — 2014-06-03T14:20:11Z
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 by schveiguy — 2014-06-03T14:35:03Z
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 by issues.dlang — 2014-06-03T16:39:09Z
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 by issues.dlang — 2014-06-14T23:23:54Z
Okay. This has been fixed (now using split rather than getOnly, but either way, the affected has been updated).