Repository navigation
Map commands: an editor's failed request carries its own text, not "Internal error." - #1558
Merged
Merged
Conversation
…nternal error." A map command sent with a work-done token completed with the raw RequestFailedException, which lsp4j answers as JSON-RPC -32603 "Internal error.", so a refused hot reload or a failed build showed only that in VS Code. It now completes with a RequestFailed response error carrying the failure's message. The hot reload docs record the in-game run with the editor side driven through the language server.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Problem
A map command which the editor sends with a work-done token (the VS Code extension always sends one) let the editor present a failure, but completed the request with the raw
RequestFailedException. lsp4j answers any exception that is not aResponseErrorExceptionwith JSON-RPC-32603and the message "Internal error.", putting the real text only in the stack trace inerror.data. The extension shows the first line of the error's message, so a refused hot reload ("The edit cannot be hot reloaded, rebuild and restart the map: ...") or a failed build showed only "Internal error.".Change
MapRequest.handleExceptioncompletes such a request with aResponseErrorException(RequestFailed, the failure's message). Unexpected exceptions, cancellation and informational results are unchanged.docs/LUA_HOT_RELOAD.mdrecords the in-game run of the hot reload suite with the editor side driven through the language server (68 of 68 checks, 4.0 to 14.2 s perwurst.hotreload, payloads byte-identical to the command line's) and says how a refusal now reaches the editor.Validation
BuildDiagnosticsTestsasserts the error lsp4j would send for a failed build, a warning-level failure and a multi-line hot reload refusal (viaRemoteEndpoint.DEFAULT_EXCEPTION_HANDLER); it failed before the change withexpected [Build failed] but found [Internal error.].BuildDiagnosticsTestsandMapCancellationTestpass locally (Windows).Not verified: the message as displayed in VS Code (the extension code path was read, not run).