**Problem**
semanticdbEnabled doesn't work on sbt 2.x
1. classes directory has changed during compilation
2. semanticdb scalacOptions are duplicated for Test
**Solution**
1. change to using the backend directory
2. reimplement scalacOptions handling
In `classifiersModuleTask` we now don't include the full plugin classpath, but include only the dependency classpath (effectively excluding sbt.PluginData.definitionClasspath). Only items from the dependency classpath are considered to be published. Only for them we can download classifier artifacts later in the `updateSbtClassifiers` pipeline.
This also fixes integration test "dependency-management/update-sbt-classifiers".
I also made the test stricter, it now tests the module ids that are included in the sbt classpath.
**Problem**
We changed the content of Chrome tracing file incorrectly
and renamed tid to tname.
**Solution**
1. This renames tname back to to tid.
2. To retain the fix to avoid Thread#getId, this calls
either the JDK 8 way or the JDK 19 way reflectively.
Add a `allowUnsafeScalaLibUpgrade` setting (default is `false`) to
demote the SIP-51 build failure to a warning.
If the scalaVersion is 2.13.12 but some dependency pulls in
scala-library 2.13.13, the compiler will stay at 2.13.12, but
the dependency classpath will contain scala-library 2.13.13.
This usually works, the compiler can run fine with a newer
scala-library on its dependency classpath.
Macro expansion may fail, if the macro uses some library
class / method that doesn't exist in the old version.
The macro itself is loaded from the dependency classpath
into the class loader running the compiler, where the older
Scala library is on the runtime classpath.
Using the Scala REPL in sbt may also fail in a similar fashion.
**Problem**
Compiler warnings and errors is not correct for build.sbt.
**Solution**
This adds line offset to the synthetic Scala file
so the original line position is displayed in the errors.
**Problem**
Currently sbtn doesn't correctly display the stdout
during `run` because by the time it starts the terminal has been reset.
**Solution**
Don't reset the terminal in-between the tasks.