You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the previous version of Scala CLI was introduced a new actionable diagnostic which can be turned on by running the command:
scala-cli config actions true
and to disable it users have to run:
scala-cli config actions false
It is integrated with metals with QuickFix actions:
Screen.Recording.2022-11-05.at.11.14.15.mov
It works only from the nightly version of Metals.
Describe the solution you'd like
For now, it is only available one actionable diagnostic for updating outdated dependencies. I created this issue to track other actionable diagnostics and collect some others ideas.
Some ideas for a new actionable diagnostics:
Detect duplication of using directives in project and suggest users to have only one. For example in the project we should have only one using directive to specify scala version //> using scala.
Suggest user to convert ivy and dep syntax to using directive. It should replace ivy/dep to //> using lib
The text was updated successfully, but these errors were encountered:
2022.11.20 20:01:24 INFO BSP server: [warn] ./test.scala:1:1: This using directive is ignored. Using directive using plain comments are deprecated. Please use a special comment syntax: '//> ...' or '/*> ... */'
2022.11.20 20:01:24 INFO BSP server: [warn] // using scala "2.13.10"
2022.11.20 20:01:24 INFO BSP server: [warn] ^^^
Which under the hood looks like:
[Trace - 08:09:57 pm] Received notification 'build/publishDiagnostics'
Params: {
"textDocument": {
"uri": "file:///Users/ckipp/Documents/scratch-workspace/dependency-diagnostic-issue/test.scala"
},
"buildTarget": {
"uri": "file:/Users/ckipp/Documents/scratch-workspace/dependency-diagnostic-issue/.scala-build/?id\u003dproject_bd2c96d2de-199b58dc22"
},
"diagnostics": [
{
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 3
}
},
"severity": 2,
"source": "scala-cli",
"message": "This using directive is ignored. Using directive using plain comments are deprecated. Please use a special comment syntax: \u0027//\u003e ...\u0027 or \u0027/*\u003e ... */\u0027"
}
],
"reset": false
}
It'd be great to just have data here with the correct syntax (adding the >) so that Metals could just offer a quick fix to do this for the user.
Detect duplication of using directives in project and suggest users to have only one. For example in the project we should have only one using directive to specify scala version //> using scala.
From the previous version of Scala CLI was introduced a new actionable diagnostic which can be turned on by running the command:
and to disable it users have to run:
It is integrated with metals with QuickFix actions:
Screen.Recording.2022-11-05.at.11.14.15.mov
It works only from the nightly version of Metals.
Describe the solution you'd like
For now, it is only available one actionable diagnostic for updating outdated dependencies. I created this issue to track other actionable diagnostics and collect some others ideas.
Some ideas for a new actionable diagnostics:
//> using scala
.ivy
anddep
syntax to using directive. It should replaceivy/dep
to//> using lib
The text was updated successfully, but these errors were encountered: