-
Notifications
You must be signed in to change notification settings - Fork 928
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
Print a warning if sbt.version is not defined in the project/build.properties #754
Comments
this'd be great. I often run into people who aren't aware this is recommended practice. there are also people who are aware, but never quite get around to adding the version, and a nudge from a warning would help. |
We should just create one automatically if it's not there at startup. |
@eed3si9n Sure, but only after being prompted. Otherwise we run the risk of creating |
|
Ok, so to mitigate accidental file creation we can use sbt-extras' algorithm: the presence of a .sbt file at the root or a 'project' directory at the root. |
Silently create the file. |
If there's no sbt.version, no *.sbt file and no project directory, e.g you accidentally started sbt in /tmp, warn and continue, in both 0.13 and 1.0. |
Have sbt.version set in project/build.properties is a best practice because it makes the build more deterministic and reproducible. With this change sbt, after ensuring that the base directory is probably an sbt project, writes out sbt.version in project/build.properties if it is missing. Fixes sbt#754
Have sbt.version set in project/build.properties is a best practice because it makes the build more deterministic and reproducible. With this change sbt, after ensuring that the base directory is probably an sbt project, writes out sbt.version in project/build.properties if it is missing. Fixes sbt#754
This would help creating more reproducible builds.
The text was updated successfully, but these errors were encountered: