Skip to content

Commit

Permalink
fix oom
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Jan 17, 2024
1 parent f285962 commit 0dd0fea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ final class ImplementationProvider(
.toGlobal(
compilers,
implementationsInDependencySources.asScala.toMap,
source,
)

symbolLocationsFromContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,17 @@ class InheritanceContext(inheritance: Map[String, Set[ClassLocation]]) {
def toGlobal(
compilers: Compilers,
implementationsInDependencySources: Map[String, Set[ClassLocation]],
source: AbsolutePath,
) = new GlobalInheritanceContext(
compilers,
implementationsInDependencySources,
inheritance,
source,
)
}

class GlobalInheritanceContext(
compilers: Compilers,
implementationsInDependencySources: Map[String, Set[ClassLocation]],
localInheritance: Map[String, Set[ClassLocation]],
source: AbsolutePath,
) extends InheritanceContext(localInheritance) {
override def getLocations(
symbol: String
Expand All @@ -51,8 +48,8 @@ class GlobalInheritanceContext(
val resolveGlobal =
implementationsInDependencySources
.getOrElse(shortName, Set.empty)
.collect { case loc @ ClassLocation(sym, _) =>
compilers.info(source, sym).map {
.map { case loc @ ClassLocation(symbol, Some(path)) =>
compilers.info(AbsolutePath(path), loc.symbol).map {
case Some(symInfo) if symInfo.parents.contains(symbol) => Some(loc)
case Some(symInfo)
if symInfo.dealisedSymbol == symbol && symInfo.symbol != symbol =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class ScalaToplevelMtags(
} else scanner.nextToken()
loop(indent, isAfterNewline = false, currRegion, newExpectIgnoreBody)
case TYPE if expectTemplate.map(!_.isExtension).getOrElse(true) =>
if (needEmitMember(currRegion)) {
if (needEmitMember(currRegion) && !prevWasDot) {
withOwner(currRegion.termOwner) {
emitType(needEmitTermMember())
}
Expand Down

0 comments on commit 0dd0fea

Please sign in to comment.