Thread overview
Dub says that there is an invalid semVer format, but I don't see how.
November 11

Dub says that there is an invalid semVer format, but I don't see how.

Relevant Package:

Recently, I added a new tag: v0.1.2 to the github repo, as well as v0.1.2-rc.1(this was later removed.) Now whenever updating the package, dub gives me this:

Branch ~master: Invalid SemVer format: testing.0.0
Branch ~testing: Invalid SemVer format: testing.0.0
Version 0.1.2: Invalid SemVer format: testing.0.0

Any explanation why this happens so I can fix it and avoid it in the future?

Note: This is a duplicate of a post on the dub forums, just in case nobody there sees it.

November 11
On 11/11/2021 2:13 PM, Ruby The Roobster wrote:
> Branch ~master: Invalid SemVer format: testing.0.0
> Branch ~testing: Invalid SemVer format: testing.0.0
> Version 0.1.2: Invalid SemVer format: testing.0.0

testing is a branch.

You are using ~>testing for it.

To use a branch in the SEMVER is ~branch.

https://dub.pm/package-format-json.html#version-specs
November 12
On Thursday, 11 November 2021 at 01:57:10 UTC, rikki cattermole wrote:
>
> On 11/11/2021 2:13 PM, Ruby The Roobster wrote:
>> Branch ~master: Invalid SemVer format: testing.0.0
>> Branch ~testing: Invalid SemVer format: testing.0.0
>> Version 0.1.2: Invalid SemVer format: testing.0.0
>
> testing is a branch.
>
> You are using ~>testing for it.
>
> To use a branch in the SEMVER is ~branch.
>
> https://dub.pm/package-format-json.html#version-specs

This was not causing me issues before. It worked until I added the v0.1.2 tag.
November 20
On Friday, 12 November 2021 at 21:22:32 UTC, Ruby The Roobster wrote:
> On Thursday, 11 November 2021 at 01:57:10 UTC, rikki cattermole wrote:
>>
>> On 11/11/2021 2:13 PM, Ruby The Roobster wrote:
>>> Branch ~master: Invalid SemVer format: testing.0.0
>>> Branch ~testing: Invalid SemVer format: testing.0.0
>>> Version 0.1.2: Invalid SemVer format: testing.0.0
>>
>> testing is a branch.
>>
>> You are using ~>testing for it.
>>
>> To use a branch in the SEMVER is ~branch.
>>
>> https://dub.pm/package-format-json.html#version-specs
>
> This was not causing me issues before. It worked until I added the v0.1.2 tag.

This seems to be a dead thread, but I always get these errors:

Branch ~master: Invalid SemVer format: testing.0.0
Branch ~stable: Invalid SemVer format: stable.0.0
November 20
Don't use ~> for branches.

alpha@DESKTOP-RB97SA4 /tmp/dutils
$ dub build
Invalid SemVer format: stable.0.0

alpha@DESKTOP-RB97SA4 /tmp/dutils
$ nano dub.json

alpha@DESKTOP-RB97SA4 /tmp/dutils 

$ dub build 

Performing "debug" build using C:\Tools\D\dmd_2.097.2\windows\bin\dmd.exe for x86_64. 

dutils 0.1.2-beta.2+commit.9.g359c59d: building configuration "library"... 

Error: module `package` is in file 'package.d' which cannot be read 

import path[0] = source 

import path[1] = C:\Tools\D\dmd_2.097.2\windows\bin\..\..\src\phobos 

import path[2] = C:\Tools\D\dmd_2.097.2\windows\bin\..\..\src\druntime\import 

C:\Tools\D\dmd_2.097.2\windows\bin\dmd.exe failed with exit code 1. 



alpha@DESKTOP-RB97SA4 /tmp/dutils 

$ cat dub.json 

{ 

        "authors": [ 

                "Ruby The Roobster" 

        ], 

        "copyright": "Copyright © 2021, Ruby The Roobster", 

        "description": "A collection of modules in the D Programming Language that people may find useful.", 

        "license": "GLP-3.0", 

        "name": "dutils", 

        "importPaths": ["./source"], 

        "sourceFiles": ["package.d"], 

        "targetType": "library", 

        "subPackages": [ 

                { 

                        "name": "sprite", 

                        "description": ".spr file format for images because I'm to lazy to use a preexisting one for sprites.", 

                        "targetType": "library", 

                        "importPaths": ["./source"], 

                        "sourceFiles": ["sprite.d"], 

                        "dependencies": { 

                                "dutils:skeleton": "~stable" 

                        } 

                }, 

                { 

                        "name": "binom", 

                        "description": "Module for doing some bionomial work in the D Programming Language(why did I make this).",
                        "targetType": "library", 

                        "importPaths": ["./source"], 

                        "sourceFiles": ["binom.d"] 

                }, 

                { 

                        "name": "skeleton", 

                        "description": "Module for implementing skeletons, e.g. a cube with criss-crossing beams to better detect collision.",
                        "targetType": "library", 

                        "importPaths": ["./source"], 

                        "sourceFiles": ["skeleton.d"] 

                }, 

                { 

                        "name": "physics", 

                        "description": "A very simple and basic physics library.",
                        "targetType": "library", 

                        "importPaths": ["./source"], 

                        "sourceFiles": ["physics.d"], 

                        "dependencies": { 

                                "dutils:skeleton": "~stable" 

                        } 

                } 

        ] 

} 

November 20
On Saturday, 20 November 2021 at 01:01:05 UTC, rikki cattermole wrote:
>
> Don't use ~> for branches.
>...

Thank you very much.  I edited the dub.json, and that fixed the problem(anyways, there is no longer a "testing" branch, so that would have also been an issue.)