Skip to content

[6.0] Merge changes from main #1171

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

Merged

Conversation

ahoppen added 20 commits April 2, 2024 07:50
Previously, we `fatalError`ing when `JSONDecoder` failed to decode a message from the client. Instead of crashing, try recovering from such invalid messages as best as possible. If we know that the state might  have gotten out of sync with the client, show a notification message to the user, asking them to file an issue.

rdar://112991102
…message-has-missing-field

Don’t crash sourcekit-lsp if a known message is missing a field
…ubsequent lines when expanding trailing closures

Visual Studio Code automatically inserts the indentation of the current line to any additional lines from code completion.

rdar://125071836
…s the position from which the rename was initiated

VS Code rejects the placeholder name returned by the `PrepareRenameRequest`. When initiating rename on `x` in the following, this means that VS Code picks its own internal symbol name as the placeholder text, opening the rename textbox with `x`.

```swift
func foo(
  x: Int
) {}
```

Users then enter `y` in the expectation to rename only the parameter but sourcekit-lsp expects a function name and thus renames `foo` to `y(x:)`, which is unexpected.

rdar://125551489
…contain-originator-range

Make sure the range returned by `PrepareRenameRequest` always contains the position from which the rename was initiated
…ntifier

Support rename initiated from the end of an identifier
…d-closure

Don’t add the indentation of the current line to the insert text of subsequent lines when expanding trailing closures
Fix a couple of bugs with progress reporting in the source reducer
Instead of logging errors in position translation ad-hoc at the caller’s side (and ofter forgetting to do so), log these errors in `LineTable`. To be able to debug where the position conversion error is coming from, also log the file name and line number of the caller.

rdar://125545620
Replace usages of `fatalError` that are recoverable by non-fatal error propagation constructs
…ion-error-logging

Unify logging of errors during position conversions
@ahoppen ahoppen requested a review from bnbarham April 8, 2024 23:21
@ahoppen ahoppen requested a review from benlangmuir as a code owner April 8, 2024 23:21
@ahoppen
Copy link
Member Author

ahoppen commented Apr 8, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit 3f866b7 into swiftlang:release/6.0 Apr 10, 2024
3 checks passed
@ahoppen ahoppen deleted the ahoppen/6.0/update-from-main-04-08 branch April 10, 2024 20:09
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.

2 participants