Skip to content

Commit f81fa68

Browse files
authored
Bump typelevel-toolkit to 0.0.11, configure toolkit-test (#2135)
* Bump tl-toolkit to 0.0.11, configure toolkit-test * formatting
1 parent 8644b65 commit f81fa68

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

modules/directives/src/main/scala/scala/build/preprocessing/directives/Toolkit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ object Toolkit {
5959
case Some(org) => org
6060
case None => Constants.toolkitOrganization
6161
}
62-
if org == Constants.toolkitOrganization then
62+
if org == Constants.toolkitOrganization || org == Constants.typelevelOrganization then
6363
List(
6464
Positioned(positions, dep"$org::${Constants.toolkitName}::$v,toolkit")
6565
.withEmptyRequirements,

modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,13 +1142,33 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
11421142
|}""".stripMargin
11431143
)
11441144
inputs.fromRoot { root =>
1145-
val output = os.proc(TestUtil.cli, ".", "--toolkit", "typelevel:0.0.1")
1145+
val output = os.proc(TestUtil.cli, ".", "--toolkit", "typelevel:0.0.11")
11461146
.call(cwd = root).out.trim()
11471147

11481148
expect(output == root.toString())
11491149
}
11501150
}
11511151

1152+
test("should add typelevel toolkit-test to classpath") {
1153+
val inputs = TestInputs(
1154+
os.rel / "Hello.test.scala" ->
1155+
s"""|import cats.effect.*
1156+
|import munit.CatsEffectSuite
1157+
|class HelloSuite extends CatsEffectSuite {
1158+
| // IO should be added to classpath by typelevel toolkit-test
1159+
| test("warm hello from the sun is coming") {
1160+
| (IO("i love to live in the") *> IO("sun")).assertEquals("sun")
1161+
| }
1162+
|}""".stripMargin
1163+
)
1164+
inputs.fromRoot { root =>
1165+
val output = os.proc(TestUtil.cli, "test", ".", "--toolkit", "typelevel:0.0.11")
1166+
.call(cwd = root).out.text()
1167+
1168+
expect(output.contains("+")) // test succeeded
1169+
}
1170+
}
1171+
11521172
test(s"print error if workspace path contains a ${File.pathSeparator}") {
11531173
val msg = "Hello"
11541174
val relPath = os.rel / s"weird${File.pathSeparator}directory" / "Hello.scala"

project/deps.sc

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,18 @@ object Deps {
167167
ivy"org.virtuslab.scala-cli-signing::cli:${Versions.signingCli}"
168168
// to prevent collisions with scala-cli's case-app version
169169
.exclude(("com.github.alexarchambault", "case-app_3"))
170-
def slf4jNop = ivy"org.slf4j:slf4j-nop:2.0.7"
171-
def sttp = ivy"com.softwaremill.sttp.client3:core_2.13:3.8.15"
172-
def svm = ivy"org.graalvm.nativeimage:svm:$graalVmVersion"
173-
def swoval = ivy"com.swoval:file-tree-views:2.1.10"
174-
def testInterface = ivy"org.scala-sbt:test-interface:1.0"
175-
val toolkitVersion = "0.1.7"
176-
def toolkit = ivy"org.scala-lang:toolkit:$toolkitVersion"
177-
def toolkitTest = ivy"org.scala-lang:toolkit-test:$toolkitVersion"
178-
def typelevelToolkit = ivy"org.typelevel:toolkit:0.0.10"
179-
def usingDirectives = ivy"org.virtuslab:using_directives:1.0.0"
170+
def slf4jNop = ivy"org.slf4j:slf4j-nop:2.0.7"
171+
def sttp = ivy"com.softwaremill.sttp.client3:core_2.13:3.8.15"
172+
def svm = ivy"org.graalvm.nativeimage:svm:$graalVmVersion"
173+
def swoval = ivy"com.swoval:file-tree-views:2.1.10"
174+
def testInterface = ivy"org.scala-sbt:test-interface:1.0"
175+
val toolkitVersion = "0.1.7"
176+
def toolkit = ivy"org.scala-lang:toolkit:$toolkitVersion"
177+
def toolkitTest = ivy"org.scala-lang:toolkit-test:$toolkitVersion"
178+
val typelevelToolkitVersion = "0.0.11"
179+
def typelevelToolkit = ivy"org.typelevel:toolkit:$typelevelToolkitVersion"
180+
def typelevelToolkitTest = ivy"org.typelevel:toolkit-test:$typelevelToolkitVersion"
181+
def usingDirectives = ivy"org.virtuslab:using_directives:1.0.0"
180182
// Lives at https://github.com/scala-cli/no-crc32-zip-input-stream, see #865
181183
// This provides a ZipInputStream that doesn't verify CRC32 checksums, that users
182184
// can enable by setting SCALA_CLI_VENDORED_ZIS=true in the environment, to workaround

0 commit comments

Comments
 (0)