2016-10-03 4 views
2

단계 재현 :'stack build --profile'을 사용할 때 종속성 문제가 있습니까?

$ stack new profiling-test 
$ cd profiling-test 
$ stack build --profile 

새로운 프로젝트는 lts-7.2 및 기본 템플릿으로 초기화됩니다. 오류가 발생합니다.

While constructing the BuildPlan the following exceptions were encountered: 

-- While attempting to add dependency, 
    Could not find package base in known packages 

-- Failure when adding dependencies: 
     base: needed (>=4.7 && <5), stack configuration has no specified version (latest applicable is 4.9.0.0) 
    needed for package profiling-test-0.1.0.0 

Recommended action: try adding the following to your extra-deps in ~/profiling-test/stack.yaml 
- base-4.9.0.0 

You may also want to try the 'stack solver' command 

stack build을 그냥 수행하면 오류없이 정상적으로 컴파일됩니다.

base-4.9.0.0extra-deps을 넣었습니다. stack.yaml에 동일한 오류가 표시됩니다.

$ stack --version 
Version 1.1.3, Git revision 225df244ea346a8dc880ef911b002583486a92b2 x86_64 hpack-0.14.0 

그리고 우분투 14.04 믿음직한를 실행 해요 :

내 스택 버전입니다.

미리 도움을 청하십시오!

답변

2

https://github.com/commercialhaskell/stack/issues/1331을 찾은 후에 나타납니다.

솔루션 :

$ stack build --profile 
  • 할 일을하고

    • 대신 :

      $ stack build --profile --no-system-ghc 
      

    그리고 모든 걸에 --no-system-ghc를 추가합니다. 모든 것을하기 전에 잠재적으로 stack setup --no-system-ghc해야 할 수도 있습니다.

    또는 의견에 의해 제안 된대로이 프로젝트 또는 글로벌 스택 프로젝트의 stack.yaml에 추가 할 수 있습니다.

  • +2

    모든 명령에'--no-system-ghc' 플래그를 추가하고 싶다면'stack.yaml'에 추가 할 수 있습니다 (아마도 프로젝트의 것이 아닌 로컬). –