Skip to content

Commit 71c44b3

Browse files
authored
Fix using directives crashing on */ by removing /* (..) */ comments support in using_directives (#3381)
- update `using_directives` to 1.1.4
1 parent 16557d3 commit 71c44b3

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

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

+17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import com.eed3si9n.expecty.Expecty.expect
55
import java.io.File
66

77
import scala.cli.integration.util.BloopUtil
8+
import scala.util.Properties
89

910
abstract class CompileTestDefinitions
1011
extends ScalaCliSuite
@@ -720,4 +721,20 @@ abstract class CompileTestDefinitions
720721
expect(buildTargetDirs.size == 2)
721722
}
722723
}
724+
725+
if (!Properties.isWin)
726+
// TODO: make this work on Windows: https://github.com/VirtusLab/scala-cli/issues/2973
727+
test(
728+
"nested wildcard path source exclusion with a directive and no special character escaping"
729+
) {
730+
val excludedFileName = "Foo.scala"
731+
val excludedPath = os.rel / "dir1" / "dir2" / excludedFileName
732+
val inputs = TestInputs(
733+
os.rel / "project.scala" -> s"//> using exclude */*/$excludedFileName",
734+
excludedPath -> "val foo // invalid code"
735+
)
736+
inputs.fromRoot { root =>
737+
os.proc(TestUtil.cli, "compile", extraOptions, ".").call(cwd = root)
738+
}
739+
}
723740
}

project/deps.sc

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ object Deps {
254254
val typelevelToolkitVersion = "0.1.29"
255255
def typelevelToolkit = ivy"org.typelevel:toolkit:$typelevelToolkitVersion"
256256
def typelevelToolkitTest = ivy"org.typelevel:toolkit-test:$typelevelToolkitVersion"
257-
def usingDirectives = ivy"org.virtuslab:using_directives:1.1.3"
257+
def usingDirectives = ivy"org.virtuslab:using_directives:1.1.4"
258258
// Lives at https://github.com/VirtusLab/no-crc32-zip-input-stream, see #865
259259
// This provides a ZipInputStream that doesn't verify CRC32 checksums, that users
260260
// can enable by setting SCALA_CLI_VENDORED_ZIS=true in the environment, to workaround

0 commit comments

Comments
 (0)