QuantumBFS / tutorials

Tutorials for Yao
https://yaoquantum.org/tutorials/
Apache License 2.0
9 stars 8 forks source link

Can't instantiate project #16

Open kharazity opened 3 years ago

kharazity commented 3 years ago

Trying to learn Yao, I've cloned this repo and ran: julia --project -e 'using Pkg; Pkg.instantiate()' . This returns a type error:

Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: TypeError: in typeassert, expected VersionNumber, got Pkg.Types.VersionSpec
Stacktrace:
 [1] load_urls(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:456
 [2] #download_source#39 at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:632 [inlined]
 [3] download_source at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:631 [inlined]
 [4] instantiate(::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Pkg.BinaryPlatforms.Linux, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:820
 [5] instantiate(::Pkg.Types.Context) at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:748
 [6] #instantiate#116 at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:744 [inlined]
 [7] instantiate() at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:744
 [8] top-level scope at none:1

Any suggestions? Is this related to #8 ?

Roger-luo commented 3 years ago

Ah sorry yeah I'm converting the tutorials to Pluto notebooks gimme one sec to fix this

Roger-luo commented 3 years ago

so it seems to work fine for me however, which Julia version are you using?

kharazity commented 3 years ago

Julia 1.4

On Wed, Feb 17, 2021, 8:39 PM Rogerluo notifications@github.com wrote:

so it seems to work fine for me however, which Julia version are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/QuantumBFS/tutorials/issues/16#issuecomment-780975937, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJGAHFMGBGMLRYOETFLB3GDS7RVV3ANCNFSM4XY3DD2A .

Roger-luo commented 3 years ago

hmm interesting is your local repo update to the current master? if you haven't try

git pull

on the other hand, maybe just install a newer version of Julia.

Roger-luo commented 3 years ago

I just installed julia-1.4 on my machine, it seems to work fine however.

kharazity commented 3 years ago

Just pulled, there seems to have been an update to the manifest.toml file since cloning yesterday. I seem to get a different build error now unfortunately:

Downloading artifact: Cairo
┌ Error: Error building `GR`: 
│ [ Info: Downloading pre-compiled GR 0.54.0 Ubuntu binary
│ ERROR: LoadError: syntax: `global grdir`: grdir is a local variable in its enclosing scope
│ Stacktrace:
│  [1] top-level scope at /home/kharazi/.julia/packages/GR/G9I5v/deps/build.jl:191
│  [2] include(::String) at ./client.jl:439
│  [3] top-level scope at none:5
│ in expression starting at /home/kharazi/.julia/packages/GR/G9I5v/deps/build.jl:191
└ @ Pkg.Operations /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:892
Roger-luo commented 3 years ago

It seems to be a GR issue. I'm wondering what if you open your Julia REPL and type ]add GR?

kharazity commented 3 years ago

Yep, that's it! Thanks!