lunduniversity / introprog

Teaching material for "Introduction to Programming using Scala" at Lund University, LTH. http://cs.lth.se/pgk/
141 stars 167 forks source link

Transitioning from scala-cli to scalac/scala: .class File Organization Discrepancy. (Blockmole 1.e/f) #756

Closed JohanbcEkberg closed 3 weeks ago

JohanbcEkberg commented 9 months ago

While working on Lab Blockmole 1.e/f, we've run into difficulties when transitioning from scala-cli to scalac/scala.

The primary challenge arises from the discrepancy in how .class files are organized between these two environments. This difference is causing errors during execution when using scala-cli to compile and then scala to execute.

We should probably consider revising the compendium slightly to help alleviate this confusion.

bjornregnell commented 9 months ago

When you have a moment left, it would be good if you could outline where and how things need to change to comply with scala-cli here in this issue thread to help when somone wants to start a PR?

I think we can remove sbt qith its required src/main/scala completely from the workspace and lab instructions.

JohanbcEkberg commented 9 months ago

I introprog/compendium/modules/w04-objects-lab.tex line 66. We should specify how the file should be compiled, probably with scala-cli compile <file>

And also on line 69, it should run with scala-cli run <file>

This should alleviate the confusion caused by combining scala & scala-cli

bjornregnell commented 3 weeks ago

fixed by https://github.com/lunduniversity/introprog/commit/f1766733a0b36759fb2452341f7e662729d5cfca