8000 Upgrade to ASM 7.0 by smarter · Pull Request #5905 · scala/scala3 · GitHub
[go: up one dir, main page]

Skip to content

Upgrade to ASM 7.0 #5905

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

Merged
merged 2 commits into from
Feb 13, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
vulpix: pass -classpath to javac too
Otherwise the tastyBootstrap test failed when compiling the .java files
added in the previous commit that depend on scala-asm.
  • Loading branch information
smarter committed Feb 13, 2019
commit 1f652f45c15c847a276118f6a56d09de95455d44
9 changes: 4 additions & 5 deletions compiler/test/dotty/tools/vulpix/ParallelTesting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>

protected def compile(files0: Array[JFile], flags0: TestFlags, suppressErrors: Boolean, targetDir: JFile): TestReporter = {

val flags = flags0 and ("-d", targetDir.getAbsolutePath)
val flags = flags0.and("-d", targetDir.getAbsolutePath)
.withClasspath(targetDir.getAbsolutePath)

def flattenFiles(f: JFile): Array[JFile] =
if (f.isDirectory) f.listFiles.flatMap(flattenFiles)
Expand All @@ -336,9 +337,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
val fullArgs = Array(
"javac",
"-encoding", "UTF-8",
"-classpath",
s"${Properties.scalaLibrary}${JFile.pathSeparator}${targetDir.getAbsolutePath}"
) ++ flags.all.takeRight(2) ++ fs
) ++ flags.javacFlags ++ fs

val process = Runtime.getRuntime.exec(fullArgs)
val output = Source.fromInputStream(process.getErrorStream).mkString
Expand Down Expand Up @@ -366,7 +365,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
}
}

val allArgs = flags.withClasspath(targetDir.getAbsolutePath).all
val allArgs = flags.all

// Compile with a try to catch any StackTrace generated by the compiler:
try {
Expand Down
8 changes: 8 additions & 0 deletions compiler/test/dotty/tools/vulpix/TestFlags.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ final case class TestFlags(
TestFlags(defaultClassPath, s"$runClassPath${JFile.pathSeparator}$classPath", options)

def all: Array[String] = Array("-classpath", defaultClassPath) ++ options

/** Subset of the flags that should be passed to javac. */
def javacFlags: Array[String] = {
val flags = all
val cp = flags.dropWhile(_ != "-classpath").take(2)
val output = flags.dropWhile(_ != "-d").take(2)
cp ++ output
}
}

object TestFlags {
Expand Down
0