July 06, 2022
On 06/07/2022 5:48 AM, Steven Schveighoffer wrote:
> On 7/5/22 1:30 PM, rikki cattermole wrote:
>>
>> On 06/07/2022 12:56 AM, Carsten Schlote wrote:
>>> So the question should be, why a breaking change slipped into mainline. At least it is impossible to build the dub package now with any of the current compilers.
>>
>> What happened is that WebFreak created the tag v0.19.3 which is automatically upgraded to. Rather than v0.20.0 which wouldn't have been.
> 
> Nope.
> 
> https://github.com/dlang-community/D-Scanner/blob/e639f8bcbe8a73c9ebefb445edc101ec0c2731c1/dub.json#L15 
> 
> 
> -Steve

"libdparse": ">=0.19.2 <1.0.0",
"dsymbol" : ">=0.13.0 <1.0.0",

> Restrict to a certain minor version: "~>2.2.13", equivalent to ">=2.2.13 <2.3.0"

That sneaky < condition at the end is more broad than what ~> is.
July 05, 2022

On Tuesday, 5 July 2022 at 17:52:37 UTC, rikki cattermole wrote:

>

"libdparse": ">=0.19.2 <1.0.0",
"dsymbol" : ">=0.13.0 <1.0.0",

>

Restrict to a certain minor version: "~>2.2.13", equivalent
to ">=2.2.13 <2.3.0"

That sneaky < condition at the end is more broad than what ~> is.

The current breaking change should bump the mayor number.

The minor number should mark backward compatible changes.

And the last digit should be bumped for all bugfixes, cleanups and other stuff, which does NOT change the API at all (except of fixing it).

But even when we would use proper rules, it still depends on properly setting up the new SemVer tags for Dub modules. Any mistake on this will probaly break the code.

July 05, 2022

On 7/5/22 2:47 PM, Carsten Schlote wrote:

>

On Tuesday, 5 July 2022 at 17:52:37 UTC, rikki cattermole wrote:

>

"libdparse": ">=0.19.2 <1.0.0",
"dsymbol" : ">=0.13.0 <1.0.0",

>

Restrict to a certain minor version: "~>2.2.13", equivalent
to ">=2.2.13 <2.3.0"

That sneaky < condition at the end is more broad than what ~> is.

The current breaking change should bump the mayor number.

The minor number should mark backward compatible changes.

And the last digit should be bumped for all bugfixes, cleanups and other stuff, which does NOT change the API at all (except of fixing it).

But even when we would use proper rules, it still depends on properly setting up the new SemVer tags for Dub modules. Any mistake on this will probaly break the code.

I don't know the context of how it's used, but changing allocators from stdx.allocator to std.experimental.allocator might be considered by some as not a breaking change.

D has a nasty habit of making everything a breaking change, because introspection is so good. So you have to draw the line somewhere. I haven't looked in depth at it, but if dscanner is using things that are implementation details, there is an argument to say that dscanner is the one that strayed from the public API.

But like I said, it can be fixed by making stdx.allocator an optional dependency of libdparse.

-Steve

July 06, 2022

On Tuesday, 5 July 2022 at 19:03:03 UTC, Steven Schveighoffer wrote:

>

On 7/5/22 2:47 PM, Carsten Schlote wrote:

I don't know the context of how it's used, but changing allocators from stdx.allocator to std.experimental.allocator might be considered by some as not a breaking change.

D has a nasty habit of making everything a breaking change, because introspection is so good. So you have to draw the line somewhere. I haven't looked in depth at it, but if dscanner is using things that are implementation details, there is an argument to say that dscanner is the one that strayed from the public API.

But like I said, it can be fixed by making stdx.allocator an optional dependency of libdparse.

-Steve

I've been hurt numerous times over the years by breaking changes in D so started maintaining a list of version checks that have been helpful in keeping projects compile with multiple language versions.

https://gist.github.com/SingingBush/3a2a6d2a41a81c1bafb26e5f69f823c0

It would be great if more packages in dub repo used such mechanisms.

July 06, 2022

On Wednesday, 6 July 2022 at 18:37:45 UTC, singingbush wrote:

>

[snip]

I've been hurt numerous times over the years by breaking changes in D so started maintaining a list of version checks that have been helpful in keeping projects compile with multiple language versions.

https://gist.github.com/SingingBush/3a2a6d2a41a81c1bafb26e5f69f823c0

It would be great if more packages in dub repo used such mechanisms.

Have you made use of toolchain requirements?
https://dub.pm/package-format-sdl.html#toolchain-requirements

July 06, 2022

On Wednesday, 6 July 2022 at 19:02:05 UTC, jmh530 wrote:

>

On Wednesday, 6 July 2022 at 18:37:45 UTC, singingbush wrote:

>

[snip]

I've been hurt numerous times over the years by breaking changes in D so started maintaining a list of version checks that have been helpful in keeping projects compile with multiple language versions.

https://gist.github.com/SingingBush/3a2a6d2a41a81c1bafb26e5f69f823c0

It would be great if more packages in dub repo used such mechanisms.

Have you made use of toolchain requirements?
https://dub.pm/package-format-sdl.html#toolchain-requirements

Yes but that's about limiting which compilers are supported. While that's helpful it's not the same thing. Checking for language level in code or the existence of some package allows for different approaches to be used and therefore expand compatibility.

July 07, 2022

On Tuesday, 5 July 2022 at 18:47:59 UTC, Carsten Schlote wrote:

>

The current breaking change should bump the mayor number.

The minor number should mark backward compatible changes.

And the last digit should be bumped for all bugfixes, cleanups and other stuff, which does NOT change the API at all (except of fixing it).

One should almost always subscribe to non-breaking change, doing:

~>x.0       => it means   ">=x.0.0 <x+1.0.0"

The above is exactly what you want.
This should never happen:

~>x.y.z.  => just say NO

Breaking changes require MAJOR version bump.
DUB suggesting the faulty version doesn't help.
Use ~>x.0.

July 09, 2022

On Thursday, 7 July 2022 at 12:37:13 UTC, Guillaume Piolat wrote:

>

Breaking changes require MAJOR version bump.
DUB suggesting the faulty version doesn't help.
Use ~>x.0.

Version 0.x are pre release (gamma), so they can break at any time?

You should not use version 0.x in production at all, but some D libs stay on 0.x forever...

1 2
Next ›   Last »