deanwampler / programming-scala-book-code-examples

The code examples used in Programming Scala, 2nd and 3rd Editions (O'Reilly)
Other
646 stars 412 forks source link

sbt test and sbt console fail #146

Open kmsnyde opened 3 weeks ago

kmsnyde commented 3 weeks ago

Multiple warnings/errors running either sbt test or sbt console following Zero to Sixty instructions. The ending information below from running sbt (no errors) and then "console" from root directory programming-scala-book-code-examples (used git clone to build the directory)

[warn] 13 | given [K]: Functor[MapKV[K]] with // <2> [warn] | ^ [warn] | This old given syntax is no longer supported; use => instead of : [warn] -- Warning: D:\projects\programming-scala-book-code-examples\src\main\scala\progscala3\typesystem\typelambdas\Functor.scala:13:31 [warn] 13 | given [K]: Functor[MapKV[K]] with // <2> [warn] | ^ [warn] |Given member definitions starting with with are no longer supported; use {...} or : followed by newline instead [error] No warnings can be incurred under -Werror (or -Xfatal-warnings) [warn] 43 warnings found [error] one error found [error] (Compile / compileIncremental) Compilation failed [error] Total time: 13 s, completed Nov 3, 2024 8:50:00 AM sbt:programming-scala-3rd-ed-code-examples>

deanwampler commented 3 weeks ago

Thanks for the heads up and sorry I didn't catch these syntax changes. I'll try to fix them today.

kmsnyde commented 3 weeks ago

Thanks Dean; I really appreciate that you are responding so quickly. Looking forward to adding Scala to my python/pyspark data science tool set and using, where applicable, in the near future. I have no doubt, with your experience and instruction put into your book, that I'm well on my way. Thanks again.

deanwampler commented 3 weeks ago

Okay, it's fixed. I had to set the Scala Version to 3.5.2, the last "official" release. It looks like 3.6.X will introduce breaking syntax changes, which I'll support when this series is official, starting with 3.6.2 (There were "glitches" with 3.6.0 and 3.6.1...)

Let me know if you have any more issues!