Log scala-cli version when --log-cli-version is enabled#3614
Log scala-cli version when --log-cli-version is enabled#3614yadavan88 wants to merge 2 commits intoVirtusLab:mainfrom
Conversation
| progress: Option[Boolean] = None, | ||
| @Group(HelpGroup.Logging.toString) | ||
| @Tag(tags.implementation) | ||
| @HelpMessage("Logs scala-cli version on project build") |
There was a problem hiding this comment.
| @HelpMessage("Logs scala-cli version on project build") | |
| @HelpMessage(s"Logs ${scala.cli.ScalaCli.fullRunnerName} version alongside JVM and Scala versions when the project gets recompiled by the server.") |
There was a problem hiding this comment.
it still feels hyper-granular to have a command line option just for that... wouldn't it be better to print this when verbosity is set to +1? (as in, just a single -v)
If we can live without this command line option, I guess I'd rather not have it.
tagging @tgodzik for second opinion.
There was a problem hiding this comment.
Yeah, probably too less info for a separate flag. I think it is alos fine with -v. Additionally, it might be good if the scala-cli version is also added to buildinfo, so that in cases such as mine, I can explicitly log this info using the buildinfo.
There was a problem hiding this comment.
yup, adding it to BuildInfo is a good idea, I think.
Feel free to do it in a separate PR (or make a new issue).
There was a problem hiding this comment.
Let me see if I can create a separate PR with adding this info in the buildinfo. Reg -v, let me know. It would still be nice to see this info without making any code change in the scripts.
|
|
||
| buildClient.setProjectParams(scopeParams ++ value(options0.projectParams)) | ||
| val scalaCliVersionLog = | ||
| if options0.internal.logCliVersion then Seq(s"scala-cli ${Constants.version}") else Nil |
There was a problem hiding this comment.
Can't use scala-cli here, as contextually it may be just scala. What you actually need is scala.cli.ScalaCli.fullRunnerName... which is unfortunate, since you log it in the build module.
You could maybe pass it via scala.build.input.ScalaCliInvokeData... See how it's passed around in the code elsewhere. I wonder if scala.build.input.ScalaCliInvokeData.progName would be enough...
I'm thinking this would look awkward:
Compiling project (Scala 3.7.0 JVM (17), scala 1.7.1)
We should have the full runner name, so:
Compiling project (Scala 3.7.0 JVM (17), Scala code runner 1.7.1)
Implementation for #3598