tindzk / seed

Build tool for Scala projects
https://tindzk.github.io/seed/
Apache License 2.0
237 stars 13 forks source link

Scaffold: Only return compatible compiler versions #35

Closed tindzk closed 5 years ago

tindzk commented 5 years ago

If Typelevel Scala 2.12.4 is used along with Scala.js, the latest compiler version could not be determined during seed update:

Platform compiler versions
╭────────────┬──────────────┬──────────┬────────────────────────╮
│ Platform   │ Organisation │ Compiler │ Version                │
├────────────┼──────────────┼──────────┼────────────────────────┤
│ JVM        │ Typelevel    │ Scala    │ 2.12.4-bin-typelevel-4 │
│ JavaScript │ Typelevel    │ Scala    │ Not available          │
│            │ Scala.js     │ Plug-in  │ Not available          │
╰────────────┴──────────────┴──────────┴────────────────────────╯

This is due to the fact that Scala.js supports Scala 2.13, and if all libraries are compatible, choosePlatformConfiguration() would choose 2.13 over 2.12. However, Typelevel Scala does not have a stable 2.13 release which is why the columns above state "Not available".

Change fetchCompilerVersions() such that for all non-JVM platforms it filters out any Scala versions that are incompatible with the ones offered by the organisation.