Skip to content

Commit 050859e

Browse files
committed
add scala3 library to tasty-core-scala2 project
1 parent 97d8171 commit 050859e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

project/Build.scala

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2094,7 +2094,16 @@ object Build {
20942094
}
20952095
)
20962096

2097-
def asTastyCoreScala2: Project = project.settings(commonScala2Settings)
2097+
def asTastyCoreScala2: Project = project
2098+
.settings(commonScala2Settings)
2099+
// need to add @annotation.internal.sharable to the classpath for compiling
2100+
// we don't actually publish this library anywhere, so it's fine.
2101+
// if someone depends on the sources of tasty-core in a scala 2 project,
2102+
// they should strip the sharable annotation, or add -Ytasty-reader
2103+
.dependsOn(dottyLibrary(NonBootstrapped) % Provided)
2104+
.settings(
2105+
scalacOptions += "-Ytasty-reader" // to read scala3 library
2106+
)
20982107

20992108
def asDottyBench(implicit mode: Mode): Project = project.withCommonSettings.
21002109
dependsOn(dottyCompiler).

0 commit comments

Comments
 (0)