digitalmars.D.announce - Release D 2.089.0
- Martin Nowak (8/8) Nov 03 2019 Glad to announce D 2.089.0, ♥ to the 44 contributors.
- John Chapman (6/14) Nov 04 2019 Something has changed with core.atomic.cas - it used to work with
- Manu (7/24) Nov 04 2019 Changes were made because there were a lot of problems with that module....
- John Chapman (7/25) Nov 04 2019 Sure - this AVs on DMD 2.088 Windows:
- John Chapman (2/8) Nov 04 2019 Sorry, I meant it AVs 2.089, but works on 2.088.
- Manu (19/46) Nov 05 2019 Oh... a class.
- John Chapman (4/7) Nov 05 2019 Because casts were needed in 2.088 and earlier and I just updated
- Manu (3/10) Nov 05 2019 Yes
- Manu (3/15) Nov 05 2019 But I also think you should update your code to not perform the casts.
- John Chapman (4/23) Nov 05 2019 Yes and no - it compiles when removing the casts, but AVs at
- Manu (4/28) Nov 06 2019 Thanks! I'll look into these as soon as I have a moment. Sorry for the
- Heromyth (2/7) Nov 05 2019 The keyword of share is really annoying for a class。
- Steven Schveighoffer (11/14) Nov 06 2019 We have the same problem in Martin's std.io library, won't build with
- Heromyth (4/25) Nov 05 2019 There are some bugs in cas. See here:
- jmh530 (3/7) Nov 06 2019 I suspect that providing simplified examples might improve your
- Ron Tarrant (6/7) Nov 06 2019 Hi Martin,
- Mike Parker (3/8) Nov 06 2019 Are you putting libs in the compiler's directory tree? Or are you
- Ron Tarrant (8/11) Nov 07 2019 I follow the steps outlined here:
- Jacob Carlborg (6/13) Nov 07 2019 I recommend that you use Dub instead and add gtk-d [1] as a
- Jonathan M Davis (14/25) Nov 11 2019 You should pretty much never put anything in the compiler's directory tr...
- Mike Parker (5/6) Nov 06 2019 The Blog:
- Andrea Fontana (18/26) Nov 07 2019 My code hit a regression on 2.089.
- Andrea Fontana (3/16) Nov 08 2019 https://issues.dlang.org/show_bug.cgi?id=20368
Glad to announce D 2.089.0, ♥ to the 44 contributors. This release comes with corrected extern(C) mangling in mixin templates, atomicFetchAdd and atomicFetchSub in core.atomic, support for link driver arguments, better support of LDC in dub, and plenty of other bug fixes and improvements. http://dlang.org/download.html http://dlang.org/changelog/2.089.0.html -Martin
Nov 03 2019
On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:Glad to announce D 2.089.0, ♥ to the 44 contributors. This release comes with corrected extern(C) mangling in mixin templates, atomicFetchAdd and atomicFetchSub in core.atomic, support for link driver arguments, better support of LDC in dub, and plenty of other bug fixes and improvements. http://dlang.org/download.html http://dlang.org/changelog/2.089.0.html -MartinSomething has changed with core.atomic.cas - it used to work with `null` as the `ifThis` argument, now it throws an AV. Is this intentional? If I use `cast(shared)null` it doesn't throw but if the change was deliberate shouldn't it be mentioned?
Nov 04 2019
On Mon., 4 Nov. 2019, 2:05 am John Chapman via Digitalmars-d-announce, < digitalmars-d-announce puremagic.com> wrote:On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:Changes were made because there were a lot of problems with that module... but the (reasonably comprehensive) unit tests didn't reveal any such regressions. We also build+test many popular OSS projects via buildkite, and there weren't problems. Can you show the broken code?Glad to announce D 2.089.0, =E2=99=A5 to the 44 contributors. This release comes with corrected extern(C) mangling in mixin templates, atomicFetchAdd and atomicFetchSub in core.atomic, support for link driver arguments, better support of LDC in dub, and plenty of other bug fixes and improvements. http://dlang.org/download.html http://dlang.org/changelog/2.089.0.html -MartinSomething has changed with core.atomic.cas - it used to work with `null` as the `ifThis` argument, now it throws an AV. Is this intentional? If I use `cast(shared)null` it doesn't throw but if the change was deliberate shouldn't it be mentioned?
Nov 04 2019
On Tuesday, 5 November 2019 at 06:44:29 UTC, Manu wrote:On Mon., 4 Nov. 2019, 2:05 am John Chapman via Digitalmars-d-announce, < digitalmars-d-announce puremagic.com> wrote:Sure - this AVs on DMD 2.088 Windows: import core.atomic; void main() { Object a, b = new Object; cas(cast(shared)&a, null, cast(shared)b); }Something has changed with core.atomic.cas - it used to work with `null` as the `ifThis` argument, now it throws an AV. Is this intentional? If I use `cast(shared)null` it doesn't throw but if the change was deliberate shouldn't it be mentioned?Changes were made because there were a lot of problems with that module... but the (reasonably comprehensive) unit tests didn't reveal any such regressions. We also build+test many popular OSS projects via buildkite, and there weren't problems. Can you show the broken code?
Nov 04 2019
On Tuesday, 5 November 2019 at 07:52:12 UTC, John Chapman wrote:Sure - this AVs on DMD 2.088 Windows: import core.atomic; void main() { Object a, b = new Object; cas(cast(shared)&a, null, cast(shared)b); }Sorry, I meant it AVs 2.089, but works on 2.088.
Nov 04 2019
On Mon, Nov 4, 2019 at 11:55 PM John Chapman via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:On Tuesday, 5 November 2019 at 06:44:29 UTC, Manu wrote:Oh... a class. Yeah, that's an interesting case that I actually noted had a low testing surface area. It's also theoretically broken; despite what's practical, I think it's improperly spec-ed that shared classes can be used with atomics. With a struct, you can declare `shared(T)* s_ptr`, but with classes you can only `shared(C) c_ptr`, where the difference is that `s_ptr` can be read/written... but `c_ptr` is typed such that the pointer itself is shared (because classes are implicitly a pointer), so that `c_ptr` can't be safely read/write-able... So, I actually think that atomic API is mal-formed, and it should not support `shared` arguments, but I tried to preserve existing behaviour, while being more strict about what is valid. I obviously missed something with `null` here. Incidentally, in your sample above there, `a` and `b` are not shared... why not just write: `cas(&a, null, b);` ?? If source data is not shared, you shouldn't cast to shared.On Mon., 4 Nov. 2019, 2:05 am John Chapman via Digitalmars-d-announce, < digitalmars-d-announce puremagic.com> wrote:Sure - this AVs on DMD 2.088 Windows: import core.atomic; void main() { Object a, b = new Object; cas(cast(shared)&a, null, cast(shared)b); }Something has changed with core.atomic.cas - it used to work with `null` as the `ifThis` argument, now it throws an AV. Is this intentional? If I use `cast(shared)null` it doesn't throw but if the change was deliberate shouldn't it be mentioned?Changes were made because there were a lot of problems with that module... but the (reasonably comprehensive) unit tests didn't reveal any such regressions. We also build+test many popular OSS projects via buildkite, and there weren't problems. Can you show the broken code?
Nov 05 2019
On Tuesday, 5 November 2019 at 19:05:10 UTC, Manu wrote:Incidentally, in your sample above there, `a` and `b` are not shared... why not just write: `cas(&a, null, b);` ?? If source data is not shared, you shouldn't cast to shared.Because casts were needed in 2.088 and earlier and I just updated to 2.089, unaware of the API change. Should I log `null` not working as a bug?
Nov 05 2019
On Tue, Nov 5, 2019 at 1:20 PM John Chapman via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:On Tuesday, 5 November 2019 at 19:05:10 UTC, Manu wrote:YesIncidentally, in your sample above there, `a` and `b` are not shared... why not just write: `cas(&a, null, b);` ?? If source data is not shared, you shouldn't cast to shared.Because casts were needed in 2.088 and earlier and I just updated to 2.089, unaware of the API change. Should I log `null` not working as a bug?
Nov 05 2019
On Tue, Nov 5, 2019 at 5:14 PM Manu <turkeyman gmail.com> wrote:On Tue, Nov 5, 2019 at 1:20 PM John Chapman via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:But I also think you should update your code to not perform the casts. Can you confirm that the null works when removing the shared casts?On Tuesday, 5 November 2019 at 19:05:10 UTC, Manu wrote:YesIncidentally, in your sample above there, `a` and `b` are not shared... why not just write: `cas(&a, null, b);` ?? If source data is not shared, you shouldn't cast to shared.Because casts were needed in 2.088 and earlier and I just updated to 2.089, unaware of the API change. Should I log `null` not working as a bug?
Nov 05 2019
On Wednesday, 6 November 2019 at 01:16:00 UTC, Manu wrote:On Tue, Nov 5, 2019 at 5:14 PM Manu <turkeyman gmail.com> wrote:Yes and no - it compiles when removing the casts, but AVs at runtime. Bug filed: https://issues.dlang.org/show_bug.cgi?id=20359On Tue, Nov 5, 2019 at 1:20 PM John Chapman via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:But I also think you should update your code to not perform the casts. Can you confirm that the null works when removing the shared casts?On Tuesday, 5 November 2019 at 19:05:10 UTC, Manu wrote:YesIncidentally, in your sample above there, `a` and `b` are not shared... why not just write: `cas(&a, null, b);` ?? If source data is not shared, you shouldn't cast to shared.Because casts were needed in 2.088 and earlier and I just updated to 2.089, unaware of the API change. Should I log `null` not working as a bug?
Nov 05 2019
On Tue., 5 Nov. 2019, 11:35 pm John Chapman via Digitalmars-d-announce, < digitalmars-d-announce puremagic.com> wrote:On Wednesday, 6 November 2019 at 01:16:00 UTC, Manu wrote:Thanks! I'll look into these as soon as I have a moment. Sorry for the inconvenience.On Tue, Nov 5, 2019 at 5:14 PM Manu <turkeyman gmail.com> wrote:Yes and no - it compiles when removing the casts, but AVs at runtime. Bug filed: https://issues.dlang.org/show_bug.cgi?id=20359On Tue, Nov 5, 2019 at 1:20 PM John Chapman via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:But I also think you should update your code to not perform the casts. Can you confirm that the null works when removing the shared casts?On Tuesday, 5 November 2019 at 19:05:10 UTC, Manu wrote:YesIncidentally, in your sample above there, `a` and `b` are not shared... why not just write: `cas(&a, null, b);` ?? If source data is not shared, you shouldn't cast to shared.Because casts were needed in 2.088 and earlier and I just updated to 2.089, unaware of the API change. Should I log `null` not working as a bug?
Nov 06 2019
On Tuesday, 5 November 2019 at 19:05:10 UTC, Manu wrote:On Mon, Nov 4, 2019 at 11:55 PM John Chapman via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:The keyword of share is really annoying for a class。[...][...]
Nov 05 2019
On 11/5/19 2:05 PM, Manu wrote:Incidentally, in your sample above there, `a` and `b` are not shared... why not just write: `cas(&a, null, b);` ?? If source data is not shared, you shouldn't cast to shared.We have the same problem in Martin's std.io library, won't build with the null uncasted. And it's not improperly casting, because syncDriver is stateless and immutable, so casting to shared mutable isn't going to cause problems (I think). https://github.com/MartinNowak/io/blob/2147802a9bca0dcf82293303f407dd3e253691e9/src/std/io/driver/package.d#L232-L250 Discussion: https://github.com/MartinNowak/io/issues/27 Currently causes pull requests for this and my iopipe library to fail to build on CI. P.S. glad to see shared getting some attention! -Steve
Nov 06 2019
On Tuesday, 5 November 2019 at 07:52:12 UTC, John Chapman wrote:On Tuesday, 5 November 2019 at 06:44:29 UTC, Manu wrote:There are some bugs in cas. See here: https://issues.dlang.org/show_bug.cgi?id=20354 https://issues.dlang.org/show_bug.cgi?id=20355On Mon., 4 Nov. 2019, 2:05 am John Chapman via Digitalmars-d-announce, < digitalmars-d-announce puremagic.com> wrote:Sure - this AVs on DMD 2.088 Windows: import core.atomic; void main() { Object a, b = new Object; cas(cast(shared)&a, null, cast(shared)b); }[...]Changes were made because there were a lot of problems with that module... but the (reasonably comprehensive) unit tests didn't reveal any such regressions. We also build+test many popular OSS projects via buildkite, and there weren't problems. Can you show the broken code?
Nov 05 2019
On Wednesday, 6 November 2019 at 01:51:24 UTC, Heromyth wrote:[snip] There are some bugs in cas. See here: https://issues.dlang.org/show_bug.cgi?id=20354 https://issues.dlang.org/show_bug.cgi?id=20355I suspect that providing simplified examples might improve your chances of getting these fixed...
Nov 06 2019
On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:Glad to announce D 2.089.0...Hi Martin, On the one hand, it's nice to get a shiny, new version (thanks to all involved), but is there any way the installer can be more selective about what it tosses out so I don't have to reconfigure GtkD libs, etc. in its aftermath?
Nov 06 2019
On Wednesday, 6 November 2019 at 13:49:16 UTC, Ron Tarrant wrote:Are you putting libs in the compiler's directory tree? Or are you editing sc.ini/dmd.conf? You really shouldn't be doing the former.On the one hand, it's nice to get a shiny, new version (thanks to all involved), but is there any way the installer can be more selective about what it tosses out so I don't have to reconfigure GtkD libs, etc. in its aftermath?
Nov 06 2019
On Wednesday, 6 November 2019 at 14:09:35 UTC, Mike Parker wrote:Are you putting libs in the compiler's directory tree? Or are you editing sc.ini/dmd.conf? You really shouldn't be doing the former.I follow the steps outlined here: https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows the compiler's directory tree. Is that what you mean by "You really shouldn't be doing the former."? And I also edit sc.ini.
Nov 07 2019
On Thursday, 7 November 2019 at 10:25:46 UTC, Ron Tarrant wrote:I follow the steps outlined here: https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows the compiler's directory tree. Is that what you mean by "You really shouldn't be doing the former."? And I also edit sc.ini.I recommend that you use Dub instead and add gtk-d [1] as a dependency. [1] https://code.dlang.org/packages/gtk-d -- /Jacob Carlborg
Nov 07 2019
On Thursday, November 7, 2019 3:25:46 AM MST Ron Tarrant via Digitalmars-d- announce wrote:On Wednesday, 6 November 2019 at 14:09:35 UTC, Mike Parker wrote:You should pretty much never put anything in the compiler's directory tree, and there's no need to. If you're editing the sc.ini, you might as well just put your external libraries somewhere else and have sc.ini point to them there. Putting code in a directory that the installer manages provides no benefit while causing problems like the installer deleting it when updating. In most cases though, the recommended thing to do is to just use dub rather than manually mucking around with sc.ini or dmd.conf. This reminds me of someone complaining that they couldn't just unzip the dmd install on top of another and have it work (their code no longer compiled aftery they'd just unzipped a release of dmd/phobos which had a split std.datetime on top of one that didn't). - Jonathan M DavisAre you putting libs in the compiler's directory tree? Or are you editing sc.ini/dmd.conf? You really shouldn't be doing the former.I follow the steps outlined here: https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows the compiler's directory tree. Is that what you mean by "You really shouldn't be doing the former."? And I also edit sc.ini.
Nov 11 2019
On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:Glad to announce D 2.089.0, ♥ to the 44 contributors.The Blog: https://dlang.org/blog/2019/11/06/dmd-2-089-0-released/ Reddit: https://www.reddit.com/r/programming/comments/dsgrc2/d_20890_released/
Nov 06 2019
On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:Glad to announce D 2.089.0, ♥ to the 44 contributors. This release comes with corrected extern(C) mangling in mixin templates, atomicFetchAdd and atomicFetchSub in core.atomic, support for link driver arguments, better support of LDC in dub, and plenty of other bug fixes and improvements. http://dlang.org/download.html http://dlang.org/changelog/2.089.0.html -MartinMy code hit a regression on 2.089. This worked fine, before dmd 2.089 (reduced): mixin Bug!"asd"; enum test; template Bug(string n) { int main() { import std; foreach(name; __traits(allMembers, __traits(parent, main))) static if (hasUDA!(__traits(getMember, __traits(parent, main), name), test)) return 0; return 0; } }
Nov 07 2019
On Thursday, 7 November 2019 at 16:37:56 UTC, Andrea Fontana wrote:On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:https://issues.dlang.org/show_bug.cgi?id=20368Glad to announce D 2.089.0, ♥ to the 44 contributors. This release comes with corrected extern(C) mangling in mixin templates, atomicFetchAdd and atomicFetchSub in core.atomic, support for link driver arguments, better support of LDC in dub, and plenty of other bug fixes and improvements. http://dlang.org/download.html http://dlang.org/changelog/2.089.0.html -MartinMy code hit a regression on 2.089.
Nov 08 2019