地狱背后的原因是什么

地狱背后的原因是什么

本文介绍了cabal(依赖)地狱背后的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Cabal-install中如何发生依赖关系?



我在:

我明白为什么这样做通常会有意义,但不能用Cabal-install / ghc-pkg,因为您可以有多个版本安装相同的软件包。
就好像每个版本都是完全不同的软件包,在很多方面它的版本成为软件包名称的一部分(例如 mustaches-0.1 .0.0 ) - 也许它确实适用于ghc-pkg(我并不完全熟悉它,但它有道理)。

解决方案

您有这样的场景:


在B和C都依赖于A的情况下。但是,如果它们安装在不同的时间,它们可能会取决于不同的版本o例如,版本1导出类型T = Int ,但在版本2中导出 type T = Bool



只有当您尝试构建D时,您是否会暴露B和C针对不同版本的A构建的问题,并且您无法比较 T版本1 T版本2


How does dependency hell happen in Cabal-install?

I read the following at Cabal/Survival - HaskellWiki:

I understand why this would make sense generally, but not with Cabal-install/ghc-pkg, because you can have multiple versions of the same package installed.
It's as if every version is an entirely different package, with how that in many respects the version becomes a part of the package name (e.g. mustaches-0.1.0.0) -- and maybe it really is for ghc-pkg (I'm not entirely familiar with it, but it would make sense).

解决方案

You have scenarios like this:

Where both B and C depend on A. However, if they were installed at different times, they may depend on different versions of A. For example, A version 1 export type T = Int, but in version 2 it exports type T = Bool.

Only when you try to build D do you expose the problem that B and C were build against different versions of A, and you can't compare T version 1 against T version 2.

这篇关于cabal(依赖)地狱背后的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 06:09