Self-teaching Scala and SBT from some online resources. One of the difficulties is decoupling different concepts of the toolchain, IDE (trying intellij) and the learning the language. Why is SBT showing a different scalaVersion from whatever version the system says I have? And is it a concern in how my code is compiled? Here is the console output.
della@dell-xps ~/s/l/sbt-testing> scala --version
Scala code runner version 3.2.2 -- Copyright 2002-2023, LAMP/EPFL
della@dell-xps ~/s/l/sbt-testing> scalac --version
Scala compiler version 3.2.2 -- Copyright 2002-2023, LAMP/EPFL
della@dell-xps ~/s/l/sbt-testing> sbt
[info] welcome to sbt 1.8.2 (Ubuntu Java 11.0.17)
[info] loading project definition from /home/della/supply-chain-dev/learning_projects/sbt-testing/project
[info] set current project to sbt-testing (in build file:/home/della/supply-chain-dev/learning_projects/sbt-testing/)
[info] sbt server started at local:///home/della/.sbt/1.0/server/0b33882a8fc31214bc13/sock
[info] started sbt server
sbt:sbt-testing> scalaVersion
[info] 2.12.17
sbt:sbt-testing> ^D
della@dell-xps ~/s/l/sbt-testing> sbt --version
sbt version in this project: 1.8.2
sbt script version: 1.8.2
How to handle this? I read somewhere that scala 2 and 3 are not compatible, so how does it impact my code which is compatible with scala 3 but not with 2? Also, how to remove all traces of scala 2 from my system and force sbt to use the system scala version?
If important, the OS is Ubuntu 22.04.