cabal 沙盒中的所有内容是否都从头开始重新安装?
Is everything reinstalled from scratch in cabal sandboxes?
让我们假设以下过程:
cd /home/user/experiment
git clone https://github.com/ryantrinkle/reflex.git
cabal sandbox init
cabal install --dependencies-only
问题:
此时 /home/user/experiment
中的沙箱将包含哪些包?它会包含 Reflex 的整个依赖层次结构树吗?
换句话说,如果 Reflex 是根包,那么 Reflex 的整个依赖树是否会从头开始 独立 编译?已经安装在 cabal 的全局包存储库中了吗?
我怀疑是的,但我不确定。
当我执行上面的命令序列时,会安装以下软件包:
[vagrant@localhost reflex]$ cabal install --only-dependencies
Resolving dependencies...
Notice: installing into a sandbox located at /home/vagrant/reflex
Downloading dependent-sum-0.2.1.0...
Configuring base-orphans-0.3.3...
Downloading primitive-0.5.4.0...
Configuring mtl-2.2.1...
Building base-orphans-0.3.3...
Building mtl-2.2.1...
Installed base-orphans-0.3.3
Configuring nats-1...
Building nats-1...
Installed nats-1
Configuring stm-2.4.4...
Configuring tagged-0.8.0.1...
Installed mtl-2.2.1
Building stm-2.4.4...
Building tagged-0.8.0.1...
Configuring text-1.2.1.1...
Installed stm-2.4.4
Downloading ref-tf-0.4...
Configuring transformers-compat-0.4.0.4...
Installed tagged-0.8.0.1
Building text-1.2.1.1...
Building transformers-compat-0.4.0.4...
Configuring dependent-sum-0.2.1.0...
Installed transformers-compat-0.4.0.4
Building dependent-sum-0.2.1.0...
Configuring primitive-0.5.4.0...
Installed dependent-sum-0.2.1.0
Downloading dependent-map-0.1.1.3...
Building primitive-0.5.4.0...
Installed primitive-0.5.4.0
Configuring ref-tf-0.4...
Building ref-tf-0.4...
Installed ref-tf-0.4
Configuring StateVar-1.1.0.0...
Building StateVar-1.1.0.0...
Configuring distributive-0.4.4...
Installed StateVar-1.1.0.0
Building distributive-0.4.4...
Configuring dependent-map-0.1.1.3...
Installed distributive-0.4.4
Building dependent-map-0.1.1.3...
Configuring vector-0.10.12.3...
Installed dependent-map-0.1.1.3
Building vector-0.10.12.3...
Installed text-1.2.1.1
Configuring hashable-1.2.3.2...
Building hashable-1.2.3.2...
Installed hashable-1.2.3.2
Configuring unordered-containers-0.2.5.1...
Building unordered-containers-0.2.5.1...
Installed unordered-containers-0.2.5.1
Configuring semigroups-0.16.2.2...
Building semigroups-0.16.2.2...
Installed semigroups-0.16.2.2
Configuring void-0.7...
Configuring bifunctors-5...
Installed vector-0.10.12.3
Building void-0.7...
Building bifunctors-5...
Installed void-0.7
Configuring contravariant-1.3.1.1...
Building contravariant-1.3.1.1...
Installed contravariant-1.3.1.1
Configuring comonad-4.2.6...
Installed bifunctors-5
Building comonad-4.2.6...
Installed comonad-4.2.6
Configuring profunctors-5.1.1...
Configuring semigroupoids-5.0.0.2...
Building profunctors-5.1.1...
Building semigroupoids-5.0.0.2...
Installed profunctors-5.1.1
Installed semigroupoids-5.0.0.2
Downloading these-0.4.1...
Configuring these-0.4.1...
Building these-0.4.1...
Installed these-0.4.1
这似乎太多了。
Reflex 的依赖树中包含的正是这些包吗?
我怀疑是的,但我不确定,所以这个问题。
不完全是。目前,沙箱也使用全局包数据库中的任何内容。我相信 cabal-install 的未来版本会将其限制在 GHC 附带的几个列入白名单的核心包中(而且无论如何都不应该替换 t/can)。
让我们假设以下过程:
cd /home/user/experiment
git clone https://github.com/ryantrinkle/reflex.git
cabal sandbox init
cabal install --dependencies-only
问题:
此时 /home/user/experiment
中的沙箱将包含哪些包?它会包含 Reflex 的整个依赖层次结构树吗?
换句话说,如果 Reflex 是根包,那么 Reflex 的整个依赖树是否会从头开始 独立 编译?已经安装在 cabal 的全局包存储库中了吗?
我怀疑是的,但我不确定。
当我执行上面的命令序列时,会安装以下软件包:
[vagrant@localhost reflex]$ cabal install --only-dependencies
Resolving dependencies...
Notice: installing into a sandbox located at /home/vagrant/reflex
Downloading dependent-sum-0.2.1.0...
Configuring base-orphans-0.3.3...
Downloading primitive-0.5.4.0...
Configuring mtl-2.2.1...
Building base-orphans-0.3.3...
Building mtl-2.2.1...
Installed base-orphans-0.3.3
Configuring nats-1...
Building nats-1...
Installed nats-1
Configuring stm-2.4.4...
Configuring tagged-0.8.0.1...
Installed mtl-2.2.1
Building stm-2.4.4...
Building tagged-0.8.0.1...
Configuring text-1.2.1.1...
Installed stm-2.4.4
Downloading ref-tf-0.4...
Configuring transformers-compat-0.4.0.4...
Installed tagged-0.8.0.1
Building text-1.2.1.1...
Building transformers-compat-0.4.0.4...
Configuring dependent-sum-0.2.1.0...
Installed transformers-compat-0.4.0.4
Building dependent-sum-0.2.1.0...
Configuring primitive-0.5.4.0...
Installed dependent-sum-0.2.1.0
Downloading dependent-map-0.1.1.3...
Building primitive-0.5.4.0...
Installed primitive-0.5.4.0
Configuring ref-tf-0.4...
Building ref-tf-0.4...
Installed ref-tf-0.4
Configuring StateVar-1.1.0.0...
Building StateVar-1.1.0.0...
Configuring distributive-0.4.4...
Installed StateVar-1.1.0.0
Building distributive-0.4.4...
Configuring dependent-map-0.1.1.3...
Installed distributive-0.4.4
Building dependent-map-0.1.1.3...
Configuring vector-0.10.12.3...
Installed dependent-map-0.1.1.3
Building vector-0.10.12.3...
Installed text-1.2.1.1
Configuring hashable-1.2.3.2...
Building hashable-1.2.3.2...
Installed hashable-1.2.3.2
Configuring unordered-containers-0.2.5.1...
Building unordered-containers-0.2.5.1...
Installed unordered-containers-0.2.5.1
Configuring semigroups-0.16.2.2...
Building semigroups-0.16.2.2...
Installed semigroups-0.16.2.2
Configuring void-0.7...
Configuring bifunctors-5...
Installed vector-0.10.12.3
Building void-0.7...
Building bifunctors-5...
Installed void-0.7
Configuring contravariant-1.3.1.1...
Building contravariant-1.3.1.1...
Installed contravariant-1.3.1.1
Configuring comonad-4.2.6...
Installed bifunctors-5
Building comonad-4.2.6...
Installed comonad-4.2.6
Configuring profunctors-5.1.1...
Configuring semigroupoids-5.0.0.2...
Building profunctors-5.1.1...
Building semigroupoids-5.0.0.2...
Installed profunctors-5.1.1
Installed semigroupoids-5.0.0.2
Downloading these-0.4.1...
Configuring these-0.4.1...
Building these-0.4.1...
Installed these-0.4.1
这似乎太多了。
Reflex 的依赖树中包含的正是这些包吗?
我怀疑是的,但我不确定,所以这个问题。
不完全是。目前,沙箱也使用全局包数据库中的任何内容。我相信 cabal-install 的未来版本会将其限制在 GHC 附带的几个列入白名单的核心包中(而且无论如何都不应该替换 t/can)。