Skip to content

Consider a "no build config found, are you in the right directory?" warning at startup #2668

@retronym

Description

@retronym

problem

When SBT is started in a directory without *.sbt or ./project/*.scala, SBT will soldier on, using defaults and config from the home directory.

The SBT-extras launcher script issues a error in this case, requiring -sbt-create to continue. I think this warning is useful enough to move into SBT itself.

A common way people make this mistake is to start SBT in a subdirectory of the project, rather than in the root.

expectation

SBT's official launcher script, or SBT's startup itself, could issue a warning if no project-specific config was found. This could be augmented with a search of the parent directories to give a "did you mean cd ../..; sbt?"

notes

Inspired by this new user experience https://gitter.im/scala/scala?at=5784992359cfbd4c5e8414a1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions