digitalmars.D.announce - Beta 2.095.0
- Martin Nowak (7/7) Dec 20 2020 Glad to announce the first beta for the 2.095.0 release, ♥ to the
- M.M. (2/9) Dec 21 2020 Christmas present is coming... nice!
- starcanopy (2/11) Dec 21 2020 Thank you, Mr. Schroll!
- Paolo Invernizzi (17/24) Dec 23 2020 Thank you Martin,
- Paolo Invernizzi (5/12) Dec 23 2020 sorry, I mean:
- Steven Schveighoffer (15/27) Dec 23 2020 So, this is a constant problem since this deprecation was introduced.
- Paolo Invernizzi (3/8) Dec 23 2020 Thanks Steve, as usual, a perfect explanation ...
- Mathias LANG (7/19) Dec 24 2020 FYI, v2.095.0 *should* print the instantiation trace, so you can
- Paolo Invernizzi (6/16) Dec 24 2020 The point is that the deprecation is coming from an external
- Mathias LANG (45/50) Dec 24 2020 It does print a detailed stack trace (up to the first symbol that
- Paolo Invernizzi (10/64) Dec 24 2020 Thanks Matias,
- Mathias LANG (3/6) Dec 24 2020 Could you point me towards the code that triggers this ?
- Paolo Invernizzi (66/75) Dec 29 2020 Mathias, reduced test case below (dustmined), thank you!
- Paolo Invernizzi (20/25) Dec 29 2020 Manually reduced to:
- Walter Bright (2/12) Dec 24 2020 Thank you, Martin and the Sixty-One!
- Guillaume Piolat (4/11) Dec 26 2020 Pleasantly surprised by ObjC protocol support! Deriving from an
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (6/8) Dec 28 2020 Feature
- Mathias LANG (3/11) Dec 28 2020 Yes please! And thanks for paying attention to the changelog, it
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/4) Dec 29 2020 Done: https://github.com/dlang/dlang.org/pull/2926
- Martin Nowak (2/9) Dec 30 2020
- Imperatorn (3/14) Dec 30 2020 Thanks so much for doing all the hard work everyone
- Paolo Invernizzi (3/14) Dec 30 2020 Thank you Mathias for commit 5f701dc!
- Mathias LANG (6/23) Dec 30 2020 Unfortunately it doesn't fix the exact case you found, it was a
- Paolo Invernizzi (4/28) Dec 30 2020 Don't worry, I've just tried a fast build and it seems far better
- jmh530 (7/18) Dec 30 2020 When I look at dub's commits, I see a recent commit to tag
- tsbockman (8/9) Jan 01 2021 It might be a good idea for someone to at least do triage on this
Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -Martin
Dec 20 2020
On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -MartinChristmas present is coming... nice!
Dec 21 2020
On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -MartinBugzilla 21452: isCallable erroneously returns false on function templatesThank you, Mr. Schroll!
Dec 21 2020
On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -MartinThank you Martin, Just to be sure, is that expected behaviour? Or should I expect to have the a more precise instantiation point? --- /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -i -g -debug src/foo.d /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/traits.d(3727): Deprecation: function std.typecons.Nullable!long.Nullable.get_ is deprecated - Implicit conversion with alias Nullable.get this will be removed after 2.096. Please use .get explicitly. /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/traits.d(3727): Deprecation: function std.typecons.Nullable!short.Nullable.get_ is deprecated - Implicit conversion with alias Nullable.get this will be removed after 2.096. Please use .get explicitly. --- BTW, turning the deprecations from warnings to errors seems not to work (nothing is printed) --- /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -i -g -debug src/foo.d --- Thank you for your job!
Dec 23 2020
On Wednesday, 23 December 2020 at 14:41:05 UTC, Paolo Invernizzi wrote:BTW, turning the deprecations from warnings to errors seems not to work (nothing is printed) --- /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -i -g -debug src/foo.d --- Thank you for your job!sorry, I mean: `/Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -de -i -g -debug src/foo.d`
Dec 23 2020
On 12/23/20 9:42 AM, Paolo Invernizzi wrote:On Wednesday, 23 December 2020 at 14:41:05 UTC, Paolo Invernizzi wrote:So, this is a constant problem since this deprecation was introduced. What is happening is that some speculative compilation is checking something via the get function. It might not make a difference, but the error message is useless (who knows where that traits call is triggered). Most likely, it doesn't change anything. Therefore when you turn on the deprecation as an error, it doesn't affect compilation, it just fails in the speculation instead of succeeds. But the ultimate result doesn't actually change anything. I can't wait until this deprecation has been finalized, because I hate seeing seas of deprecation messages I can't do anything about. 2.097 cannot come soon enough... I'm also looking forward to being able to print Nullable!string values inside structs without an exception being thrown. -SteveBTW, turning the deprecations from warnings to errors seems not to work (nothing is printed) --- /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -i -g -debug src/foo.d --- Thank you for your job!sorry, I mean: `/Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -de -i -g -debug src/foo.d`
Dec 23 2020
On Wednesday, 23 December 2020 at 15:38:17 UTC, Steven Schveighoffer wrote:On 12/23/20 9:42 AM, Paolo Invernizzi wrote:Thanks Steve, as usual, a perfect explanation ...[...]So, this is a constant problem since this deprecation was introduced. [...]
Dec 23 2020
On Wednesday, 23 December 2020 at 15:38:17 UTC, Steven Schveighoffer wrote:What is happening is that some speculative compilation is checking something via the get function. It might not make a difference, but the error message is useless (who knows where that traits call is triggered).FYI, v2.095.0 *should* print the instantiation trace, so you can actually track down where it comes from. And the reason DMD now shows the trace is exactly because of this deprecation.Most likely, it doesn't change anything. Therefore when you turn on the deprecation as an error, it doesn't affect compilation, it just fails in the speculation instead of succeeds. But the ultimate result doesn't actually change anything. I can't wait until this deprecation has been finalized, because I hate seeing seas of deprecation messages I can't do anything about. 2.097 cannot come soon enough...FYI, in theory we could use `__traits(isDeprecated)` to silence this. But I haven't looked at the code myself.
Dec 24 2020
On Thursday, 24 December 2020 at 11:05:14 UTC, Mathias LANG wrote:On Wednesday, 23 December 2020 at 15:38:17 UTC, Steven Schveighoffer wrote:The point is that the deprecation is coming from an external library, it would be great to have the precise instantiation point in that source code, so I was wondering if that dmd improvement [1] should print a more detailed trace. [1] https://dlang.org/changelog/2.095.0.html#deprecation-contextWhat is happening is that some speculative compilation is checking something via the get function. It might not make a difference, but the error message is useless (who knows where that traits call is triggered).FYI, v2.095.0 *should* print the instantiation trace, so you can actually track down where it comes from. And the reason DMD now shows the trace is exactly because of this deprecation.
Dec 24 2020
On Thursday, 24 December 2020 at 11:38:11 UTC, Paolo Invernizzi wrote:The point is that the deprecation is coming from an external library, it would be great to have the precise instantiation point in that source code, so I was wondering if that dmd improvement [1] should print a more detailed trace. [1] https://dlang.org/changelog/2.095.0.html#deprecation-contextIt does print a detailed stack trace (up to the first symbol that is not a template) if you don't use `-de`. If you use `-de`, since the checks in Phobos are `is(typeof(n.toString()))` or `__traits(compiles, n.toString())`, then it just changes whether or not the code compiles, and as a result changes the output of the program. A trivial example: ``` import std.stdio, std.typecons; struct Foo { deprecated string toString() const { return "Oops"; } } void main () { writefln("%s", Foo.init); } ``` Will print, with v2.094.2 or before (dmd -run): ``` /usr/local/opt/dmd/include/dlang/dmd/std/format.d(3921): Deprecation: function foo.Foo.toString is deprecated /usr/local/opt/dmd/include/dlang/dmd/std/format.d(4053): Deprecation: function foo.Foo.toString is deprecated Oops ``` Not great. If you use `dmd -de -run`, you'll get: ``` Foo() ``` Notice the deprecations are gone, but so is the usage of the `toString` method. Using DMD v2.095.0-beta.1 with `-de` should give you the same output, but without `-de`: ``` % ~/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -run foo.d /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(3921): Deprecation: function foo.Foo.toString is deprecated /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(4420): instantiated from here: hasToString!(Foo, char) /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(4053): Deprecation: function foo.Foo.toString is deprecated /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(4430): instantiated from here: formatObject!(LockingTextWriter, Foo, char) /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(1875): instantiated from here: formatValueImpl!(LockingTextWriter, Foo, char) /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobo /std/format.d(576): instantiated from here: formatValue!(LockingTextWriter, Foo, char) /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobo /std/stdio.d(1661): ... (1 instantiations, -v to show) ... /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobo /std/stdio.d(4271): instantiated from here: writefln!(char, Foo) foo.d(5): instantiated from here: writefln!(char, Foo) Oops ``` So the feature works as intended, however `-de` is a dangerous trap, as it changes what is instantiated.
Dec 24 2020
On Thursday, 24 December 2020 at 18:05:30 UTC, Mathias LANG wrote:On Thursday, 24 December 2020 at 11:38:11 UTC, Paolo Invernizzi wrote:Thanks Matias, My point is that the result without -de is --- /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -i -g -debug src/foo.d /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/traits.d(3727): Deprecation: function std.typecons.Nullable!long.Nullable.get_ is deprecated - Implicit conversion with alias Nullable.get this will be removed after 2.096. Please use .get explicitly. /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/traits.d(3727): Deprecation: function std.typecons.Nullable!short.Nullable.get_ is deprecated - Implicit conversion with alias Nullable.get this will be removed after 2.096. Please use .get explicitly. --- Which unfortunately is pretty useless in my case ...The point is that the deprecation is coming from an external library, it would be great to have the precise instantiation point in that source code, so I was wondering if that dmd improvement [1] should print a more detailed trace. [1] https://dlang.org/changelog/2.095.0.html#deprecation-contextIt does print a detailed stack trace (up to the first symbol that is not a template) if you don't use `-de`. If you use `-de`, since the checks in Phobos are `is(typeof(n.toString()))` or `__traits(compiles, n.toString())`, then it just changes whether or not the code compiles, and as a result changes the output of the program. A trivial example: ``` import std.stdio, std.typecons; struct Foo { deprecated string toString() const { return "Oops"; } } void main () { writefln("%s", Foo.init); } ``` Will print, with v2.094.2 or before (dmd -run): ``` /usr/local/opt/dmd/include/dlang/dmd/std/format.d(3921): Deprecation: function foo.Foo.toString is deprecated /usr/local/opt/dmd/include/dlang/dmd/std/format.d(4053): Deprecation: function foo.Foo.toString is deprecated Oops ``` Not great. If you use `dmd -de -run`, you'll get: ``` Foo() ``` Notice the deprecations are gone, but so is the usage of the `toString` method. Using DMD v2.095.0-beta.1 with `-de` should give you the same output, but without `-de`: ``` % ~/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -run foo.d /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(3921): Deprecation: function foo.Foo.toString is deprecated /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(4420): instantiated from here: hasToString!(Foo, char) /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(4053): Deprecation: function foo.Foo.toString is deprecated /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(4430): instantiated from here: formatObject!(LockingTextWriter, Foo, char) /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos std/format.d(1875): instantiated from here: formatValueImpl!(LockingTextWriter, Foo, char) /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobo /std/format.d(576): instantiated from here: formatValue!(LockingTextWriter, Foo, char) /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobo /std/stdio.d(1661): ... (1 instantiations, -v to show) ... /Users/geod24/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobo /std/stdio.d(4271): instantiated from here: writefln!(char, Foo) foo.d(5): instantiated from here: writefln!(char, Foo) Oops ``` So the feature works as intended, however `-de` is a dangerous trap, as it changes what is instantiated.
Dec 24 2020
On Thursday, 24 December 2020 at 21:59:31 UTC, Paolo Invernizzi wrote:My point is that the result without -de is [...] Which unfortunately is pretty useless in my case ...Could you point me towards the code that triggers this ?
Dec 24 2020
On Thursday, 24 December 2020 at 23:14:16 UTC, Mathias LANG wrote:On Thursday, 24 December 2020 at 21:59:31 UTC, Paolo Invernizzi wrote:Mathias, reduced test case below (dustmined), thank you! --- /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -c -o- -J/Users/pinver/Lembas -vcolumns -color=on -Isrc -debug -unittest /Users/pinver/Tmp/dustmite/testing.reduced/src/fieldmanager.d || true < /Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos/st /traits.d(3727,61): Deprecation: function std.typecons.Nullable!long.Nullable.get_ is deprecated - Implicit conversion with alias Nullable.get this will be removed after 2.096. Please use .get explicitly. --- import std.typecons : Nullable; import std.array : array; struct DBRow(Specs...) { alias Specs[] T; T base; } class PGConnection { PGResultSet!Specs executeQuery(Specs)(string ) { scope cmd = new PGCommand(this); return cmd.executeQuery!Specs; } auto pgCommand(string ) { return new PGCommand(this); } } class PGCommand { PGConnection conn; string preparedName; this(PGConnection ){ } PGResultSet!Specs executeQuery(Specs)() { return conn.executeQuery!Specs(preparedName); } } class PGResultSet(Specs) { alias DBRow!Specs Row; bool empty = true; void popFront() { } Row front() { return Row.init; } } void importPanoptesFixations(short legId, DbModel dbModel) { queryAsArray(dbModel.conn, legId); } struct DbModel { PGConnection conn; } struct Foo { Nullable!long sessionStartedAtMs; } auto queryAsArray(Conn)(Conn conn, short ) { auto comm = conn.pgCommand(`select * from foo`); auto rset = comm.executeQuery!Foo; rset.array; } ---My point is that the result without -de is [...] Which unfortunately is pretty useless in my case ...Could you point me towards the code that triggers this ?
Dec 29 2020
On Tuesday, 29 December 2020 at 10:48:55 UTC, Paolo Invernizzi wrote:On Thursday, 24 December 2020 at 23:14:16 UTC, Mathias LANG wrote:Manually reduced to: --- import std.typecons : Nullable; import std.array : array; class PGResultSet { bool empty = true; void popFront() {} Foo front; } struct Foo { Nullable!long sessionStartedAtMs; } void foo() { auto rset = new PGResultSet; rset.array; } ---[...]Mathias, reduced test case below (dustmined), thank you! [...]
Dec 29 2020
On 12/20/2020 5:21 AM, Martin Nowak wrote:Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -MartinThank you, Martin and the Sixty-One!
Dec 24 2020
On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -MartinPleasantly surprised by ObjC protocol support! Deriving from an Obj-C protocol was a nightmare before, there is good change the new release makes it palatable!
Dec 26 2020
On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.htmlFeature https://dlang.org/changelog/2.095.0.html#better-vtemplates was already added at https://dlang.org/changelog/2.094.0.html#better-vtemplates Shall I fix?
Dec 28 2020
On Monday, 28 December 2020 at 20:22:50 UTC, Per Nordlöw wrote:On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Yes please! And thanks for paying attention to the changelog, it matters a lot!http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.htmlFeature https://dlang.org/changelog/2.095.0.html#better-vtemplates was already added at https://dlang.org/changelog/2.094.0.html#better-vtemplates Shall I fix?
Dec 28 2020
On Tuesday, 29 December 2020 at 00:17:59 UTC, Mathias LANG wrote:Yes please! And thanks for paying attention to the changelog, it matters a lot!Done: https://github.com/dlang/dlang.org/pull/2926
Dec 29 2020
On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors.The release candidate for 2.095.0 is live now.http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -Martin
Dec 30 2020
On Wednesday, 30 December 2020 at 10:51:38 UTC, Martin Nowak wrote:On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Thanks so much for doing all the hard work everyoneGlad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors.The release candidate for 2.095.0 is live now.http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -Martin
Dec 30 2020
On Wednesday, 30 December 2020 at 10:51:38 UTC, Martin Nowak wrote:On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Thank you Mathias for commit 5f701dc!Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors.The release candidate for 2.095.0 is live now.http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -Martin
Dec 30 2020
On Wednesday, 30 December 2020 at 14:23:39 UTC, Paolo Invernizzi wrote:On Wednesday, 30 December 2020 at 10:51:38 UTC, Martin Nowak wrote:Unfortunately it doesn't fix the exact case you found, it was a byproduct of working on your test case. And I don't think I'll have time to get to it before the release (which is scheduled January 1st).On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Thank you Mathias for commit 5f701dc!Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors.The release candidate for 2.095.0 is live now.http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -Martin
Dec 30 2020
On Wednesday, 30 December 2020 at 14:43:53 UTC, Mathias LANG wrote:On Wednesday, 30 December 2020 at 14:23:39 UTC, Paolo Invernizzi wrote:Don't worry, I've just tried a fast build and it seems far better than before!On Wednesday, 30 December 2020 at 10:51:38 UTC, Martin Nowak wrote:Unfortunately it doesn't fix the exact case you found, it was a byproduct of working on your test case. And I don't think I'll have time to get to it before the release (which is scheduled January 1st).On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:Thank you Mathias for commit 5f701dc!Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors.The release candidate for 2.095.0 is live now.http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -Martin
Dec 30 2020
On Wednesday, 30 December 2020 at 10:51:38 UTC, Martin Nowak wrote:On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:When I look at dub's commits, I see a recent commit to tag version 1.24.0-rc1. It might be useful to mention the latest version of dub somewhere in the change log as well, at least to the extent that the dub releases will be coinciding with the DMD ones.Glad to announce the first beta for the 2.095.0 release, ♥ to the 61 contributors.The release candidate for 2.095.0 is live now.http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.095.0.html As usual please report any bugs at https://issues.dlang.org -Martin
Dec 30 2020
On Wednesday, 30 December 2020 at 10:51:38 UTC, Martin Nowak wrote:The release candidate for 2.095.0 is live now.It might be a good idea for someone to at least do triage on this regression I found before release: https://issues.dlang.org/show_bug.cgi?id=21513 The symptoms weren't too bad in my case (an easily worked around segmentation fault), however it seems like the kind of thing that might cause silent memory corruption in another context?
Jan 01 2021