Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message about failure to parse compatibility version #1853

Open
giordano opened this issue Jun 6, 2020 · 4 comments
Open

Comments

@giordano
Copy link
Contributor

giordano commented Jun 6, 2020

Since yesterday I can't update the global environment nor add new package:

(@v1.4) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: Could not parse compatibility version for dependency `julia`

I have no clue where the problem is, it would be great if the error message pointed the user to where the issue is (which project file).

The only thing I could do is to fire up Debugger.jl to at least get a stacktrace:

julia> using Debugger, Pkg

julia> @enter Pkg.update()
[ Info: tracking Pkg
In #up#44(kwargs, ) at /usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:193
 189      return
 190  end
 191  
 192  up(ctx::Context; kwargs...)                            = up(ctx, PackageSpec[]; kwargs...)
>193  up(; kwargs...)                                        = up(PackageSpec[]; kwargs...)
 194  up(pkg::Union{AbstractString, PackageSpec}; kwargs...) = up([pkg]; kwargs...)
 195  up(pkgs::Vector{<:AbstractString}; kwargs...)          = up([PackageSpec(pkg) for pkg in pkgs]; kwargs...)
 196  up(pkgs::Vector{PackageSpec}; kwargs...)               = up(Context(), pkgs; kwargs...)
 197  
 198  

About to run: (getindex)(Pkg.Types.PackageSpec)
1|debug> n
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: Could not parse compatibility version for dependency `julia`
Stacktrace:
 [1] open(::Pkg.Types.var"#26#27"{String}, ::Tuple{String}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at io.jl:300
 [2] open(::Pkg.Types.var"#26#27"{String}, ::Tuple{String}) at io.jl:296
 [3] read_project(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/project.jl:143
 [4] (::DataType)(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:285
 [5] collect_developed!(::Pkg.Types.Context, ::Pkg.Types.PackageSpec, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:253
 [6] collect_developed(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:266
 [7] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:314
 [8] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Pkg.Types.UpgradeLevel) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:1172
 [9] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:224
 [10] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:201
 [11] up(::Array{Pkg.Types.PackageSpec,1}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:196
 [12] up(::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:196
 [13] up(; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:193
 [14] up() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:193
@fredrikekre
Copy link
Member

I have no clue where the problem is, it would be great if the error message pointed the user to where the issue is (which project file).

It is always the active project file.

@KristofferC
Copy link
Sponsor Member

It is always the active project file.

Are you sure? It also looks at devved packages / packages tracking by branch, right?

@fredrikekre
Copy link
Member

Ah, true.

@giordano
Copy link
Contributor Author

giordano commented Jun 8, 2020

Yes, the problem was in a deved package. I had to use Debugger and add a breakpoint with break_on(:error) to find which one had the wrong compat specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants