Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display warning when invoked in batch mode #2987

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

Display warning when invoked in batch mode #2987

eed3si9n opened this issue Mar 3, 2017 · 4 comments
Assignees
Milestone

Comments

@eed3si9n
Copy link
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
Copy link
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 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 sbt#2987
@dwijnand dwijnand closed this as completed Mar 9, 2017
@eed3si9n eed3si9n moved this from Todo to Done in Hackathon ideas Mar 12, 2017
eed3si9n pushed a commit to eed3si9n/sbt that referenced this issue Apr 5, 2017
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 sbt#2987
@koertkuipers
Copy link

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
Copy link
Member Author

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

@koertkuipers
Copy link

@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
Projects
None yet
Development

No branches or pull requests

3 participants