tek / splain

better implicit errors for scala
MIT License
370 stars 29 forks source link

#76 all tests for scala 2.13.7 works now #84

Closed tribbloid closed 2 years ago

tribbloid commented 2 years ago

The patch also change the runtime compilation engine (from scala macro to scala NSC) and improve implicit error tree compact display

tribbloid commented 2 years ago

I would recommend the release of 1.0.0-RC2 immediately before the end of 2021

tek commented 2 years ago

that's a lot of changes :sweat_smile:

tribbloid commented 2 years ago

Sorry I made a few typos. Won't rush for end of year (bad things happen to people who can't wait)

Most changes are for cross-versioning. Many of them are directly copied from Scala partest.

But some ground truths are indeed different. The biggest one is for compact implicit tree:

**** BEFORE

newSource1.scala:28: error: implicit error;
!I e: tpes.I1
i1a invalid because
!I p: tpes.I2
⋮
――――――――i8 invalid because
        !I p: tpes.I9
――――i6b invalid because
    !I p: tpes.I8
――――――i8 invalid because
      !I p: tpes.I9
――i3b invalid because
  !I p: tpes.I4
  ⋮
――――――――i8 invalid because
        !I p: tpes.I9
――――i6b invalid because
    !I p: tpes.I8
――――――i8 invalid because
      !I p: tpes.I9
i1b invalid because
!I p: tpes.I6
  ⋮
――――――i8 invalid because
      !I p: tpes.I9
――i6b invalid because
  !I p: tpes.I8
――――i8 invalid because
    !I p: tpes.I9
  implicitly[I1]
            ^

**** AFTER: now it shows the causes of every implicit error if number of these causes >=2

newSource1.scala:28: error: implicit error;
!I e: tpes.I1
i1a invalid because
!I p: tpes.I2
⋮
――i3a invalid because
  !I p: tpes.I4
  ⋮
――――i6a invalid because
    !I p: tpes.I7
    ⋮
――――――――i8 invalid because
        !I p: tpes.I9
――――i6b invalid because
    !I p: tpes.I8
――――――i8 invalid because
      !I p: tpes.I9
――i3b invalid because
  !I p: tpes.I4
  ⋮
――――i6a invalid because
    !I p: tpes.I7
    ⋮
――――――――i8 invalid because
        !I p: tpes.I9
――――i6b invalid because
    !I p: tpes.I8
――――――i8 invalid because
      !I p: tpes.I9
i1b invalid because
!I p: tpes.I6
――i6a invalid because
  !I p: tpes.I7
  ⋮
――――――i8 invalid because
      !I p: tpes.I9
――i6b invalid because
  !I p: tpes.I8
――――i8 invalid because
    !I p: tpes.I9
  implicitly[I1]
            ^

This test case only affects compact mode (WITHOUT -VImplicit-verbose-tree). So it was omitted in both Scala project & splain. The patch added it back

tek commented 2 years ago

cool!

github-actions[bot] commented 2 years ago

Test Report (2.13.6)

  8 files  ±0    8 suites  ±0   7s :stopwatch: -1s 44 tests  - 4  41 :heavy_check_mark:  - 2  3 :zzz:  - 2  0 :x: ±0 

Results for commit 31eb43d0. ± Comparison against base commit f38e8207.

This pull request removes 6 and adds 2 tests. Note that renamed tests count towards both. ``` splain.plugin.PluginSpec ‑ byname higher order - byname-higher splain.plugin.PluginSpec ‑ refined type diff - refined splain.plugin.PluginSpec ‑ tree printing compact - tree splain.plugin.PluginSpec ‑ tree printing tree splain.plugin.PluginSpec ‑ truncate refined type - truncrefined splain.plugin.PluginSpec ‑ tuple1 ``` ``` splain.builtin.BasicSpec ‑ shorthandTypes splain.builtin.TreeSpec ‑ compactTree ```
github-actions[bot] commented 2 years ago

Test Report (2.13.7)

  8 files  ±0    8 suites  ±0   7s :stopwatch: -2s 44 tests  - 4  41 :heavy_check_mark: +30  3 :zzz:  - 2  0 :x:  - 32 

Results for commit 31eb43d0. ± Comparison against base commit f38e8207.

This pull request removes 6 and adds 2 tests. Note that renamed tests count towards both. ``` splain.plugin.PluginSpec ‑ byname higher order - byname-higher splain.plugin.PluginSpec ‑ refined type diff - refined splain.plugin.PluginSpec ‑ tree printing compact - tree splain.plugin.PluginSpec ‑ tree printing tree splain.plugin.PluginSpec ‑ truncate refined type - truncrefined splain.plugin.PluginSpec ‑ tuple1 ``` ``` splain.builtin.BasicSpec ‑ shorthandTypes splain.builtin.TreeSpec ‑ compactTree ```