Skip to content

Commit

Permalink
Fix using directives crashing on */ by removing /* (..) */ commen…
Browse files Browse the repository at this point in the history
…ts support in `using_directives` (#3381)

- update `using_directives` to 1.1.4
  • Loading branch information
Gedochao authored Dec 20, 2024
1 parent 16557d3 commit 71c44b3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.eed3si9n.expecty.Expecty.expect
import java.io.File

import scala.cli.integration.util.BloopUtil
import scala.util.Properties

abstract class CompileTestDefinitions
extends ScalaCliSuite
Expand Down Expand Up @@ -720,4 +721,20 @@ abstract class CompileTestDefinitions
expect(buildTargetDirs.size == 2)
}
}

if (!Properties.isWin)
// TODO: make this work on Windows: https://github.com/VirtusLab/scala-cli/issues/2973
test(
"nested wildcard path source exclusion with a directive and no special character escaping"
) {
val excludedFileName = "Foo.scala"
val excludedPath = os.rel / "dir1" / "dir2" / excludedFileName
val inputs = TestInputs(
os.rel / "project.scala" -> s"//> using exclude */*/$excludedFileName",
excludedPath -> "val foo // invalid code"
)
inputs.fromRoot { root =>
os.proc(TestUtil.cli, "compile", extraOptions, ".").call(cwd = root)
}
}
}
2 changes: 1 addition & 1 deletion project/deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ object Deps {
val typelevelToolkitVersion = "0.1.29"
def typelevelToolkit = ivy"org.typelevel:toolkit:$typelevelToolkitVersion"
def typelevelToolkitTest = ivy"org.typelevel:toolkit-test:$typelevelToolkitVersion"
def usingDirectives = ivy"org.virtuslab:using_directives:1.1.3"
def usingDirectives = ivy"org.virtuslab:using_directives:1.1.4"
// Lives at https://github.com/VirtusLab/no-crc32-zip-input-stream, see #865
// This provides a ZipInputStream that doesn't verify CRC32 checksums, that users
// can enable by setting SCALA_CLI_VENDORED_ZIS=true in the environment, to workaround
Expand Down

0 comments on commit 71c44b3

Please sign in to comment.