Skip to content

Commit 419aac2

Browse files
committed
bugfix: Make mima check passed
1 parent e085b0d commit 419aac2

File tree

1 file changed

+39
-36
lines changed

1 file changed

+39
-36
lines changed

build.mill

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,22 @@ import com.github.lolgab.mill.mima._
1212

1313
val scalaNextVersion = sys.props.get("scalaNextVersion")
1414
val scalaVersions = List("2.12.20", "2.13.15", "3.3.4") ++ scalaNextVersion
15+
val scalaNativeVer = "0.5.6"
16+
17+
trait MimaCheck extends Mima {
18+
def mimaPreviousVersions = (
19+
Seq("0.6.9", "0.7.0", "0.7.1", "0.8.0","0.8.2", "0.9.0")
20+
).distinct
1521

16-
trait RequestsJvmModule extends RequestsModule with Mima {
17-
def mimaPreviousArtifacts = Agg(
18-
(
19-
Seq("0.6.9", "0.7.0", "0.7.1", "0.8.0","0.8.2", "0.9.0")
20-
).map(v => ivy"com.lihaoyi::requests:${v}") : _*
21-
)
2222
override def mimaBinaryIssueFilters = Seq(
2323
ProblemFilter.exclude[ReversedMissingMethodProblem]("requests.BaseSession.send"),
24-
ProblemFilter.exclude[DirectMissingMethodProblem]("requests.Response.string")
24+
ProblemFilter.exclude[DirectMissingMethodProblem]("requests.Response.string"),
2525
)
2626
}
27-
object requests extends Cross[RequestsJvmModule](scalaVersions) {}
28-
29-
/**
30-
* Placeholder for Scala Native module
31-
*/
32-
// object native extends Cross[RequestsNativeModule](scalaVersions)
33-
// trait RequestsNativeModule extends RequestsModule with ScalaNativeModule {
34-
// override def scalaNativeVersion = scalaNative
35-
// override def nativeEmbedResources = true
36-
37-
// def ivyDeps =
38-
// super.ivyDeps() ++ Agg(ivy"com.github.lolgab::scala-native-crypto::0.1.0")
39-
// def nativeLinkingOptions = Seq("-lmicrohttpd")
40-
41-
// object test extends ScalaNativeTests with RequestsTestModule {
42-
// def nativeLinkingOptions =
43-
// super.nativeLinkingOptions() ++ Seq("-L/usr/local/opt/openssl@3/lib")
44-
// }
45-
// }
46-
47-
trait RequestsModule extends CrossScalaModule
48-
with PlatformScalaModule
49-
with PublishModule {
27+
28+
trait RequestsPublishModule extends PublishModule with MimaCheck {
29+
def artifactName = "requests"
30+
5031
def publishVersion = VcsVersion.vcsState().format()
5132

5233
def pomSettings = PomSettings(
@@ -61,12 +42,34 @@ trait RequestsModule extends CrossScalaModule
6142
)
6243

6344
def ivyDeps = Agg(ivy"com.lihaoyi::geny::1.1.1")
45+
}
6446

65-
object test extends ScalaTests with TestModule.Utest {
66-
def ivyDeps = Agg(
67-
ivy"com.lihaoyi::utest::0.7.10",
68-
ivy"com.lihaoyi::ujson::1.3.13",
69-
ivy"com.dimafeng::testcontainers-scala-core:0.41.3"
70-
)
47+
trait RequestsCrossScalaModule extends CrossScalaModule with ScalaModule {
48+
def millSourcePath = build.millSourcePath / "requests"
49+
def sources = T.sources(millSourcePath / "src")
50+
}
51+
52+
trait RequestsTestModule extends TestModule.Utest {
53+
def ivyDeps = Agg(
54+
ivy"com.lihaoyi::utest::0.7.10",
55+
ivy"com.lihaoyi::ujson::1.3.13",
56+
ivy"com.dimafeng::testcontainers-scala-core:0.41.3"
57+
)
58+
}
59+
60+
object requests extends Module {
61+
trait RequestsJvmModule extends RequestsCrossScalaModule with RequestsPublishModule {
62+
object test extends ScalaTests with RequestsTestModule
7163
}
64+
object jvm extends Cross[RequestsJvmModule](scalaVersions)
65+
66+
// trait RequestsNativeModule extends ScalaNativeModule with RequestsPublishModule {
67+
// override def scalaNativeVersion = scalaNativeVer
68+
69+
// def ivyDeps =
70+
// super.ivyDeps() ++ Agg(ivy"com.github.lolgab::scala-native-crypto::0.1.0")
71+
72+
// object test extends ScalaNativeTests with RequestsTestModule
73+
// }
74+
// object native extends Cross[RequestsNativeModule](scalaVersions)
7275
}

0 commit comments

Comments
 (0)