Specify a prerelease version in Project.toml compat section?

I have a clone of NativeSVG.jl at
GitHub - MarkNahabedian/NativeSVG.jl: A pure Julia SVG generator..
It’s Project.toml file designates it as

version = "0.1.0-naha"

which parses successfully as a VersionNumber.


I have another package
GitHub - MarkNahabedian/ShaperOriginDesignLib: A library to aid in the writing of SVG files to drive the Shaper Origin CNC router. that depends
on it. Its Project.toml file has the compat entry

NativeSVG = "0.1.0-naha"

When I try to add ShaperOriginDesignLib to a workspace I get an error:

Pkg.add(; url="https://github.com/MarkNahabedian/ShaperOriginDesignLib")
    Updating git-repo `https://github.com/MarkNahabedian/ShaperOriginDesignLib`
ERROR: Could not parse compatibility version for dependency `NativeSVG`
  [1] pkgerror(msg::String)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
  [2] read_project_compat(raw::Dict{String, Any}, project::Pkg.Types.Project)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:66
  [3] Pkg.Types.Project(raw::Dict{String, Any})
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:121
  [4] read_project(f_or_io::String)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:136

because the regular expressions at the end of
Julia-1.6.0/share/julia/stdlib/v1.6/Pkg/src/versions.jl don’t allow
for a :prerelease component in the version string.

Is this a bug?

How can I specify that ShaperOriginDesignLib depends on my branch of NativeSVG.jl?


It looks like there’s a similar issue with this constructor: VersionRange(s::AbstractString).