digitalmars.D - DScanner 0.12.1 stopped working
- Carsten Schlote (16/16) Jul 05 2022 HI together,
- Paolo Invernizzi (14/30) Jul 05 2022 Probably is not what you are searching for, but D-Scanner master
- Carsten Schlote (19/34) Jul 05 2022 Thanks alot. Exactly what is needed.
- RazvanN (4/26) Jul 05 2022 It's probably libdparse since dsymbol depends on it. It's
- Steven Schveighoffer (9/38) Jul 05 2022 The problem is that dscanner uses stdx.allocator, but libdparse was
- jmh530 (3/8) Jul 05 2022 Or finalize and then merge std.experimental.allocator...
- bauss (2/5) Jul 05 2022 Both. dsymbol is a part of libdparse.
- Carsten Schlote (10/16) Jul 05 2022 So the question should be, why a breaking change slipped into
- rikki cattermole (3/6) Jul 05 2022 What happened is that WebFreak created the tag v0.19.3 which is
- Steven Schveighoffer (4/12) Jul 05 2022 Nope.
- rikki cattermole (5/22) Jul 05 2022 "libdparse": ">=0.19.2 <1.0.0",
- Carsten Schlote (9/15) Jul 05 2022 The current breaking change should bump the mayor number.
- Steven Schveighoffer (12/34) Jul 05 2022 I don't know the context of how it's used, but changing allocators from
- singingbush (9/22) Jul 06 2022 I've been hurt numerous times over the years by breaking changes
- jmh530 (3/11) Jul 06 2022 Have you made use of toolchain requirements?
- singingbush (6/20) Jul 06 2022 Yes but that's about limiting which compilers are supported.
-
Guillaume Piolat
(10/15)
Jul 07 2022
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (5/8) Jul 09 2022 Version 0.x are pre release (gamma), so they can break at any
HI together, it seems that dscanner started to fail recently, and at work some of our CI pipelines stopped working. I would care less, if this would have happed at home. But at work this opens more questions about the usability of dlang - for whatever purpose. So any help to solve this issue asap would be appreciated. Error output: ``` .dub/packages/dscanner-0.12.1/dscanner/src/dscanner/analysis/helpers.d(59,32): Error: none of the overloads of `this` are callable using argument types `(CAllocatorImpl!(Mallocator, Flag.no))` ... ``` Is there any information available, what is causing this problem and how to fix it? It happens with the latest versions of DMD and LDC2. Also it breaks with GDC, but GDC is not up to date. It worked before, so I suspect some changes in packages DScanner depends on.
Jul 05 2022
On Tuesday, 5 July 2022 at 08:18:49 UTC, Carsten Schlote wrote:HI together, it seems that dscanner started to fail recently, and at work some of our CI pipelines stopped working. I would care less, if this would have happed at home. But at work this opens more questions about the usability of dlang - for whatever purpose. So any help to solve this issue asap would be appreciated. Error output: ``` .dub/packages/dscanner-0.12.1/dscanner/src/dscanner/analysis/helpers.d(59,32): Error: none of the overloads of `this` are callable using argument types `(CAllocatorImpl!(Mallocator, Flag.no))` ... ``` Is there any information available, what is causing this problem and how to fix it? It happens with the latest versions of DMD and LDC2. Also it breaks with GDC, but GDC is not up to date. It worked before, so I suspect some changes in packages DScanner depends on.Probably is not what you are searching for, but D-Scanner master is building on my machine with this dub.selections.json { "fileVersion": 1, "versions": { "dsymbol": "0.13.0", "emsi_containers": "0.8.1", "inifiled": "1.3.3", "libddoc": "0.8.0", "libdparse": "0.19.1", "stdx-allocator": "2.77.5" } }
Jul 05 2022
On Tuesday, 5 July 2022 at 08:30:29 UTC, Paolo Invernizzi wrote:Probably is not what you are searching for, but D-Scanner master is building on my machine with this dub.selections.json { "fileVersion": 1, "versions": { "dsymbol": "0.13.0", "emsi_containers": "0.8.1", "inifiled": "1.3.3", "libddoc": "0.8.0", "libdparse": "0.19.1", "stdx-allocator": "2.77.5" } }Thanks alot. Exactly what is needed. I changed my dub.selection file to your setup, and DScanner nicely compiled. This is, what I had to change: ``` $ diff dub.selections.json dub.selections.json~ 4c4 < "dsymbol": "0.13.0", ---"dsymbol": "0.13.2",8c8 < "libdparse": "0.19.1", ---"libdparse": "0.19.3",``` So, either dsymbol or libdparse did some incompatible change, despite the fact that the version number (SemVer?) just bumped the build number, but neither Majaor/Minor numbers. Later I will work out, which of the two modules is causing the problem. Maybe this helps to track down the reason for this problem.
Jul 05 2022
On Tuesday, 5 July 2022 at 09:53:29 UTC, Carsten Schlote wrote:On Tuesday, 5 July 2022 at 08:30:29 UTC, Paolo Invernizzi wrote:It's probably libdparse since dsymbol depends on it. It's probably this PR that did it: https://github.com/dlang-community/libdparse/pull/463[...]Thanks alot. Exactly what is needed. I changed my dub.selection file to your setup, and DScanner nicely compiled. This is, what I had to change: ``` $ diff dub.selections.json dub.selections.json~ 4c4 < "dsymbol": "0.13.0", ---[...]8c8 < "libdparse": "0.19.1", ---[...]``` So, either dsymbol or libdparse did some incompatible change, despite the fact that the version number (SemVer?) just bumped the build number, but neither Majaor/Minor numbers. Later I will work out, which of the two modules is causing the problem. Maybe this helps to track down the reason for this problem.
Jul 05 2022
On 7/5/22 8:09 AM, RazvanN wrote:On Tuesday, 5 July 2022 at 09:53:29 UTC, Carsten Schlote wrote:The problem is that dscanner uses stdx.allocator, but libdparse was switched to using std.experimental.allocator in that PR. The result is that you can't pass an allocator from one lib to the other, because they are from different modules. There is a way to fix this: change libdparse to use stdx.allocator when some other project has included it (this can be done with an optional dependency specification). -SteveOn Tuesday, 5 July 2022 at 08:30:29 UTC, Paolo Invernizzi wrote:It's probably libdparse since dsymbol depends on it. It's probably this PR that did it: https://github.com/dlang-community/libdparse/pull/463[...]Thanks alot. Exactly what is needed. I changed my dub.selection file to your setup, and DScanner nicely compiled. This is, what I had to change: ``` $ diff dub.selections.json dub.selections.json~ 4c4 < "dsymbol": "0.13.0", ---[...]8c8 < "libdparse": "0.19.1", ---[...]``` So, either dsymbol or libdparse did some incompatible change, despite the fact that the version number (SemVer?) just bumped the build number, but neither Majaor/Minor numbers. Later I will work out, which of the two modules is causing the problem. Maybe this helps to track down the reason for this problem.
Jul 05 2022
On Tuesday, 5 July 2022 at 15:22:57 UTC, Steven Schveighoffer wrote:[snip] There is a way to fix this: change libdparse to use stdx.allocator when some other project has included it (this can be done with an optional dependency specification). -SteveOr finalize and then merge std.experimental.allocator...
Jul 05 2022
On Tuesday, 5 July 2022 at 09:53:29 UTC, Carsten Schlote wrote:Later I will work out, which of the two modules is causing the problem. Maybe this helps to track down the reason for this problem.Both. dsymbol is a part of libdparse.
Jul 05 2022
On Tuesday, 5 July 2022 at 12:09:39 UTC, bauss wrote:On Tuesday, 5 July 2022 at 09:53:29 UTC, 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. Maybe the CI pipeline should also build with the latest dependancies. OR put the dub.selections file under revision control, so that code like dub fetch dscanner dub run dscanner -- ... will properly compile and work. Without breaking the build....Later I will work out, which of the two modules is causing the problem. Maybe this helps to track down the reason for this problem.Both. dsymbol is a part of libdparse.
Jul 05 2022
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.
Jul 05 2022
On 7/5/22 1:30 PM, rikki cattermole wrote:On 06/07/2022 12:56 AM, Carsten Schlote wrote:Nope. https://github.com/dlang-community/D-Scanner/blob/e639f8bcbe8a73c9ebefb445edc101ec0c2731c1/dub.json#L15 -SteveSo 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.
Jul 05 2022
On 06/07/2022 5:48 AM, Steven Schveighoffer wrote:On 7/5/22 1:30 PM, rikki cattermole wrote:"libdparse": ">=0.19.2 <1.0.0", "dsymbol" : ">=0.13.0 <1.0.0",On 06/07/2022 12:56 AM, Carsten Schlote wrote:Nope. https://github.com/dlang-community/D-Scanner/blob/e639f8bcbe8a73c9ebefb445edc101ec0 2731c1/dub.json#L15 -SteveSo 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.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.
Jul 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",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.Restrict to a certain minor version: "~>2.2.13", equivalentto ">=2.2.13 <2.3.0" That sneaky < condition at the end is more broad than what ~> is.
Jul 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: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"libdparse": ">=0.19.2 <1.0.0", "dsymbol" : ">=0.13.0 <1.0.0",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.Restrict to a certain minor version: "~>2.2.13", equivalentto ">=2.2.13 <2.3.0" That sneaky < condition at the end is more broad than what ~> is.
Jul 05 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. -SteveI'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.
Jul 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
Jul 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: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.[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
Jul 06 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).<rant> 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`.
Jul 07 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...
Jul 09 2022