2014-12-21 4 views
3

sbt 빌드 구성이 상당히 복잡 할 수 있습니다. 그렇다면 빌드 정의에서 올바른 작업을 수행했는지 확신 할 수 없기 때문에 sbt가 수행 할 작업을 정확히 말하기는 어렵습니다. 대규모 프로젝트의 경우 변경 사항을 테스트하기 위해 전체 빌드 및 테스트주기를 실행하는 것은 정말 힘들고 느립니다.sbt의 실행 계획을 볼 수 있습니까?

예를 들어, sbt를 빌드하여 프로젝트를 병렬로 테스트하려고합니다. 내가보고 SBT를 요청할 수 있다면 그것은 좋은 것 :

  • 정확히 어떤 옵션 각 JVM이 할당 될 때

    • 정확히 얼마나 많은 JVM에이 갈래 될 것이며을
    • 작업은 각 JVM에 할당됩니다 정확히
    • 시험은 아마도 전체 빌드 및 테스트를 수행하여 JVM은 아마이 정보의 일부는, 몇 가지 작업을 수행하여 확인할 수 있습니다

    로 분류됩니다 정확히 어떻게. 그럼에도 불구하고 어떤 일이 벌어지고 있는지 명확하게 보여주는 깔끔한보고를하는 것은 대단한 일입니다.

    sbt는 이러한 기능을 제공합니까?

  • +1

    @Jacek - JVM의 구성 및 테스트/태스크 배포는 누군가가 계획을보고 싶어 할 수도 있지만 실행 계획을위한 다른 사용 사례가있을 수 있습니다. (또한 JVM 당 몇 가지 작업이 언급되었고 그 반대의 경우는 없습니다.) –

    답변

    1

    나는 그것이 쉽게 sbt에서 달성 될 수 있다고 생각하지 않는다.

    inspect 명령이있어 필요한 것을 알 수 있지만 전체적인 계획을 세우기 위해 많은 부분을 잃어 버렸습니다.

    > help inspect 
    inspect <key> 
    
        For a plain setting, the value bound to the key argument is displayed using its toString method. 
        Otherwise, the type of task ("Task" or "Input task") is displayed. 
    
        "Dependencies" shows the settings that this setting depends on. 
    
        "Reverse dependencies" shows the settings that depend on this setting. 
    
        When a key is resolved to a value, it may not actually be defined in the requested scope. 
        In this case, there is a defined search sequence. 
        "Delegates" shows the scopes that are searched for the key. 
        "Provided by" shows the scope that contained the value returned for the key. 
    
        "Related" shows all of the scopes in which the key is defined. 
    
    inspect tree <key> 
    
        Displays `key` and its dependencies in a tree structure. 
        For settings, the value bound to the setting is displayed and for tasks, the type of the task is shown. 
    
    inspect uses <key> 
    
        Displays the settings and tasks that directly depend on `key`. 
    
    inspect definitions <key> 
    
        Displays the scopes in which `key` is defined. 
    

    이 명령에 대해 알아 보려면 Inspect the build을 읽으십시오.

    는 또한 fork 또는 javaOptions 같은 일부 설정 show을 사용할 수 있습니다 :

    > help fork 
    If true, forks a new JVM when running. If false, runs in the same JVM as the build. 
    
    > help javaOptions 
    Options passed to a new JVM when forking. 
    

    은 공식 문서에서 Forking 참조하십시오.

    나는 이와 같은 도구를 갖고 싶습니다.

    +0

    ['inspect'] (http://www.scala-sbt.org/0.13/docs/Inspecting-Settings.html)는 다음과 같습니다. 유용한 도구. 예제에서 언급 한 정보 중 일부를 보여줄 수있는'inspect' 사용 예제가 있습니까? –

    관련 문제