Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add in actions() to Problem #7242

Merged
merged 1 commit into from May 12, 2023
Merged

feat: add in actions() to Problem #7242

merged 1 commit into from May 12, 2023

Conversation

ckipp01
Copy link
Contributor

@ckipp01 ckipp01 commented May 8, 2023

This adds a new field into xsbti.Problem allowing for the compiler to forward "actions" that can address diagnostics. The idea largely mimics a very minimal CodeAction that can be found in the LSP Spec in order to ensure it will work with a variety of difference clients that use LSP, and those that don't. In the future the WorkspaceEdit that was created here could also be expanded to handle more advanced changes, aka resource operations, like creating/moving/deleting files. For now we only focus on a small subset of these features.

This relates to the discussion in https://contributors.scala-lang.org/t/roadmap-for-actionable-diagnostics/6172

This adds a new field into `xsbti.Problem` allowing for the compiler to
forward "actions" that can address diagnostics. The idea largely mimics
a very minimal `CodeAction` that can be found in the [LSP
Spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeAction)
in order to ensure it will work with a variety of difference clients
that use LSP, and those that don't. In the future the `WorkspaceEdit`
that was created here could also be expanded to handle more advanced
changes, aka resource operations, like creating/moving/deleting files.
For now we only focus on a small subset of these features.
@ckipp01 ckipp01 marked this pull request as ready for review May 10, 2023 12:33
@ckipp01 ckipp01 requested review from eed3si9n and adpi2 May 10, 2023 12:34
Copy link
Member

@adpi2 adpi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ckipp01
Copy link
Contributor Author

ckipp01 commented May 10, 2023

@tgodzik and @smarter I met with both of you about this, so I also just want to ping you to make sure we're all on the same page with this.

Copy link

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ckipp01!

@eed3si9n eed3si9n merged commit cf6fac7 into sbt:1.9.x May 12, 2023
10 checks passed
@ckipp01 ckipp01 deleted the action branch May 12, 2023 06:54
eed3si9n added a commit to eed3si9n/build-server-protocol that referenced this pull request May 21, 2023
**Problem**
We want to pass along code actions via Diagnostics,
even though this idea seems to have been shot down already in LSP
microsoft/language-server-protocol 581.

**Solution**
This defines additional `actions` field to `Diagnostics`, mirroring
sbt/sbt#7242.
cwienberg pushed a commit to cwienberg/spark-sorting-helpers that referenced this pull request Jul 24, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sbt/sbt](https://togithub.com/sbt/sbt) | patch | `1.9.2` -> `1.9.3` |

---

### Release Notes

<details>
<summary>sbt/sbt (sbt/sbt)</summary>

### [`v1.9.3`](https://togithub.com/sbt/sbt/releases/tag/v1.9.3): 1.9.3

[Compare Source](https://togithub.com/sbt/sbt/compare/v1.9.2...v1.9.3)

##### Actionable diagnostics (aka quickfix)

Actionable diagnostics, or quickfix, is an area in Scala tooling that's
been getting attention since Chris Kipp presented it in the March 2023
Tooling Summit. Chris has written the [roadmap][actionable] and sent
[sbt/sbt#7242][7242] that kickstarted the effort, but now there's been
steady progress in [Build Server Protocol][bsp527],
[Dotty](https://togithub.com/lampepfl/dotty/issues/17337), [Scala
2.13](https://togithub.com/scala/scala/pull/10406/), IntelliJ, Zinc,
etc. Metals 1.0.0, for example, is now capable of surfacing code actions
as a quickfix.

sbt 1.9.3 adds a new interface called `AnalysisCallback2` to relay code
actions from the compiler(s) to Zinc's Analysis file. Future version of
Scala 2.13.x (and hopefully Scala 3) will release with proper code
actions, but as a demo I've implemented a code action for procedure
syntax usages even on current Scala 2.13.11 with `-deprecation` flag.

This was contributed by Eugene Yokota
([@&#8203;eed3si9n](https://togithub.com/eed3si9n)) in
[zinc#1226][zinc1226]. Special thanks to [@&#8203;lrytz][@&#8203;lrytz]
for identifying this issue in
[zinc#1214](https://togithub.com/sbt/zinc/discussions/1214).

#### other updates

- Adds M1/M2/Aarch64 build of sbtn into the installer by
[@&#8203;julienrf](https://togithub.com/julienrf) in
[sbt/sbt#7329
- Fixes scripted tests timing out after 5 minutes by
[@&#8203;eed3si9n](https://togithub.com/eed3si9n) in
[sbt/sbt#7336

**Full Changelog**: sbt/sbt@v1.9.2...v1.9.3

[@&#8203;eed3si9n]: https://togithub.com/eed3si9n

[@&#8203;Nirvikalpa108]: https://togithub.com/Nirvikalpa108

[@&#8203;adpi2]: https://togithub.com/adpi2

[@&#8203;er1c]: https://togithub.com/er1c

[@&#8203;eatkins]: https://togithub.com/eatkins

[@&#8203;dwijnand]: https://togithub.com/dwijnand

[@&#8203;ckipp01]: https://togithub.com/ckipp01

[@&#8203;mdedetrich]: https://togithub.com/mdedetrich

[@&#8203;xuwei-k]: https://togithub.com/xuwei-k

[@&#8203;lrytz]: https://togithub.com/lrytz

[7242]: https://togithub.com/sbt/sbt/pull/7242

[7251]: https://togithub.com/sbt/sbt/pull/7251

[zinc1186]: https://togithub.com/sbt/zinc/pull/1186

[zinc1226]: https://togithub.com/sbt/zinc/pull/1226

[bsp527]:
https://togithub.com/build-server-protocol/build-server-protocol/pull/527

[actionable]:
https://contributors.scala-lang.org/t/roadmap-for-actionable-diagnostics/6172/1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cwienberg/spark-sorting-helpers).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
LuciferYang pushed a commit to apache/spark that referenced this pull request Jul 27, 2023
### What changes were proposed in this pull request?
The pr aims to upgrade sbt from 1.9.2 to 1.9.3.

### Why are the changes needed?
1.The new version brings some improvment:
Actionable diagnostics (aka quickfix)
Actionable diagnostics, or quickfix, is an area in Scala tooling that's been getting attention since Chris Kipp presented it in the March 2023 Tooling Summit. Chris has written the [roadmap](https://contributors.scala-lang.org/t/roadmap-for-actionable-diagnostics/6172/1) and sent sbt/sbt#7242 that kickstarted the effort, but now there's been steady progress in build-server-protocol/build-server-protocol#527, scala/scala3#17337, scala/scala#10406, IntelliJ, Zinc, etc. Metals 1.0.0, for example, is now capable of surfacing code actions as a quickfix.
sbt 1.9.3 adds a new interface called AnalysisCallback2 to relay code actions from the compiler(s) to Zinc's Analysis file. Future version of Scala 2.13.x (and hopefully Scala 3) will release with proper code actions, but as a demo I've implemented a code action for procedure syntax usages even on current Scala 2.13.11 with -deprecation flag.

2.Full release notes:
https://github.com/sbt/sbt/releases/tag/v1.9.3

3.v1.9.2 VS v1.9.3
sbt/sbt@v1.9.2...v1.9.3

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

Closes #42141 from panbingkun/SPARK-44536.

Authored-by: panbingkun <pbk1982@gmail.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
ragnarok56 pushed a commit to ragnarok56/spark that referenced this pull request Mar 2, 2024
### What changes were proposed in this pull request?
The pr aims to upgrade sbt from 1.9.2 to 1.9.3.

### Why are the changes needed?
1.The new version brings some improvment:
Actionable diagnostics (aka quickfix)
Actionable diagnostics, or quickfix, is an area in Scala tooling that's been getting attention since Chris Kipp presented it in the March 2023 Tooling Summit. Chris has written the [roadmap](https://contributors.scala-lang.org/t/roadmap-for-actionable-diagnostics/6172/1) and sent sbt/sbt#7242 that kickstarted the effort, but now there's been steady progress in build-server-protocol/build-server-protocol#527, scala/scala3#17337, scala/scala#10406, IntelliJ, Zinc, etc. Metals 1.0.0, for example, is now capable of surfacing code actions as a quickfix.
sbt 1.9.3 adds a new interface called AnalysisCallback2 to relay code actions from the compiler(s) to Zinc's Analysis file. Future version of Scala 2.13.x (and hopefully Scala 3) will release with proper code actions, but as a demo I've implemented a code action for procedure syntax usages even on current Scala 2.13.11 with -deprecation flag.

2.Full release notes:
https://github.com/sbt/sbt/releases/tag/v1.9.3

3.v1.9.2 VS v1.9.3
sbt/sbt@v1.9.2...v1.9.3

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

Closes apache#42141 from panbingkun/SPARK-44536.

Authored-by: panbingkun <pbk1982@gmail.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants