Debugging ERROR: ArgumentError: invalid version range

(v1.3) pkg> activate debug
Activating new environment at `~/repos/scratch/debug/Project.toml`

(debug) pkg> dev https://github.com/Klepac-Ceraj-Lab/echo_analysis
  Updating registry at `~/.julia/registries/BioJuliaRegistry`
  Updating git-repo `https://github.com/BioJulia/BioJuliaRegistry`
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/Klepac-Ceraj-Lab/echo_analysis`
 Resolving package versions...
ERROR: ArgumentError: invalid version range: "[0.4.0-0.4, 0.5.0-0.5]"
(debug) pkg> dev https://github.com/Klepac-Ceraj-Lab/echo_analysis
  Updating registry at `~/.julia/registries/BioJuliaRegistry`
  Updating git-repo `https://github.com/BioJulia/BioJuliaRegistry`
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/Klepac-Ceraj-Lab/echo_analysis`
 Resolving package versions...
ERROR: ArgumentError: invalid version range: "[0.4.0-0.4, 0.5.0-0.5]"

Full stacktrace here.

Note: you might need to add the BioJulia registry. I asked on Slack last month, and David Varela said

grep :sweat_smile: it says MicrobiomePlots is the offender

I’m not quite sure what he’s grepping - I don’t see MicrobiomePlots in the stacktrace, but the MicrobiomePlots [compat] section does have Microbiome = "0.4, 0.5". I don’t understand why that doesn’t work though.

Any insight would be appreciated.

Hmm… if I do ] add Micro<TAB>

(debug) pkg> add Micr┌ Error: Error in the keymap
│   exception =
│    ArgumentError: invalid version range: "[0.4.0-0.4, 0.5.0-0.5]"
│    Stacktrace:
#...

I am grepping the BioJulia Registry. Take a look: https://github.com/BioJulia/BioJuliaRegistry/blob/master/M/MicrobiomePlots/Compat.toml

How is this registry being created? I’m fairly certain it is using an incorrect format for the registry compat files. It should be using a vector of strings where each string is a version range.

@Ward9250 any thoughts?

The registry is created and updated using an installation of Registrator that makes PRs to the registry.

And the bot registered MicrobiomePlots.

My first thought was ah, perhaps the format has changed, and the BioJulia bot setup needs updating.

Second thought was why we haven’t had that problem before if that’s the case… unless it’s because the release PR was made by an older bot, and then if it wasn’t merged for a while and so the problem wasn’t seen.

This may be related:
https://github.com/JuliaRegistries/General/commit/a47c44b9bf7828be39dee4b7f812d29f93cdc4e9

Which puts me in mind of the bug in the automerge checker for the general registry when a patch release is made - it would throw a tizwas claiming julia versions were being restricted when they are not.

At some point during the holiday period I was going to replicate General’s CI setups on BioJuliaRegistry so as we can have some more systematic checking… Then I got ill and have just started to recover, so now I intend to look into doing that tomorrow. I’m also going to be releasing a 0.1 of GenomeGraphs to the BioJuliaRegistry soon. Which might give me the opportunity to test the bot’s behaviour by doing a dummy release where GenomeGraphs required Microbiome 0.4 and 0.5 like MicrobiomePlots does, and then I can see what the bot does vs what it should do, then I can just rebuild the bot from a more recent Registrator.jl state if it’s wrong and see if that fixes it.

But since you just want this particular offending entry fixed for your resonance project, if you want to just change the offending line in a PR and I’ll merge it.

Note the following worked for me:

N82106:repos bward$ ./julia13/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.3.0 (2019-11-26)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

(v1.3) pkg> dev https://github.com/Klepac-Ceraj-Lab/echo_analysis
  Updating registry at `~/.julia/registries/BioJuliaRegistry`
  Updating git-repo `https://github.com/BioJulia/BioJuliaRegistry.git`
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/Klepac-Ceraj-Lab/echo_analysis`
[ Info: Path `/Users/bward/.julia/dev/ECHOAnalysis` exists and looks like the correct package, using existing path
 Resolving package versions...
 Installed OpenBLAS_jll ────── v0.3.7+2
 Installed ProgressMeter ───── v1.2.0
 Installed Arpack_jll ──────── v3.5.0+2
 Installed FixedPointNumbers ─ v0.7.0
 Installed Arpack ──────────── v0.4.0
 Installed MultivariateStats ─ v0.7.0
 Installed Microbiome ──────── v0.5.0
 Installed ColorTypes ──────── v0.9.0
 Installed Requires ────────── v1.0.0
 Installed Compat ──────────── v3.2.0
 Installed SpatialEcology ──── v0.4.3
 Installed Colors ──────────── v0.11.1
  Updating `~/.julia/environments/v1.3/Project.toml`
  [39b5b81a] + ECHOAnalysis v0.0.1 [`~/.julia/dev/ECHOAnalysis`]
  Updating `~/.julia/environments/v1.3/Manifest.toml`
  [7d9fca2a] + Arpack v0.4.0
  [68821587] + Arpack_jll v3.5.0+2
  [b99e7846] + BinaryProvider v0.5.8
  [fa5322f5] + BiobakeryUtils v0.2.0
  [336ed68f] + CSV v0.5.21
  [324d7699] + CategoricalArrays v0.7.6
  [3da002f7] + ColorTypes v0.9.0
  [5ae59095] + Colors v0.11.1
  [34da2185] + Compat v3.2.0
  [8f4d0f93] + Conda v1.3.0
  [9a962f9c] + DataAPI v1.1.0
  [a93c6f00] + DataFrames v0.20.0
  [864edb3b] ↑ DataStructures v0.17.6 ⇒ v0.17.7
  [e2d170a0] + DataValueInterfaces v1.0.0
  [85a47980] + Dictionaries v0.2.1
  [39b5b81a] + ECHOAnalysis v0.0.1 [`~/.julia/dev/ECHOAnalysis`]
  [48062228] + FilePathsBase v0.7.0
  [53c48c17] + FixedPointNumbers v0.7.0
  [313cdc1a] + Indexing v1.1.0
  [41ab1584] + InvertedIndices v1.0.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [682c06a0] + JSON v0.21.0
  [3bd8f0ae] + Microbiome v0.5.0
  [e1d29d7a] + Missings v0.4.3
  [6f286f6a] + MultivariateStats v0.7.0
  [4536629a] + OpenBLAS_jll v0.3.7+2
  [69de0a69] + Parsers v0.3.10
  [2dfb63ee] + PooledArrays v0.5.3
  [92933f4c] + ProgressMeter v1.2.0
  [6f49c342] + RCall v0.13.4
  [189a3867] + Reexport v0.2.0
  [ae029012] + Requires v1.0.0
  [0aa819cd] + SQLite v0.8.2
  [1277b4bf] + ShiftedArrays v1.0.0
  [a2af1166] + SortingAlgorithms v0.3.1
  [348f2d5d] + SpatialEcology v0.4.3
  [2913bbd2] + StatsBase v0.32.0
  [3eaba693] + StatsModels v0.6.7
  [3783bdb8] + TableTraits v1.0.0
  [bd369af6] + Tables v0.2.11
  [81def892] + VersionParsing v1.2.0
  [ea10d353] + WeakRefStrings v0.6.2
  [1b915085] + WinReg v0.3.1
  [ade2ca70] + Dates 
  [8bb1440f] + DelimitedFiles 
  [9fa8497b] + Future 
  [76f85450] + LibGit2 
  [a63ad114] + Mmap 
  [44cfe95a] + Pkg 
  [3fa0cd96] + REPL 
  [ea8e919c] + SHA 
  [1a1011a3] + SharedArrays 
  [2f01184e] + SparseArrays 
  [10745b16] + Statistics 
  [cf7118a7] + UUIDs 

Weird… i wonder if I have something else going on triggers something different for the resolver. Frankly, I don’t really understand how all of this works.

You mean a PR direct to the registry? I can also drop support for Microbiome 0.4, perhaps I should do that in any case.