Display warning when invoked in batch mode #2987

Closed
eed3si9n opened this Issue Mar 3, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@eed3si9n
Member

eed3si9n commented Mar 3, 2017

steps

Someone runs $ sbt compile from the terminal.

expectation

Display

Executing "compile" in batch mode. Note running "sbt" and executing "compile" from the shell repeatedly is going to compile much faster. (Think 2x)

notes

It's been pointed out many times that batch mode is 1.3x ~ 2x slower because of Scalac JIT (and from sbt 0.13.13 classloader caching)
https://twitter.com/eed3si9n/status/837585213563801600

@dwijnand

This comment has been minimized.

Show comment
Hide comment
@dwijnand

dwijnand Mar 3, 2017

Member

Duplicate of sbt/website#319 (comment), but I'm happy to track this here now.

Member

dwijnand commented Mar 3, 2017

Duplicate of sbt/website#319 (comment), but I'm happy to track this here now.

@dwijnand dwijnand self-assigned this Mar 6, 2017

@dwijnand dwijnand added this to the 0.13.14 milestone Mar 6, 2017

dwijnand added a commit to dwijnand/sbt that referenced this issue Mar 7, 2017

Notify & enable users to stay in the warm shell
Notify & enable users to stay in sbt's shell on the warm JVM by hitting
[ENTER] while sbt is running.

Looks like this; first I run 'sbt about', then I hit [ENTER]:

    $ sbt about
    [info] !!! Executing in batch mode !!! For better performance, hit [ENTER] to remain in the sbt shell

    [info] Loading global plugins from /Users/dnw/.dotfiles/.sbt/0.13/plugins
    [info] Loading project definition from /s/t/project
    [info] Set current project to t (in build file:/s/t/)
    [info] This is sbt 0.13.14-SNAPSHOT
    [info] The current project is {file:/s/t/}t 0.1.0-SNAPSHOT
    [info] The current project is built against Scala 2.12.1
    [info] Available Plugins: sbt.plugins.IvyPlugin, sbt.plugins.JvmPlugin, sbt.plugins.CorePlugin, sbt.plugins.JUnitXmlReportPlugin, sbt.plugins.Giter8TemplatePlugin
    [info] sbt, sbt plugins, and build definitions are using Scala 2.10.6
    >
    >

Fixes #2987

@dwijnand dwijnand added the in progress label Mar 7, 2017

@dwijnand dwijnand closed this Mar 9, 2017

@dwijnand dwijnand removed the in progress label Mar 9, 2017

@eed3si9n eed3si9n moved this from Todo to Done in Hackathon ideas Mar 12, 2017

eed3si9n added a commit to eed3si9n/sbt that referenced this issue Apr 5, 2017

Notify & enable users to stay in the warm shell
Notify & enable users to stay in sbt's shell on the warm JVM by hitting
[ENTER] while sbt is running.

Looks like this; first I run 'sbt about', then I hit [ENTER]:

    $ sbt about
    [info] !!! Executing in batch mode !!! For better performance, hit [ENTER] to remain in the sbt shell

    [info] Loading global plugins from /Users/dnw/.dotfiles/.sbt/0.13/plugins
    [info] Loading project definition from /s/t/project
    [info] Set current project to t (in build file:/s/t/)
    [info] This is sbt 0.13.14-SNAPSHOT
    [info] The current project is {file:/s/t/}t 0.1.0-SNAPSHOT
    [info] The current project is built against Scala 2.12.1
    [info] Available Plugins: sbt.plugins.IvyPlugin, sbt.plugins.JvmPlugin, sbt.plugins.CorePlugin, sbt.plugins.JUnitXmlReportPlugin, sbt.plugins.Giter8TemplatePlugin
    [info] sbt, sbt plugins, and build definitions are using Scala 2.10.6
    >
    >

Fixes #2987
@koertkuipers

This comment has been minimized.

Show comment
Hide comment
@koertkuipers

koertkuipers Apr 26, 2017

i find this feature annoying.

if i run "sbt clean test publish" then i know what i am doing, and i do now want me accidentally hitting an extra [ENTER] to put me in interactive mode.

i is especially bad when the sbt call is part of a larger script. i have various bash scripts that automatically build multiple projects, and now they sometimes manage to enter interactive mode at times (i am guessing because i hit enter by accident while inspecting terminal output?)

is there a way to disable this? thanks

i find this feature annoying.

if i run "sbt clean test publish" then i know what i am doing, and i do now want me accidentally hitting an extra [ENTER] to put me in interactive mode.

i is especially bad when the sbt call is part of a larger script. i have various bash scripts that automatically build multiple projects, and now they sometimes manage to enter interactive mode at times (i am guessing because i hit enter by accident while inspecting terminal output?)

is there a way to disable this? thanks

@eed3si9n

This comment has been minimized.

Show comment
Hide comment
@eed3si9n

eed3si9n Apr 26, 2017

Member

@koertkuipers There's a discussion going on in #3091 on how to improve the implementation. Could you repost your comment there please?

Member

eed3si9n commented Apr 26, 2017

@koertkuipers There's a discussion going on in #3091 on how to improve the implementation. Could you repost your comment there please?

@koertkuipers

This comment has been minimized.

Show comment
Hide comment
@koertkuipers

koertkuipers Apr 26, 2017

@eed3si9n okay i will repost there. thanks

@eed3si9n okay i will repost there. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment