-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove scala2-library-tasty-tests
project
#19379
Remove scala2-library-tasty-tests
project
#19379
Conversation
scala2-library-tasty-tests
project
d12ebe4
to
7f61456
Compare
7f61456
to
adbdcf0
Compare
adbdcf0
to
30403cf
Compare
tests/run-with-compiler/scala2-library-from-tasty.scala is timing out on CI. It does not loacally. Maybe we can split this test into smaller parts. |
c1fd0d8
to
f33065d
Compare
I had to make sure that the output of the from tasty tests are set explicitly with |
f33065d
to
0d5a0ad
Compare
val args = Array( | ||
"-classpath", ClasspathFromClassloader(getClass.getClassLoader), | ||
"-from-tasty", | ||
"-d", "out/scala2-library-from-tasty-test-output.jar", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this line to this test.
val args = Array( | ||
"-classpath", ClasspathFromClassloader(getClass.getClassLoader), | ||
"-from-tasty", | ||
"-d", "out/scala2-library-from-tasty-jar-test-output.jar", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this line to this test.
2e726b9
to
04e5df7
Compare
Part of scala#19379 The new test is run on all available configurations. Now it also runs on Windows.
When testing from TASTy on Windows we currently get the following errors
I assume that the bug is cause by the extra |
77ad190
to
c291cd3
Compare
d62c4b7
to
47fe9f8
Compare
Split BootstrappedStdLibTASYyTest into the part that tests the TASTy inspector and the part that tests recompilation. We also remove `scala2-library-tasty-tests` as it is now empty and will not serve any purpose anymore. This test also discovered a bug in TASTYRun with the path separators of `JarArchive`s in Windows. The "/" is used in the JAR paths but the "\" is used for OS paths. This is now fixed.
47fe9f8
to
96b57b8
Compare
blacklistsOnlyContainsClassesThatExist() | ||
// FIXME this test does not work on JDK8 | ||
// Caused by: dotty.tools.dotc.core.TypeError$$anon$1: package scala.quoted.runtime.Expr does not have a member method quote | ||
if System.getProperty("java.specification.version") != "1.8" then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a possible bug when running the from-TASTy compiler on JDK8 or with the test itself. I will open an issue to investigate this further.
Note that the Windows tests found a bug in TASTYRun.scala
that was fixed but then failed due it running on JDK8. Therefore this fix will not be tested until we fix this issue or run Windows tests on a newer version of the JDK.
.filter(e => Path.extension(e) == "tasty" && !fromTastyIgnoreList(e)) | ||
.map(e => e.stripSuffix(".tasty").replace(File.separator, ".")) | ||
.map(_.stripPrefix("/")) // change paths from absolute to relative | ||
.filter(e => Path.extension(e) == "tasty" && !fromTastyIgnoreList(e.replace("/", File.separator))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems ok, but perhaps fromTastyIgnoreList
should accept binary names (.
separator, no file extension) rather than paths?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. Out of scope for this PR.
// at dotty.tools.backend.jvm.BCodeHelpers$BCInnerClassGen.getClassBTypeAndRegisterInnerClass$(BCodeHelpers.scala:210) | ||
// at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.getClassBTypeAndRegisterInnerClass(BCodeSkelBuilder.scala:62) | ||
// at dotty.tools.backend.jvm.BCodeHelpers$BCInnerClassGen.internalName(BCodeHelpers.scala:237) | ||
s"scala${separator}Array.tasty", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comment above that perhaps -Yfrom-tasty-ignore-list
should be a list of binary names, rather than relative paths
Split BootstrappedStdLibTASYyTest into the part that tests the TASTy inspector and the part that tests recompilation.
The
tests/run/scala2-library-test
test will be tested with the original Scala 2 library JAR and with the Scala 2 library TASTy JAR depending on thescala2Library
SBT setting.We also remove
scala2-library-tasty-tests
as it is now empty and will not serve any purpose anymore.This test also discovered a bug in TASTYRun with the path separators of
JarArchive
s in Windows. The "/" is used in the JAR paths but the "" is used for OS paths. This is now fixed.[test_java8]