事實證明,我的應用名稱與上傳到hackage的軟件包之一相同,所以當我嘗試使用stack solver --resolver lts 7.12
解析額外的依賴關係時,我得到以下錯誤:Hackage name collision with extra-deps
$ stack solver --resolver lts-7.12
Using configuration file: stack.yaml
Using cabal packages:
- html-parse.cabal
Using resolver: lts-7.12
Using compiler: ghc-8.0.1
Asking cabal to calculate a build plan...
Trying with packages from lts-7.12 as hard constraints...
Attempt failed.
>>>> Cabal errors begin
cabal.exe: Could not resolve dependencies:
next goal: html-parse (user goal)
rejecting: html-parse-0.2.0.0, 0.1.0.0 (global constraint requires ==0.0.0.3)
trying: html-parse-0.0.0.3
next goal: hunit (dependency of html-parse-0.0.0.3)
Dependency tree exhaustively searched.
<<<< Cabal errors end
Could not parse cabal-install errors:
>>>> Cabal errors begin
cabal.exe: Could not resolve dependencies:
next goal: html-parse (user goal)
rejecting: html-parse-0.2.0.0, 0.1.0.0 (global constraint requires ==0.0.0.3)
trying: html-parse-0.0.0.3
next goal: hunit (dependency of html-parse-0.0.0.3)
Dependency tree exhaustively searched.
<<<< Cabal errors end
我在.cabal文件app /包的名字是html-parse
而當前版本是0.0.0.3。它看起來像我自己的軟件包被列爲依賴關係,約束條件爲==0.0.0.3
,但是hackage上有另一個名稱相同但版本不同的軟件包。
我可以以某種方式解決這個問題,而無需重命名我自己的應用程序?
感謝您的回答和編輯。我只是在想,我的核心應用程序不會被視爲一個軟件包,但現在我發現,爲了使用libs等來構建多個軟件包項目,所有內容都必須是cabal的一個軟件包。 – DuckOfDoom
這回答我的問題,謝謝。 – DuckOfDoom