tek / splain

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

Confused about difference between built in and 1.x #99

Closed nafg closed 1 year ago

nafg commented 1 year ago

I can't tell from the README how adding the 1.x plugin differs from the functionality built into the compiler

tribbloid commented 1 year ago

Thanks a lot for reporting, will post new instruction here

tribbloid commented 1 year ago

@nafg Just updated the README file:

Versions

TL;DR

                 ┌──────────────────────────┐                  
                 │What's your scala version?│                  
                 └─────────┬───────┬────────┘                  
                           │       │                           
                           │       └───────────────────┐       
                           v                           │       
    ┌─────────────────────────────────────────────┐    │       
    │                ( >= 2.13.6 )                │    │       
    │                ─────────────                │    │       
    │Do you want experimental features & bugfixes?│    │       
    └──┬───────────────┬──────────────────────────┘    │       
       │               │                               │       
       v               v                               v       
 ┌──────────┐ ┌─────────────────┐ ┌───────────────────────────┐
 │ ( yes )  │ │     ( no )      │ │( 2.12 / 2.13.0 .. 2.13.5 )│
 │ ───────  │ │     ──────      │ ├───────────────────────────┤
 │Splain 1.x│ │Compiler built-in│ │       Splain 0.5.x        │
 └──────────┘ └─────────────────┘ └───────────────────────────┘

Compiler built-in

(main article: https://docs.scala-lang.org/overviews/compiler-options/index.html#Verbose_Settings)

The basic Splain features has been integrated into Scala compiler (since 2.13.6, through contributions like this and this), they can be enabled immediately by using the right compiler options (see Option section for detail)

v1.x (master branch)

(Only available for Scala 2.13.6+)

Splain 1.x is a simplified rewrite, aims to incrementally introduce enhancement to the already integrated Splain features. Additional features and bugfixes will first be released and refined here, then be periodically contributed back into Scala compiler.

In layman's term, Splain 1.x is now a feature preview patch of Scala compiler, if a relevant compiler built-in option (see Option section for detail) malfunctions, it may work with Splain v1.x enabled.

It is also the only branch in active development & PR acceptance

v0.x (maintenance branch)

(Only available for Scala 2.12 and Scala 2.13.0 .. 2.13.5)

The latest v0.x will continue to be maintained and published regularly to stay compatible with the latest Scala 2.12.x release (until it's end-of-life), but no newer version will be published for Scala 2.13, splain 0.5.x will be the last release for Scala 2.13.

We strongly recommend you to upgrade to Scala 2.13.6+ to benefit from active support and up-to-date features.

What do you think?

nafg commented 1 year ago

:+1:

nafg commented 1 year ago

Thanks!

nafg commented 1 year ago

BTW it's a nice diagram, and I hope you didn't work too hard on it, :wink: but did you know github supports mermaid diagrams? Here is an example: https://github.com/ardalis/StatePattern/blob/main/README.md

tribbloid commented 1 year ago

thanks a lot for teaching!

The diagram was compiled, not handcrafted. Will consider switching to mermaid/plantUML in the future