feat: account for ScalaDiagnostic in diagnostic data#5338
Merged
ckipp01 merged 1 commit intoscalameta:mainfrom Jul 4, 2023
Merged
feat: account for ScalaDiagnostic in diagnostic data#5338ckipp01 merged 1 commit intoscalameta:mainfrom
ScalaDiagnostic in diagnostic data#5338ckipp01 merged 1 commit intoscalameta:mainfrom
Conversation
ckipp01
commented
Jun 15, 2023
| * unrequired keys in the structure that causes issues when we try to | ||
| * deserialize the old top level text edit vs the newly nested actions. | ||
| */ | ||
| object DiagnosticDataDeserializer |
Member
Author
There was a problem hiding this comment.
I saw your comment in #5173 (comment) @tgodzik , but I still couldn't figure out a good way to do this now that we're using b.ScalaDiagnostic that doesn't mark it as NotNull. This doesn't seem to work, but if you have a better solution I'm all ears.
Contributor
There was a problem hiding this comment.
Ok, so there is no sensible way around it. I found a Kotlin article that suggest using reflection for automatic detection of null fields, but let's not do that 😅
This was referenced Jun 15, 2023
[Progress] - start utilizing
data in diagnostics to forward "quickfixes" to tools
scala/scala3#17337
Closed
This pr bumps the version of BSP to the latest that includes the changes necessary for the new `ScalaDiagnostic` that is included in the `data` field of the Diagnostic coming over BSP. These include actions coming straight from the Scala 3 compiler.
54e88d3 to
4bd3ee1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr bumps the version of BSP to the latest that includes the changes necessary for the new
ScalaDiagnosticthat is included in thedatafield of the Diagnostic coming over BSP. These include actions coming straight from the Scala 3 compiler.Here are some examples using sbt 1.9.0 and the code changes in here:
Supersedes #5173 since the shape is a bit different now than originally planned. Since this is the shape already baked into BSP, I'll do a follow-up in scala-cli to also update the top level
TextEditthat it uses to instead useScalaDiagnosticindata.