File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ lazy val tastyQuery =
127
127
import com .typesafe .tools .mima .core .*
128
128
Seq (
129
129
// private[tastyquery], not an issue
130
+ ProblemFilters .exclude[DirectMissingMethodProblem ](" tastyquery.Contexts#Context.classloader" ),
130
131
ProblemFilters .exclude[MissingClassProblem ](" tastyquery.Utils" ),
131
132
ProblemFilters .exclude[MissingClassProblem ](" tastyquery.Utils$" ),
132
133
// private, not an issue
Original file line number Diff line number Diff line change @@ -58,15 +58,19 @@ object Contexts {
58
58
* The same instance of [[Classpaths.Classpath ]] can be reused to create
59
59
* several [[Context ]]s, if necessary.
60
60
*/
61
- final class Context private [Contexts ] (private [tastyquery] val classloader : Loader ) {
61
+ final class Context private [Contexts ] (classloader : Loader ) {
62
62
private given Context = this
63
63
64
64
private val sourceFiles = mutable.HashMap .empty[String , SourceFile ]
65
65
66
66
private val (RootPackage @ _, EmptyPackage @ _) = PackageSymbol .createRoots()
67
67
68
+ private [tastyquery] def hasGenericTuples : Boolean = classloader.hasGenericTuples
69
+
68
70
val defn : Definitions = Definitions (this : @ unchecked, RootPackage , EmptyPackage )
69
71
72
+ private [tastyquery] def internalClasspathForTestsOnly : Classpath = classloader.classpath
73
+
70
74
private [tastyquery] def getSourceFile (path : String ): SourceFile =
71
75
sourceFiles.getOrElseUpdate(path, new SourceFile (path))
72
76
Original file line number Diff line number Diff line change @@ -517,7 +517,7 @@ final class Definitions private[tastyquery] (
517
517
end functionClassOf
518
518
end PolyFunctionType
519
519
520
- lazy val hasGenericTuples = withRestrictedContext(ctx.classloader. hasGenericTuples)
520
+ lazy val hasGenericTuples = withRestrictedContext(ctx.hasGenericTuples)
521
521
522
522
lazy val uninitializedMethod : Option [TermSymbol ] =
523
523
withRestrictedContext {
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ private[reader] final class ReaderContext(underlying: Context):
69
69
def getSourceFile (path : String ): SourceFile =
70
70
underlying.getSourceFile(path)
71
71
72
- def hasGenericTuples : Boolean = underlying.classloader. hasGenericTuples
72
+ def hasGenericTuples : Boolean = underlying.hasGenericTuples
73
73
74
74
def createObjectMagicMethods (cls : ClassSymbol ): Unit =
75
75
underlying.defn.createObjectMagicMethods(cls)
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import tastyquery.testutil.TestPlatform
9
9
class ClasspathEntrySuite extends UnrestrictedUnpicklingSuite :
10
10
11
11
def scala3ClasspathEntry (using Context ): ClasspathEntry =
12
- ctx.classloader.classpath (TestPlatform .scala3ClasspathIndex)
12
+ ctx.internalClasspathForTestsOnly (TestPlatform .scala3ClasspathIndex)
13
13
14
14
def lookupSyms (entry : ClasspathEntry )(using Context ): IArray [Symbol ] =
15
15
IArray .from(ctx.findSymbolsByClasspathEntry(entry))
You can’t perform that action at this time.
0 commit comments