Fix warnings in SBT build (#8026)

Fixes warnings on SBT startup

```
$ sbt
[info] welcome to sbt 1.9.0 (GraalVM Community Java 17.0.7)
...
[warn] 5 feature warnings; re-run with -feature for details
[warn] one warning found
[info] loading settings for project enso from build.sbt ...
```
This commit is contained in:
Dmitry Bushev 2023-10-12 09:19:45 +01:00 committed by GitHub
parent cd84ac16ce
commit 1a7e83b80c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -84,14 +84,14 @@ object BuildInfo {
private def getGitInformation(log: ManagedLogger): Option[GitInformation] =
try {
val hash = ("git rev-parse HEAD" !!).trim
val hash = "git rev-parse HEAD".!!.trim
val ref =
try {
val branchCommand = "git symbolic-ref -q --short HEAD"
val tagCommand = "git describe --tags --exact-match"
val refCommand =
branchCommand #|| tagCommand
(refCommand !!).trim
refCommand.!!.trim
} catch {
case e: Exception =>
log.warn(
@ -100,8 +100,8 @@ object BuildInfo {
)
"HEAD"
}
val isDirty = !("git status --porcelain" !!).trim.isEmpty
val latestCommitDate = ("git log HEAD -1 --format=%cd" !!).trim
val isDirty = "git status --porcelain".!!.trim.nonEmpty
val latestCommitDate = "git log HEAD -1 --format=%cd".!!.trim
Some(
GitInformation(
ref = ref,

View File

@ -33,7 +33,7 @@ object LibraryManifestGenerator {
val store =
cacheStoreFactory.make(s"library-manifest-$namespace-$name-$version")
val sources = (projectPath / "src" allPaths).get
val sources = (projectPath / "src").allPaths.get
Tracked.diffInputs(store, FileInfo.hash)(sources.toSet) { diff =>
def manifestExists = (projectPath / "manifest.yaml").exists()
if (diff.modified.nonEmpty || !manifestExists) {

View File

@ -9,3 +9,5 @@ addSbtPlugin("com.simplytyped" % "sbt-antlr4" % "0.8.3")
libraryDependencies += "io.circe" %% "circe-yaml" % "0.14.2"
libraryDependencies += "commons-io" % "commons-io" % "2.12.0"
libraryDependencies += "nl.gn0s1s" %% "bump" % "0.1.3"
scalacOptions ++= Seq("-deprecation", "-feature")