scala-cli
scala-cli copied to clipboard
Suggestions from Scala CLI
Scala CLI could soon get the ability to suggest changes, that we don't want to be warnings or errors. Like to pin the Scala version if users specify //> using scala "2.12" (suggesting //> using scala "2.12.16" instead), or to suggest imports or switching to an explicit dependency if users do something like //> using lib "json" (not supported for now).
Printing these suggestions in the console upon every change could be annoying, so maybe these could be handled a bit like feature warnings in scalac: if we end up with possible suggestions after compiling a project, we could first print a single line, telling users that there are suggestions, and suggesting to pass --suggestions say, to print them in detail (and we could also accept a flag to disable them).
From Metals, we'd have to find a way to suggest those a bit like warnings (with underlying and all), without them to be confused with warnings (different color? - can this be achieved in VSCode?)