Open nicolasstucki opened 2 years ago
@prolative, where do we need to make changes to support this?
I just fixed a Scala 2 incompatibility and was thinking partest could pre-process the dotty test corpus by letting dotty rewrite it to a compatible dialect first, then compile as normal. Maybe also process // error
.
@nicolasstucki I've just realized that your mechanism for pretty printing boxed compilation errors from external processes doesn't really work with check files (they would have to contain not only actual errors but also the frames and the comments we add to make debugging easier if the external error text was not parsed properly). Should we care about it? That wouldn't be a problem if we can assume we don't do any checks on compilation errors from older compilers.
The primary use case is to test that code compiled with the old compiler can be used in the new one. In this scenario the old compiler should not have errors and therefore there is not reason to worry about the check file.
When writing the test we might hit an error. If we do not see the error correctly it might be hard to know what happened. That was the reason I added this in the first place.
All other use cases came from the release flag.
We currently support the suffixes
c3.x.y
to allow tests to compile part of the sources with a different compiler. We should extend this to support Scala 2 as we have many issues related to compatibility that are not simple.The idea is to be able to write these tests