Thread overview
it would be helpful if packages being moved in phobos had a transition period
Oct 16, 2022
singingbush
Oct 16, 2022
Imperatorn
Oct 16, 2022
Paul Backus
Oct 16, 2022
rikki cattermole
Oct 16, 2022
singingbush
October 16, 2022

When 2.099 was released std.experimental.checkedint became std.checkedint.

https://dlang.org/changelog/2.099.0.html

I'm happy for things to move out of std.experimental but I would love to see an improved process around it to prevent problems for users.

Changes like this can break tooling as well as libraries that need to support multiple versions of D.

For libraries published to dub repo it's worth having a fix like this to work around the issue:

    // https://dlang.org/changelog/2.099.0.html#checkedint
    static if (__VERSION__ >= 2099)
        import std.checkedint; // no longer experimental
    else
        import std.experimental.checkedint; // support older D front ends

but for tooling such as the Intellij plugin it's little more annoying (currently).

It would be really helpful if, when moving things out from std.experimental, that both the new and old import paths would work for some time as an overlap. Ideally with the older import path generating a deprecation warning during compile. It's frequent breaking changes like this that have always hindered me from using D in the workplace.

October 16, 2022

On Sunday, 16 October 2022 at 12:04:11 UTC, singingbush wrote:

>

When 2.099 was released std.experimental.checkedint became std.checkedint.

[...]

Agreed

October 16, 2022

On Sunday, 16 October 2022 at 12:04:11 UTC, singingbush wrote:

>

It would be really helpful if, when moving things out from std.experimental, that both the new and old import paths would work for some time as an overlap. Ideally with the older import path generating a deprecation warning during compile. It's frequent breaking changes like this that have always hindered me from using D in the workplace.

If you had actually tested this before complaining, you would have discovered that it behaves exactly the way you propose. As of Phobos 2.100.2, import std.experimental.checkedint; still works, but prints a deprecation warning during compilation.

October 17, 2022
https://github.com/dlang/phobos/blob/master/std/experimental/checkedint.d
October 16, 2022

On Sunday, 16 October 2022 at 14:08:55 UTC, Paul Backus wrote:

>

On Sunday, 16 October 2022 at 12:04:11 UTC, singingbush wrote:

>

It would be really helpful if, when moving things out from std.experimental, that both the new and old import paths would work for some time as an overlap. Ideally with the older import path generating a deprecation warning during compile. It's frequent breaking changes like this that have always hindered me from using D in the workplace.

If you had actually tested this before complaining, you would have discovered that it behaves exactly the way you propose. As of Phobos 2.100.2, import std.experimental.checkedint; still works, but prints a deprecation warning during compilation.

to be fair I didn't check it in D code as I was focusing on getting a new release of the Intellij plugin pushed to resolve the problem.

The 1.28.3 release will be fix the issue and be available shortly.

The way the plugin currently works it expected /usr/include/dmd/phobos/std/experimental/checkedint.d to exist on my system. It's not an ideal situation and certainly needs reworking but that's the way it is for now.

It's good that dmd can still compile if import std.experimental.checkedint; is used.