fix: bundling error makes terminal suggestions fail#208822
Merged
Tyriar merged 2 commits intomicrosoft:mainfrom Mar 28, 2024
cpendery:fix/bundle-suggestion-error
Merged
fix: bundling error makes terminal suggestions fail#208822Tyriar merged 2 commits intomicrosoft:mainfrom cpendery:fix/bundle-suggestion-error
Tyriar merged 2 commits intomicrosoft:mainfrom
cpendery:fix/bundle-suggestion-error
Conversation
Signed-off-by: Chapman Pendery <[email protected]>
Signed-off-by: Chapman Pendery <[email protected]>
Member
|
Nice investigation 🙂 we're in the test phase so I'll try get this merged later this week or early next week |
Tyriar
approved these changes
Mar 28, 2024
| // TODO: What do frozen and auto do? | ||
| const xtermBox = this._screen!.getBoundingClientRect(); | ||
| const panelBox = this._panel!.offsetParent!.getBoundingClientRect(); | ||
| this._suggestWidget?.showSuggestions((this._suggestWidget as any)._completionModel, 0, false, false, { |
Member
There was a problem hiding this comment.
Pretty sure this any was the cause of the problem, we do our own private member mangling so access to private methods like this does not work.
lramos15
approved these changes
Mar 28, 2024
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
There is an issue with the bundling / build process for VSCode Insiders that introduces an undefined reference bug to the SimpleSuggestWidget show below.
bundleError.mp4
As you can see in the code snippets below and their bundled counterparts, the second bundled image of calling
showSuggestionsuses the variablethis.h._completionModel, but it should bethis.h.bas seen in the first bundled image. This results in the value being undefined and causing the suggestions to error out. This PR removes the passing of a private variable to the widget and instead exposes a set method for theCompletionModelwhich should fix this issue in the build.Update the widget's model
Code
vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.ts
Lines 207 to 218 in 17e86de
Bundled Code
Call showSuggestions
Code
vscode/src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalSuggestAddon.ts
Lines 470 to 474 in 17e86de
Bundled Code
Part of #154662