scala-cli icon indicating copy to clipboard operation
scala-cli copied to clipboard

Suggestions from Scala CLI

Open alexarchambault opened this issue 3 years ago • 0 comments

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?)

alexarchambault avatar Jun 15 '22 10:06 alexarchambault