# Specify a prerelease version in Project.toml compat section?

**URL:** https://discourse.julialang.org/t/specify-a-prerelease-version-in-project-toml-compat-section/69938
**Category:** General Usage
**Tags:** question, package, versioning
**Created:** [October 17, 2021, 6:22pm UTC](https://discourse.julialang.org/t/specify-a-prerelease-version-in-project-toml-compat-section/69938 "2021-10-17T18:22:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Mark\_Nahabedian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark_nahabedian/32/16562_2.png) [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)
#### Post date: [October 17, 2021, 6:22pm UTC](https://discourse.julialang.org/t/specify-a-prerelease-version-in-project-toml-compat-section/69938/1 "2021-10-17T18:22:00Z")

</div>

I have a clone of `NativeSVG.jl` at  
[https://github.com/MarkNahabedian/NativeSVG.jl](https://github.com/MarkNahabedian/NativeSVG.jl).  
It’s `Project.toml` file designates it as

```julia
version = "0.1.0-naha"

```

which parses successfully as a `VersionNumber`.

```julia
VersionNumber("0.1.0-naha").prerelease
("naha",)

```

I have another package  
[https://github.com/MarkNahabedian/ShaperOriginDesignLib](https://github.com/MarkNahabedian/ShaperOriginDesignLib) that depends  
on it. Its `Project.toml` file has the `compat` entry

```julia
NativeSVG = "0.1.0-naha"

```

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

```julia
julia
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`
Stacktrace:
  [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?

Thanks.

---

<div class="post-metadata">

### Author: ![Mark\_Nahabedian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark_nahabedian/32/16562_2.png) [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)
#### Post date: [October 17, 2021, 8:00pm UTC](https://discourse.julialang.org/t/specify-a-prerelease-version-in-project-toml-compat-section/69938/2 "2021-10-17T20:00:48Z")

</div>

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