Skip to content

Replace fatalError with proper error handling for non-incremental #2227

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
merged 2 commits into from
Aug 5, 2025

Conversation

Clemo97
Copy link
Contributor

@Clemo97 Clemo97 commented Aug 3, 2025

Fixes issue #2210

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thanks for taking this! One small comment.

@@ -519,7 +519,8 @@ package actor SourceKitLSPServer {
syncKind = .incremental
}
guard syncKind == .incremental else {
fatalError("non-incremental update not implemented")
logger.error("Received non-incremental update request, which is not implemented")
Copy link
Member

Choose a reason for hiding this comment

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

We don’t need a logger.error call here. Throwing the error will log an error from the orLog call in line 480.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello, thanks for the feedback.
I've made the necessary changes in the new commit.

@Clemo97 Clemo97 requested a review from ahoppen August 4, 2025 19:13
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

No worries. Thanks for fixing it. Looks good to me. 👍🏽

@ahoppen
Copy link
Member

ahoppen commented Aug 4, 2025

@swift-ci Please test

@ahoppen ahoppen merged commit ca07fb3 into swiftlang:main Aug 5, 2025
3 checks passed
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