Skip to content

Commit 3f71bd5

Browse files
committed
compare reading java from tasty with from classfile
1 parent b1d1fe8 commit 3f71bd5

File tree

15 files changed

+68
-0
lines changed

15 files changed

+68
-0
lines changed

sbt-test/pipelining/Yjava-tasty-annotation/b-alt/.keep

Whitespace-only changes.

sbt-test/pipelining/Yjava-tasty-annotation/build.sbt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ lazy val b = project.in(file("b"))
1111
Compile / unmanagedClasspath := Seq(Attributed.blank((ThisBuild / baseDirectory).value / "a-annotation-java-tasty.jar")),
1212
scalacOptions += "-Ycheck:all",
1313
)
14+
15+
// same as b, but adds the real classes to the classpath instead of the tasty jar
16+
lazy val bAlt = project.in(file("b-alt"))
17+
.settings(
18+
Compile / sources := (b / Compile / sources).value,
19+
Compile / unmanagedClasspath := Seq(Attributed.blank((ThisBuild / baseDirectory).value / "a-annotation-classes")),
20+
scalacOptions += "-Ycheck:all",
21+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
> a/compile
22
# Test depending on a java compiled annotation through TASTy
33
> b/compile
4+
# double check against the real java classes
5+
> bAlt/compile

sbt-test/pipelining/Yjava-tasty-enum/b-alt/.keep

Whitespace-only changes.

sbt-test/pipelining/Yjava-tasty-enum/build.sbt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,15 @@ lazy val b = project.in(file("b"))
1717
fork := true, // we have to fork the JVM if we actually want to run the code with correct failure semantics
1818
Runtime / unmanagedClasspath += Attributed.blank((ThisBuild / baseDirectory).value / "a-enum-classes"), // make sure the java classes are visible at runtime
1919
)
20+
21+
// same as b, but adds the real classes to the classpath instead of the tasty jar
22+
lazy val bAlt = project.in(file("b-alt"))
23+
.settings(
24+
Compile / sources := (b / Compile / sources).value,
25+
Compile / unmanagedClasspath := Seq(Attributed.blank((ThisBuild / baseDirectory).value / "a-enum-classes")),
26+
scalacOptions += "-Ycheck:all",
27+
)
28+
.settings(
29+
fork := true, // we have to fork the JVM if we actually want to run the code with correct failure semantics
30+
Runtime / unmanagedClasspath += Attributed.blank((ThisBuild / baseDirectory).value / "a-enum-classes"), // make sure the java classes are visible at runtime
31+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
> a/compile
22
# test depending on a java compiled enum through TASTy
33
> b/run
4+
# double check against the real java classes
5+
> bAlt/run

sbt-test/pipelining/Yjava-tasty-from-tasty/b-alt/.keep

Whitespace-only changes.

sbt-test/pipelining/Yjava-tasty-from-tasty/build.sbt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,17 @@ lazy val b = project.in(file("b"))
3333
// make sure the java classes are visible at runtime
3434
Runtime / unmanagedClasspath += Attributed.blank((ThisBuild / baseDirectory).value / "a-pre-classes"),
3535
)
36+
37+
// same as b, but adds the real classes to the classpath instead of the tasty jar
38+
lazy val bAlt = project.in(file("b-alt"))
39+
.settings(
40+
scalacOptions += "-Ycheck:all",
41+
Compile / sources := (b / Compile / sources).value,
42+
Compile / unmanagedClasspath := Seq(Attributed.blank((ThisBuild / baseDirectory).value / "a-pre-classes")),
43+
)
44+
.settings(
45+
// we have to fork the JVM if we actually want to run the code with correct failure semantics
46+
fork := true,
47+
// make sure the java classes are visible at runtime
48+
Runtime / unmanagedClasspath += Attributed.blank((ThisBuild / baseDirectory).value / "a-pre-classes"),
49+
)

sbt-test/pipelining/Yjava-tasty-from-tasty/test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
> a_from_tasty/compile
44
# test java tasty is still written even with -from-tasty
55
> b/run
6+
# double check against the real java classes
7+
> bAlt/run

sbt-test/pipelining/Yjava-tasty-generic/b-alt/.keep

Whitespace-only changes.

sbt-test/pipelining/Yjava-tasty-generic/build.sbt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,15 @@ lazy val b = project.in(file("b"))
1515
fork := true, // we have to fork the JVM if we actually want to run the code with correct failure semantics
1616
Runtime / unmanagedClasspath += Attributed.blank((ThisBuild / baseDirectory).value / "a-generic-classes"), // make sure the java classes are visible at runtime
1717
)
18+
19+
// same as b, but adds the real classes to the classpath instead of the tasty jar
20+
lazy val bAlt = project.in(file("b-alt"))
21+
.settings(
22+
Compile / sources := (b / Compile / sources).value,
23+
Compile / unmanagedClasspath := Seq(Attributed.blank((ThisBuild / baseDirectory).value / "a-generic-classes")),
24+
scalacOptions += "-Ycheck:all",
25+
)
26+
.settings(
27+
fork := true, // we have to fork the JVM if we actually want to run the code with correct failure semantics
28+
Runtime / unmanagedClasspath += Attributed.blank((ThisBuild / baseDirectory).value / "a-generic-classes"), // make sure the java classes are visible at runtime
29+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
> a/compile
22
# Test depending on a java generic class through TASTy
33
> b/run
4+
# double check against the real java classes
5+
> bAlt/run

sbt-test/pipelining/Yjava-tasty-result-types/b-alt/.keep

Whitespace-only changes.

sbt-test/pipelining/Yjava-tasty-result-types/build.sbt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,15 @@ lazy val b = project.in(file("b"))
1515
fork := true, // we have to fork the JVM if we actually want to run the code with correct failure semantics
1616
Runtime / unmanagedClasspath += Attributed.blank((ThisBuild / baseDirectory).value / "a-result-types-classes"), // make sure the java classes are visible at runtime
1717
)
18+
19+
// same as b, but adds the real classes to the classpath instead of the tasty jar
20+
lazy val bAlt = project.in(file("b-alt"))
21+
.settings(
22+
Compile / sources := (b / Compile / sources).value,
23+
Compile / unmanagedClasspath := Seq(Attributed.blank((ThisBuild / baseDirectory).value / "a-result-types-classes")),
24+
scalacOptions += "-Ycheck:all",
25+
)
26+
.settings(
27+
fork := true, // we have to fork the JVM if we actually want to run the code with correct failure semantics
28+
Runtime / unmanagedClasspath += Attributed.blank((ThisBuild / baseDirectory).value / "a-result-types-classes"), // make sure the java classes are visible at runtime
29+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
> a/compile
22
# Test depending on a java static final result, and method result through TASTy
33
> b/run
4+
# double check against the real java classes
5+
> bAlt/run

0 commit comments

Comments
 (0)