#haskell #build #haskell-stack
Вопрос:
Проблема, с которой я сталкиваюсь, заключается в том, что я добавляю graphite
зависимость в новый проект, и он не создается. Почему это происходит и что можно сделать, чтобы исправить это?
Чтобы воспроизвести
- Бежать
stack new project
. - Бежать
cd project
. - Запуск
stack build
(работает, как ожидалось). - Отредактируйте
package.yaml
и добавьте графит в качестве зависимости.
dependencies: - base gt;= 4.7 amp;amp; lt; 5 - graphite # add this line
- Запустите
stack build
(не работает).
QuickCheckgt; configure QuickCheckgt; Configuring QuickCheck-2.14.2... QuickCheckgt; build graphviz gt; configure QuickCheckgt; Preprocessing library for QuickCheck-2.14.2.. QuickCheckgt; Building library for QuickCheck-2.14.2.. QuickCheckgt; [ 1 of 16] Compiling Test.QuickCheck.Exception graphviz gt; Configuring graphviz-2999.20.1.0... QuickCheckgt; [ 2 of 16] Compiling Test.QuickCheck.Random QuickCheckgt; QuickCheckgt; /tmp/stack-05e37a900bbf6a92/QuickCheck-2.14.2/src/Test/QuickCheck/Random.hs:9:1: error: QuickCheckgt; Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/random-1.2.0-GAV679NMk7iDELNoxF99p4/System/Random.hi QuickCheckgt; Data.Binary.getPrim: end of file QuickCheckgt; | QuickCheckgt; 9 | import System.Random QuickCheckgt; | ^^^^^^^^^^^^^^^^^^^^ QuickCheckgt; graphviz gt; build scientificgt; configure graphviz gt; Preprocessing library for graphviz-2999.20.1.0.. graphviz gt; Building library for graphviz-2999.20.1.0.. graphviz gt; [ 1 of 31] Compiling Data.GraphViz.Attributes.ColorScheme scientificgt; Configuring scientific-0.3.7.0... scientificgt; build vector gt; configure scientificgt; Preprocessing library for scientific-0.3.7.0.. scientificgt; Building library for scientific-0.3.7.0.. scientificgt; [1 of 5] Compiling GHC.Integer.Compat scientificgt; [2 of 5] Compiling Utils scientificgt; scientificgt; /tmp/stack-05e37a900bbf6a92/scientific-0.3.7.0/src/Utils.hs:17:1: error: scientificgt; Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/primitive-0.7.3.0-HMedJdQUTCQ79SiIUfisnA/Data/Primitive/Array.hi scientificgt; Data.Binary.getPrim: end of file scientificgt; | scientificgt; 17 | import qualified Data.Primitive.Array as Primitive scientificgt; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ scientificgt; vector gt; Configuring vector-0.12.3.1... vector gt; build vector gt; Preprocessing library for vector-0.12.3.1.. vector gt; Building library for vector-0.12.3.1.. graphviz gt; [ 2 of 31] Compiling Data.GraphViz.Exception graphviz gt; [ 3 of 31] Compiling Data.GraphViz.Internal.State graphviz gt; graphviz gt; /tmp/stack-05e37a900bbf6a92/graphviz-2999.20.1.0/Data/GraphViz/Internal/State.hs:33:1: error: graphviz gt; Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/polyparse-1.13-CS3hwJapEwUHObxSp4JF8T/Text/ParserCombinators/Poly/StateText.hi graphviz gt; Data.Binary.getPrim: end of file graphviz gt; | graphviz gt; 33 | import Text.ParserCombinators.Poly.StateText (Parser, stQuery, stUpdate) graphviz gt; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ graphviz gt; vector gt; [ 1 of 21] Compiling Data.Vector.Fusion.Util vector gt; [ 2 of 21] Compiling Data.Vector.Fusion.Bundle.Size vector gt; [ 3 of 21] Compiling Data.Vector.Generic.Mutable.Base vector gt; vector gt; /tmp/stack-05e37a900bbf6a92/vector-0.12.3.1/Data/Vector/Generic/Mutable/Base.hs:18:1: error: vector gt; Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/primitive-0.7.3.0-HMedJdQUTCQ79SiIUfisnA/Control/Monad/Primitive.hi vector gt; Data.Binary.getPrim: end of file vector gt; | vector gt; 18 | import Control.Monad.Primitive ( PrimMonad, PrimState ) vector gt; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ vector gt; Progress 4/8 -- While building package vector-0.12.3.1 (scroll up to its section to see the error) using: /home/waynevanson/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.7 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1 -- While building package graphviz-2999.20.1.0 (scroll up to its section to see the error) using: /home/waynevanson/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.7 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1 -- While building package scientific-0.3.7.0 (scroll up to its section to see the error) using: /home/waynevanson/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.7 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1 -- While building package QuickCheck-2.14.2 (scroll up to its section to see the error) using: /home/waynevanson/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.7 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1
Зацени это:
QuickCheckgt; /tmp/stack-05e37a900bbf6a92/QuickCheck-2.14.2/src/Test/QuickCheck/Random.hs:9:1: error: QuickCheckgt; Bad interface file: /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7 /lib/x86_64-linux-ghc-8.10.7/random-1.2.0-GAV679NMk7iDELNoxF99p4/System/Random.hi QuickCheckgt; Data.Binary.getPrim: end of file
Я перехожу к /home/waynevanson/.stack/snapshots/x86_64-linux-tinfo6/b3cf699ace1558dcb39ae886a5a104f0e17753ec2ae390d996aa847a910da0d0/8.10.7/lib/x86_64-linux-ghc-8.10.7/random-1.2.0-GAV679NMk7iDELNoxF99p4/System/Random.hi
, и файл пуст. Я не верю, что он должен быть пустым.
graphite
доступен в распознавателе, насколько я понимаю.