QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.
https://yaoquantum.org
Other
918 stars 119 forks source link

error occurs when running Pkg.develop("Yao") #419

Closed jzzhuang closed 2 years ago

jzzhuang commented 2 years ago

When I run Pkg.develop("Yao") to add some features into this package, I got

ERROR: Unsatisfiable requirements detected for package LuxurySparse [d05aeea4]:
 LuxurySparse [d05aeea4] log:
 ├─possible versions are: 0.1.0-0.7.0 or uninstalled
 ├─restricted to versions 0.7 by Yao [5872b779], leaving only versions 0.7.0  
 │ └─Yao [5872b779] log:
 │   ├─possible versions are: 0.8.2 or uninstalled
 │   └─Yao [5872b779] is fixed to version 0.8.2
 └─restricted by compatibility requirements with YaoBlocks [418bc28f] to versions: 0.6.0-0.6.13 — no versions left
   └─YaoBlocks [418bc28f] log:
     ├─possible versions are: 0.1.0-0.13.2 or uninstalled
     └─restricted to versions 0.13 by Yao [5872b779], leaving only versions 0.13.0-0.13.2
       └─Yao [5872b779] log: see above

I can't quite understand the error log above. But I've checked that all my packages are the latest version by running Pkg.update(). Th e output of status is as follows

(@v1.7) pkg> status
      Status `...\.julia\environments\v1.7\Project.toml`
  [336ed68f] CSV v0.10.4
  [b48ca7a8] CuYao v0.3.4
  [a93c6f00] DataFrames v1.3.4
  [d05aeea4] LuxurySparse v0.6.13
  [91a5bcdd] Plots v1.31.5
  [2913bbd2] StatsBase v0.33.20
  [5872b779] Yao v0.8.2
  [e600142f] YaoArrayRegister v0.9.1
  [418bc28f] YaoBlocks v0.13.2

I'm new to this so I'm not sure if this is my problem. Thanks for considering this!

GiggleLiu commented 2 years ago

From the error message, you should develop YaoBlocks too. Maybe also YaoSym.

jzzhuang commented 2 years ago

Thank you for your reply :) I emptied the folder /.julia/dev and tried develop the following related packages. However the error still exists

Here's the complete REPL

(@v1.7) pkg> develop Yao
     Cloning git-repo `https://github.com/QuantumBFS/Yao.jl.git`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LuxurySparse [d05aeea4]:
 LuxurySparse [d05aeea4] log:
 ├─possible versions are: 0.1.0-0.7.0 or uninstalled
 ├─restricted to versions 0.7 by Yao [5872b779], leaving only versions 0.7.0  
 │ └─Yao [5872b779] log:
 │   ├─possible versions are: 0.8.2 or uninstalled
 │   └─Yao [5872b779] is fixed to version 0.8.2
 └─restricted by compatibility requirements with YaoBlocks [418bc28f] to versions: 0.6.0-0.6.13 — no versions left
   └─YaoBlocks [418bc28f] log:
     ├─possible versions are: 0.1.0-0.13.2 or uninstalled
     └─restricted to versions 0.13 by Yao [5872b779], leaving only versions 0.13.0-0.13.2
       └─Yao [5872b779] log: see above

(@v1.7) pkg> develop YaoBlocks
Path `...\.julia\dev\Yao` exists and looks like the correct repo. 
Using existing path.
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LuxurySparse [d05aeea4]:
 LuxurySparse [d05aeea4] log:
 ├─possible versions are: 0.1.0-0.7.0 or uninstalled
 ├─restricted to versions 0.7 by YaoBlocks [418bc28f], leaving only versions 0.7.0
 │ └─YaoBlocks [418bc28f] log:
 │   ├─possible versions are: 0.13.2 or uninstalled
 │   └─YaoBlocks [418bc28f] is fixed to version 0.13.2
 └─restricted by compatibility requirements with CuYao [b48ca7a8] to versions: 0.6.0-0.6.13 — no versions left
   └─CuYao [b48ca7a8] log:
     ├─possible versions are: 0.1.0-0.3.4 or uninstalled
     ├─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.3.4
     └─restricted by compatibility requirements with BitBasis [50ba71b6] to versions: 0.3.4 or uninstalled, leaving only versions: 0.3.4
       └─BitBasis [50ba71b6] log:
         ├─possible versions are: 0.1.0-0.8.1 or uninstalled
         └─restricted to versions 0.8 by YaoBlocks [418bc28f], leaving only versions 0.8.0-0.8.1        
           └─YaoBlocks [418bc28f] log: see above

(@v1.7) pkg> develop YaoSym
Path `...\.julia\dev\Yao` exists and looks like the correct repo. Using existing path.      
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package YaoBlocks [418bc28f]:
 YaoBlocks [418bc28f] log:
 ├─possible versions are: 0.1.0-0.13.2 or uninstalled
 ├─restricted to versions 0.13 by YaoSym [3b27209a], leaving only versions 0.13.0-0.13.2
 │ └─YaoSym [3b27209a] log:
 │   ├─possible versions are: 0.6.0 or uninstalled
 │   └─YaoSym [3b27209a] is fixed to version 0.6.0
 └─restricted by compatibility requirements with LuxurySparse [d05aeea4] to versions: uninstalled — no versions left
   └─LuxurySparse [d05aeea4] log:
     ├─possible versions are: 0.1.0-0.7.0 or uninstalled
     └─restricted to versions 0.7 by YaoSym [3b27209a], leaving only versions 0.7.0
       └─YaoSym [3b27209a] log: see above

(@v1.7) pkg> develop YaoArrayRegister
Path `...\.julia\dev\Yao` exists and looks like the correct repo. Using existing path.      
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LuxurySparse [d05aeea4]:
 LuxurySparse [d05aeea4] log:
 ├─possible versions are: 0.1.0-0.7.0 or uninstalled
 ├─restricted to versions 0.7 by YaoArrayRegister [e600142f], leaving only versions 0.7.0
 │ └─YaoArrayRegister [e600142f] log:
 │   ├─possible versions are: 0.9.1 or uninstalled
 │   └─YaoArrayRegister [e600142f] is fixed to version 0.9.1
 └─restricted by compatibility requirements with YaoBlocks [418bc28f] to versions: 0.1.0-0.6.13 — no versions left
   └─YaoBlocks [418bc28f] log:
     ├─possible versions are: 0.1.0-0.13.2 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.13.2

(@v1.7) pkg> develop LuxurySparse
     Cloning git-repo `https://github.com/QuantumBFS/LuxurySparse.jl.git`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LuxurySparse [d05aeea4]:
 LuxurySparse [d05aeea4] log:
 ├─possible versions are: 0.7.0 or uninstalled
 ├─LuxurySparse [d05aeea4] is fixed to version 0.7.0
 └─found to have no compatible versions left with YaoBlocks [418bc28f]
   └─YaoBlocks [418bc28f] log:
     ├─possible versions are: 0.1.0-0.13.2 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.13.2
Roger-luo commented 2 years ago

Hi @jzzhuang I'd suggest never use the global environment for development, it is very hard to figure out which dependency is wrong. You can use the local environment to develop Yao using the following steps:

  1. git clone this repo (or your fork more precisely)
git clone https://github.com/QuantumBFS/Yao.jl.git Yao
  1. cd into this repo and open the project
cd Yao
julia --project # start with the local project

Or you can also open this folder with vscode and click the bottom of your vscode to change the environment from v1.7 to Yao

  1. dev the component you would like to change, YaoBlocks for example, or just dev all of them
pkg (Yao)> dev lib/YaoAPI lib/YaoArrayRegister lib/YaoBlocks lib/YaoSym
jzzhuang commented 2 years ago

That works! Thank you both so much!