Commit 285cd40
authored
Fix inductive-implicits benchmark (#22007)
The `inductive-implicits` benchmark fails on the benchmarks machine
since April 2024:
<img width="1261" alt="image"
src="https://github.com/user-attachments/assets/2b53a1e8-5a5d-4c76-a795-b4733d975f5b">
This _should_ have been caught by the tests at:
https://github.com/scala/scala3/blob/912b6f278b0fe5e7a25160612922cadf184acdbb/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala#L30
When I run `scala3-bootstrapped / testOnly
dotty.tools.dotc.BootstrappedOnlyCompilationTests -- *posMacros`
locally, the tests are indeed failing and the following error is
printed:
```scala
64 | val sel = Selector[L, Boolean]
| ^
|No given instance of type shapeless.Selector[Test.L, Boolean] was found for parameter selector of method apply in object Selector.
|I found:
|
| shapeless.Selector.inTail[Int,
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int
| :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int
| :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: ...Int :: ... :: ... :: ...,
| Boolean](
| shapeless.Selector.inTail[Int,
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int
| :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: ...Int :: ... :: ... :: ...,
| Boolean](
| shapeless.Selector.inTail[Int,
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: ...Int :: ... :: ... :: ...,
| Boolean](
...
| )
| )
| )
| )
| )
|
|But method inTail in object Selector does not match type shapeless.Selector[
| Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int :: Int ::
| Boolean :: shapeless.HNil,
|Boolean].
|
|Note: method inTail in object Selector was not considered because it was not imported with `import given`.
```
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`.File tree
2 files changed
+38
-165
lines changed- tests
- bench
- pos-deep-subtype
2 files changed
+38
-165
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | 177 | | |
216 | 178 | | |
217 | 179 | | |
218 | 180 | | |
219 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
This file was deleted.
0 commit comments