From 2fe0f0a8bed7ff7316c868aa008a7d86f4ad423f Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Thu, 30 Oct 2025 09:06:19 +0100 Subject: [PATCH 1/3] Bump `scalafmt` to 3.10.1 (was 3.4.3) --- .scalafmt.conf | 2 +- build.sbt | 2 +- src/main/scala/ai/kien/python/Python.scala | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 2563f33..0ccff78 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.4.3" +version = "3.10.1" align.preset = more maxColumn = 100 runner.dialect = scala213source3 diff --git a/build.sbt b/build.sbt index 63eb7a3..60c6650 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ inThisBuild( organization := "ai.kien", homepage := Some(url("https://github.com/kiendang/python-native-libs")), licenses := List("BSD-3-Clause" -> url("https://opensource.org/licenses/BSD-3-Clause")), - developers := List( + developers := List( Developer( "kiendang", "Dang Trung Kien", diff --git a/src/main/scala/ai/kien/python/Python.scala b/src/main/scala/ai/kien/python/Python.scala index ce427d6..f096f44 100644 --- a/src/main/scala/ai/kien/python/Python.scala +++ b/src/main/scala/ai/kien/python/Python.scala @@ -89,7 +89,7 @@ class Python private[python] ( rawLdflags <- rawLdflags nativeLibraryPaths <- nativeLibraryPaths libPathFlags = nativeLibraryPaths.map("-L" + _) - flags = rawLdflags + flags = rawLdflags .split("\\s+(?=-)") .filter(f => f.nonEmpty && !libPathFlags.contains(f)) .flatMap(f => if (f.startsWith("-L")) Array(f) else f.split("\\s+")) @@ -107,7 +107,7 @@ class Python private[python] ( private def existsInPath(exec: String): Boolean = { val pathExts = getEnv("PATHEXT").getOrElse("").split(pathSeparator) - val l = for { + val l = for { elem <- path.split(pathSeparator).iterator elemPath = fs.getPath(elem) ext <- pathExts.iterator From 997be1764883664722360eba230a9fefeb43a805 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Thu, 30 Oct 2025 09:20:53 +0100 Subject: [PATCH 2/3] Bump things to the point where it actually compiles - bump `sbt` to 1.11.7 (was 1.7.1) - bump `sbt-mdoc` to 2.8.0 (was 2.3.3) - bump `sbt-ci-release` to 1.11.2 (was 1.5.10) - bump `sbt-scalafix` to 0.14.4 (was 0.10.1) - bump Scala 2.12 to 2.12.20 (was 2.12.15) - bump Scala 2.13 to 2.13.17 (was 2.13.6) - bump Scala 3 to 3.3.7 (was 3.0.2) --- build.sbt | 15 ++++++++------- project/build.properties | 2 +- project/plugins.sbt | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index 60c6650..e90a9cb 100644 --- a/build.sbt +++ b/build.sbt @@ -16,9 +16,9 @@ inThisBuild( ) ) -lazy val scala212 = "2.12.15" -lazy val scala213 = "2.13.6" -lazy val scala3 = "3.0.2" +lazy val scala212 = "2.12.20" +lazy val scala213 = "2.13.17" +lazy val scala3 = "3.3.7" ThisBuild / scalaVersion := scala213 ThisBuild / scalafixDependencies += organizeImports @@ -46,10 +46,11 @@ lazy val root = project } } ) - .settings( - sonatypeCredentialHost := "s01.oss.sonatype.org", - sonatypeRepository := "https://s01.oss.sonatype.org/service/local" - ) +// TODO: reconfigure sonatype publishing +// .settings( +// sonatypeCredentialHost := "s01.oss.sonatype.org", +// sonatypeRepository := "https://s01.oss.sonatype.org/service/local" +// ) lazy val docs = project .in(file("python-docs")) diff --git a/project/build.properties b/project/build.properties index 22af262..01a16ed 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.1 +sbt.version=1.11.7 diff --git a/project/plugins.sbt b/project/plugins.sbt index 8fc74fa..241c722 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,3 @@ -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.3") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.8.0") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.4") From 7248aa5aedc7cbd361db94102ea001da35073d47 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Thu, 30 Oct 2025 10:28:45 +0100 Subject: [PATCH 3/3] Make sure `coursier` install sbt on the CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5752dad..635bde6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: ${{ matrix.jdk }} - apps: sbtn + apps: sbtn sbt - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 with: