代码之家  ›  专栏  ›  技术社区  ›  LetMeSOThat4U

无法安装堆栈运行

  •  1
  • LetMeSOThat4U  · 技术社区  · 7 年前

    按照第页的说明 https://marketplace.visualstudio.com/items?itemName=UCL.haskelly ,我正在尝试:

    % stack build stack-run
    stack-run-0.1.1.4: configure
    stack-run-0.1.1.4: build
    
    --  While building custom Setup.hs for package stack-run-0.1.1.4 using:
          /home/mark/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
        Process exited with code: ExitFailure 1
        Logs have been written to: /home/mark/haskell/hl1/.stack-work/logs/stack-run-0.1.1.4.log
    
        Configuring stack-run-0.1.1.4...
        Preprocessing executable 'stack-run' for stack-run-0.1.1.4..
        Building executable 'stack-run' for stack-run-0.1.1.4..
    
        /tmp/stack2483/stack-run-0.1.1.4/unix/System/Console/Questioner.hs:4:14: warning:
            -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
          |
        4 | {-# LANGUAGE OverlappingInstances  #-}
          |              ^^^^^^^^^^^^^^^^^^^^
        [1 of 5] Compiling System.Console.Questioner.Autocomplete ( unix/System/Console/Questioner/Autocomplete.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/stack-run/stack-run-tmp/System/Console/Questioner/Autocomplete.o )
        [2 of 5] Compiling System.Console.Questioner.Util ( unix/System/Console/Questioner/Util.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/stack-run/stack-run-tmp/System/Console/Questioner/Util.o )
        [3 of 5] Compiling System.Console.Questioner.ProgressIndicators ( unix/System/Console/Questioner/ProgressIndicators.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/stack-run/stack-run-tmp/System/Console/Questioner/ProgressIndicators.o )
        [4 of 5] Compiling System.Console.Questioner ( unix/System/Console/Questioner.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/stack-run/stack-run-tmp/System/Console/Questioner.o )
        [5 of 5] Compiling Main             ( src/Main.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/stack-run/stack-run-tmp/Main.o )
    
        /tmp/stack2483/stack-run-0.1.1.4/src/Main.hs:18:1: error:
            Could not find module ‘Distribution.PackageDescription.Parse’
            Perhaps you meant
              Distribution.PackageDescription.Parsec (from Cabal-2.2.0.1)
              Distribution.PackageDescription.Check (from Cabal-2.2.0.1)
              Distribution.PackageDescription.Quirks (from Cabal-2.2.0.1)
            Use -v to see a list of the files searched for.
           |
        18 | import           Distribution.PackageDescription.Parse
           | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    

    我刚安装了 stack

    抱怨了一些软件包,所以根据建议的操作,我添加了以下内容 stack.yaml

    extra-deps: [conduit-1.2.13.1, conduit-extra-1.1.17, resourcet-1.1.11, streaming-commons-0.1.19]
    

    堆栈版本:

    % stack --version
    Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2
    
    
    
    
    
    name:                hl1
    version:             0.1.0.0
    github:              "githubuser/hl1"
    license:             BSD3
    author:              "Author name here"
    maintainer:          "example@example.com"
    copyright:           "2018 Author name here"
    
    extra-source-files:
    - README.md
    - ChangeLog.md
    
    # Metadata used when publishing your package
    # synopsis:            Short description of your package
    # category:            Web
    
    # To avoid duplicated efforts in documentation and dealing with the
    # complications of embedding Haddock markup inside cabal files, it is
    # common to point users to the README.md file.
    description:         Please see the README on GitHub at <https://github.com/githubuser/hl1#readme>
    
    dependencies:
    - base >= 4.7 && < 5
    
    library:
      source-dirs: src
    
    executables:
      hl1-exe:
        main:                Main.hs
        source-dirs:         app
        ghc-options:
        - -threaded
        - -rtsopts
        - -with-rtsopts=-N
        dependencies:
        - hl1
    
    tests:
      hl1-test:
        main:                Spec.hs
        source-dirs:         test
        ghc-options:
        - -threaded
        - -rtsopts
        - -with-rtsopts=-N
        dependencies:
        - hl1
    
    1 回复  |  直到 7 年前
        1
  •  2
  •   Dan Burton    7 年前

    主要问题如下:

        Could not find module ‘Distribution.PackageDescription.Parse’
    

    stack-run Cabal . 从2.2阴谋集团开始,那个模块就被拆除了。

    网上有一个公开的公关 堆栈运行

    https://github.com/yamadapc/stack-run/pull/15/files#diff-f8f3412da88cd4806f23d59fe59ebc3bR19