-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix inductive-implicits benchmark #22007
base: main
Are you sure you want to change the base?
Conversation
This is a duplicate of `tests/bench/inductive-implicits.scala`, which is already tested from `dotty.tools.dotc.BootstrappedOnlyCompilationTest`, also without `-Yno-deep-subtypes`.
1a05f7f
to
ceb7d70
Compare
After having a deeper look with @hamzaremmal, we found that importing the given is actually not needed; the last line of the error message is incorrect. However, importing explicitly the given apparently diminishes the required stack size, which is why it made the test pass on my machine. This also explains why the test was not failing on the CI: the stack size was sufficient there. I pushed a new fix which comments out some more lines of the summoned implicit argument type. |
For the record, here is another error I got for the same benchmarks while working on another branch, with the import in the object: object Test extends App {
import Selector.given
val sel = Selector[L, Boolean]
...
Here the stack overflow error is not caught and crashes the compiler. |
To avoid reaching the stack limit.
ceb7d70
to
d3b9d76
Compare
The
inductive-implicits
benchmark fails on the benchmarks machine since April 2024:This should have been caught by the tests at:
scala3/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala
Line 30 in 912b6f2
When I run
scala3-bootstrapped / testOnly dotty.tools.dotc.BootstrappedOnlyCompilationTests -- *posMacros
locally, the tests are indeed failing and the following error is printed:It is not clear to me why the test does not fail on the CI. I checked that
dotty.tools.dotc.BootstrappedOnlyCompilationTests.posMacros
indeed runs there, and I confirm it is the case.Anyway, the fix is simple, we just need to import the implicits explicitly.
This PR additionally removes the duplicate
tests/pos-deep-subtype/inductive-implicits-bench.scala
.