Add WebSockets package in Julia version 0.7


#1

I’m using Julia 0.7 on Linux Ubuntu.

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 3 entries:
“Juno” => v"0.5.3"
“Plots” => v"0.19.3"
“Atom” => v"0.7.12"

julia> Pkg.add(PackageSpec(name = “WebSockets”, version = “0.4.0”))
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package WebSockets [104b5d7c]:
WebSockets [104b5d7c] log:
├─possible versions are: [0.0.1-0.0.6, 0.1.0-0.1.2, 0.2.0-0.2.3, 0.3.0, 0.4.0, 0.5.0, 1.0.0-1.0.3, 1.1.0-1.1.1, 1.2.0] or uninstalled
├─restricted to versions 0.4.0 by an explicit requirement, leaving only versions 0.4.0
└─restricted by julia compatibility requirements to versions: [0.0.1-0.0.6, 0.1.0-0.1.2, 0.2.0-0.2.3, 0.3.0, 1.0.0-1.0.3, 1.1.0-1.1.1, 1.2.0] or uninstalled — no versions left
Stacktrace:
[1] #propagate_constraints!#61(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/GraphType.jl:1005
[2] propagate_constraints! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/GraphType.jl:946 [inlined]
[3] #simplify_graph!#121(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/GraphType.jl:1460
[4] simplify_graph! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/GraphType.jl:1460 [inlined] (repeats 2 times)
[5] macro expansion at ./logging.jl:311 [inlined]
[6] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:339
[7] #add_or_develop#58(::Array{Base.UUID,1}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:1163
[8] #add_or_develop at ./none:0 [inlined]
[9] #add_or_develop#13(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:64
[10] #add_or_develop at ./none:0 [inlined]
[11] #add_or_develop#12 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:29 [inlined]
[12] #add_or_develop at ./none:0 [inlined]
[13] #add_or_develop#10(::Base.Iterators.Pairs{Symbol,Symbol,Tuple{Symbol},NamedTuple{(:mode,),Tuple{Symbol}}}, ::Function, ::Pkg.Types.PackageSpec) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:27
[14] #add_or_develop at ./none:0 [inlined]
[15] #add#18 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:69 [inlined]
[16] add(::Pkg.Types.PackageSpec) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:69
[17] top-level scope at none:0

Not asking for a solution. But it would be nice if you can help me point out where to look at.


#2

WebSockets 0.4.0 doesn’t support julia 0.7, only julia 0.5 (see https://github.com/JuliaWeb/WebSockets.jl/blob/v0.4.0/REQUIRE), you’ll need to choose a version that does (seems like 1.0.0 or higher).


#3

Thank you. Tried Julia 1.0. It does not work either.

| | || | | | (| | | Version 1.0.2 (2018-11-08)
/ |_|||_’_| | Official https://julialang.org/ release
|__/ |

julia> using Pkg

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 5 entries:
“Juno” => v"0.5.3"
“ArchGDAL” => v"0.2.0+"
“IJulia” => v"1.14.1"
“GDAL” => v"0.1.2"
“Atom” => v"0.7.12"

julia> Pkg.add(PackageSpec(name=“WebSockets”, version=“0.4.0” ))
Updating registry at ~/.julia/registries/General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package WebSockets [104b5d7c]:
WebSockets [104b5d7c] log:
├─possible versions are: [0.0.1-0.0.6, 0.1.0-0.1.2, 0.2.0-0.2.3, 0.3.0, 0.4.0, 0.5.0, 1.0.0-1.0.3, 1.1.0-1.1.1, 1.2.0] or uninstalled
├─restricted to versions 0.4.0 by an explicit requirement, leaving only versions 0.4.0
└─restricted by julia compatibility requirements to versions: [1.0.0-1.0.3, 1.1.0-1.1.1, 1.2.0] or uninstalled — no versions left
Stacktrace:
[1] #propagate_constraints!#61(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/GraphType.jl:1005
[2] propagate_constraints! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/GraphType.jl:946 [inlined]
[3] #simplify_graph!#121(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/GraphType.jl:1460
[4] simplify_graph! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/GraphType.jl:1460 [inlined] (repeats 2 times)
[5] macro expansion at ./logging.jl:317 [inlined]
[6] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Nothing) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:353
[7] resolve_versions! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:316 [inlined]
[8] #add_or_develop#62(::Array{Base.UUID,1}, ::Symbol, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1201
[9] #add_or_develop at ./none:0 [inlined]
[10] #add_or_develop#13(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:64
[11] #add_or_develop#12 at ./none:0 [inlined]
[12] #add_or_develop at ./none:0 [inlined]
[13] #add_or_develop#10 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:27 [inlined]
[14] #add_or_develop at ./none:0 [inlined]
[15] #add#18 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:69 [inlined]
[16] add(::Pkg.Types.PackageSpec) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:69
[17] top-level scope at none:0


#4

WebSockets versions 1.0.0 or higher, not julia, e.g. Pkg.add(PackageSpec(name=“WebSockets”, version=“1.0.0”))


#5

Thank you so much. The thing is, I was using another package, which requires WebSockets package in version 0.4.0. I think I will need to hack into the code and make some changes, in order to use the package I’d like to use.