Skip to content

Commit

Permalink
Misc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Friendseeker committed Dec 27, 2023
1 parent 6bafa55 commit c53a95c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private[inc] class IncrementalNameHashingCommon(
| > ${ppxs("by transitive inheritance", transitiveInheritance)}
| > ${ppxs("by local inheritance", localInheritance)}
| > ${ppxs("by member reference", memberRef)}
| > ${ppxs("by macro expansion", memberRef)}
| > ${ppxs("by macro expansion", macroExpansion)}
""".stripMargin
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,8 @@ final class ProtobufWriters(mapper: WriteMapper) {
val inheritanceExternal = toMap(relations.inheritance.external, stringId, stringId)
val localInheritanceInternal = toMap(relations.localInheritance.internal, stringId, stringId)
val localInheritanceExternal = toMap(relations.localInheritance.external, stringId, stringId)
val macroExpansionInternal = toMap(relations.macroExpansion.internal, stringId, stringId)
val macroExpansionExternal = toMap(relations.macroExpansion.external, stringId, stringId)
val classes = toMap(relations.classes, sourceToString, stringId)
val productClassName = toMap(relations.productClassName, stringId, stringId)
val names = toUsedNamesMap(relations.names)
Expand All @@ -763,6 +765,13 @@ final class ProtobufWriters(mapper: WriteMapper) {
builder.build
}

val macroExpansion = {
val builder = Schema.ClassDependencies.newBuilder
macroExpansionInternal.foreach { case (k, v) => builder.putInternal(k, v) }
macroExpansionExternal.foreach { case (k, v) => builder.putExternal(k, v) }
builder.build
}

val builder = Schema.Relations.newBuilder
srcProd.foreach { case (k, v) => builder.putSrcProd(k, v) }
libraryDep.foreach { case (k, v) => builder.putLibraryDep(k, v) }
Expand All @@ -774,6 +783,7 @@ final class ProtobufWriters(mapper: WriteMapper) {
.setMemberRef(memberRef)
.setInheritance(inheritance)
.setLocalInheritance(localInheritance)
.setMacroExpansion(macroExpansion)
.build
}

Expand Down

0 comments on commit c53a95c

Please sign in to comment.