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

Update Mill to 0.11.13 #308

Merged
merged 9 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
java-version: 11.0.x
distribution: zulu
- name: Style checks
run: ./mill all __.checkStyle __.docJar
run: ./mill __.checkStyle + __.docJar

integration-kubernetes-v1-25:
runs-on: ubuntu-latest
Expand All @@ -43,7 +43,7 @@ jobs:
java-version: 11.0.x
distribution: zulu
- name: Test against Kubernetes v1.25
run: ./mill __[3.3.1].test
run: ./mill __[3.3.4].test

integration-kubernetes-v1-24:
runs-on: ubuntu-latest
Expand All @@ -63,7 +63,7 @@ jobs:
java-version: 11.0.x
distribution: zulu
- name: Test against Kubernetes v1.24
run: ./mill __[3.3.1].test
run: ./mill __[3.3.4].test

integration-kubernetes-v1-23:
runs-on: ubuntu-latest
Expand All @@ -83,7 +83,7 @@ jobs:
java-version: 11.0.x
distribution: zulu
- name: Test against Kubernetes v1.23
run: ./mill __[3.3.1].test
run: ./mill __[3.3.4].test

integration-kubernetes-v1-22:
runs-on: ubuntu-latest
Expand All @@ -103,7 +103,7 @@ jobs:
java-version: 11.0.x
distribution: zulu
- name: Test against Kubernetes v1.22
run: ./mill __[3.3.1].test
run: ./mill __[3.3.4].test

integration-kubernetes-v1-21:
runs-on: ubuntu-latest
Expand All @@ -123,7 +123,7 @@ jobs:
java-version: 11.0.x
distribution: zulu
- name: Test against Kubernetes v1.21
run: ./mill __[3.3.1].test
run: ./mill __[3.3.4].test

publish:
needs:
Expand Down
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.15
0.11.13
5 changes: 5 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ rewrite.redundantBraces.stringInterpolation = true
rewrite.imports.sort = original
rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.removeOptionalBraces = oldSyntaxToo
fileOverride {
"glob:**/*.sc" {
runner.dialect = scala213
}
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,21 +275,21 @@ Generate a BSP configuration:
### Compiling

```shell
./mill kubernetes-client[2.13.10].compile
./mill kubernetes-client[2.13.15].compile
```

### Running the tests

All tests:

```shell
./mill kubernetes-client[2.13.10].test
./mill kubernetes-client[2.13.15].test
```

A specific test:

```shell
./mill kubernetes-client[2.13.10].test.testOnly 'com.goyeau.kubernetes.client.api.PodsApiTest'
./mill kubernetes-client[2.13.15].test.testOnly 'com.goyeau.kubernetes.client.api.PodsApiTest'
```

[minikube](https://minikube.sigs.k8s.io/docs/) has to be installed and running.
Expand Down
19 changes: 8 additions & 11 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import $ivy.`com.goyeau::mill-git::0.2.5`
import $ivy.`com.goyeau::mill-scalafix::0.3.1`
import $ivy.`org.typelevel::scalac-options:0.1.4`
import $ivy.`com.goyeau::mill-scalafix::0.4.2`
import $ivy.`org.typelevel::scalac-options:0.1.7`

import $file.project.Dependencies
import Dependencies.Dependencies._
import $file.project.SwaggerModelGenerator
import SwaggerModelGenerator.SwaggerModelGenerator
import com.goyeau.mill.git.{GitVersionModule, GitVersionedPublishModule}
import com.goyeau.mill.scalafix.StyleModule
import mill._
Expand All @@ -16,19 +15,17 @@ import mill.scalalib.publish.{Developer, License, PomSettings, VersionControl}
import org.typelevel.scalacoptions.ScalacOptions.{advancedOption, fatalWarningOptions, release, source3}
import org.typelevel.scalacoptions.{ScalaVersion, ScalacOptions}

object `kubernetes-client` extends Cross[KubernetesClientModule]("3.3.1", "2.13.10", "2.12.17")
class KubernetesClientModule(val crossScalaVersion: String)
object `kubernetes-client` extends Cross[KubernetesClientModule]("3.3.4", "2.13.15", "2.12.17")
trait KubernetesClientModule
extends CrossScalaModule
with StyleModule
with GitVersionedPublishModule
with SwaggerModelGenerator {
with SwaggerModelGenerator.SwaggerModelGenerator {
lazy val jvmVersion = "11"
override def javacOptions = super.javacOptions() ++ Seq("-source", jvmVersion, "-target", jvmVersion)
override def scalacOptions = super.scalacOptions() ++ ScalacOptions.tokensForVersion(
scalaVersion() match {
case "3.3.1" => ScalaVersion.V3_3_1
case "2.13.10" => ScalaVersion.V2_13_9
case "2.12.17" => ScalaVersion.V2_12_13
case s"$major.$minor.$patch" => ScalaVersion(major.toInt, minor.toInt, patch.toInt)
},
ScalacOptions.default + release(jvmVersion) + source3 +
advancedOption("max-inlines", List("50"), _.isAtLeast(ScalaVersion.V3_0_0)) // ++ fatalWarningOptions
Expand All @@ -37,9 +34,9 @@ class KubernetesClientModule(val crossScalaVersion: String)
override def ivyDeps =
super.ivyDeps() ++ http4s ++ circe ++ circeYaml ++ bouncycastle ++ collectionCompat ++ logging ++ java8compat
override def scalacPluginIvyDeps = super.scalacPluginIvyDeps() ++
(if (isScala3(scalaVersion())) Agg.empty else Agg(ivy"org.typelevel:::kind-projector:0.13.2"))
(if (isScala3(scalaVersion())) Agg.empty else Agg(ivy"org.typelevel:::kind-projector:0.13.3"))

object test extends Tests with Munit {
object test extends ScalaTests with Munit {
override def forkArgs = super.forkArgs() :+ "-Djdk.tls.client.protocols=TLSv1.2"
override def ivyDeps = super.ivyDeps() ++ tests ++ logback
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import org.http4s.headers.Authorization
import org.http4s.{AuthScheme, Credentials, Uri}
import org.typelevel.log4cats.Logger

import scala.annotation.nowarn
import scala.concurrent.duration.*

@nowarn("msg=access modifiers for `copy|apply` method are copied from the case class constructor under Scala 3")
case class KubeConfig[F[_]] private (
server: Uri,
authorization: Option[F[Authorization]],
Expand Down