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

Fix using directives crashing on */ by removing /* (..) */ comments support in using_directives #3381

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
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