@@ -595,12 +595,11 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
595
595
if (! inlineBody.isEmpty) {
596
596
// FIXME: If the body of an inlineable method changes, all the reverse
597
597
// dependencies of this method need to be recompiled. sbt has no way
598
- // of tracking method bodies, so as a hack we include the pretty- printed
599
- // typed tree of the method as part of the signature we send to sbt.
598
+ // of tracking method bodies, so as a hack we include the printed
599
+ // tree of the method as part of the signature we send to sbt.
600
600
// To do this properly we would need a way to hash trees and types in
601
601
// dotty itself.
602
- val printTypesCtx = ctx.fresh.setSetting(ctx.settings.XprintTypes , true )
603
- annots += marker(inlineBody.show(printTypesCtx))
602
+ annots += marker(inlineBody.toString)
604
603
}
605
604
606
605
// In the Scala2 ExtractAPI phase we only extract annotations that extend
@@ -618,12 +617,12 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
618
617
// FIXME: To faithfully extract an API we should extract the annotation tree,
619
618
// sbt instead wants us to extract the annotation type and its arguments,
620
619
// to do this properly we would need a way to hash trees and types in dotty itself,
621
- // instead we pretty-print the annotation tree.
620
+ // instead we use the raw string representation of the annotation tree.
622
621
// However, we still need to extract the annotation type in the way sbt expect
623
622
// because sbt uses this information to find tests to run (for example
624
623
// junit tests are annotated @org.junit.Test).
625
624
api.Annotation .of(
626
625
apiType(annot.tree.tpe), // Used by sbt to find tests to run
627
- Array (api.AnnotationArgument .of(" FULLTREE" , annot.tree.show )))
626
+ Array (api.AnnotationArgument .of(" FULLTREE" , annot.tree.toString )))
628
627
}
629
628
}
0 commit comments