Closed peter-liuseu closed 2 years ago
OK, I must have messed up something while publishing, I'll take a look, thanks.
As a temporary fix for this issue, you can do the following:
Open Extensions Folder
gimly81.matlab-2.2.0
npm install
From what I could tell, this is an issue with the bundling of the new dependency vscode-textmate-languageservice
.
When VSCode tries to activate the extension it encounters the following error:
[2021-10-18 17:44:49.458] [exthost] [info] ExtensionService#_doActivateExtension Gimly81.matlab, startup: false, activationEvent: 'onLanguage:matlab' [2021-10-18 17:44:49.458] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/USERNAME/.vscode/extensions/gimly81.matlab-2.2.0/out/src/extension [2021-10-18 17:44:49.465] [exthost] [error] Activating extension Gimly81.matlab failed due to an error: [2021-10-18 17:44:49.465] [exthost] [error] Error: Cannot find module 'vscode-textmate-languageservice'`
However, I do not think that this is an issue with esbuild
configuration. Because it does seem like it's bundling the module.
When the --analyze
option is added to the esbuild-base
script, it outputs the following:
out/main.js 712.3kb 100.0% ├ node_modules/vscode-textmate/release/main.js 100.6kb 14.1% ├ node_modules/iconv-lite/encodings/tables/cp936.json 88.6kb 12.4% ├ node_modules/iconv-lite/encodings/tables/cp950.json 81.8kb 11.5% ├ node_modules/iconv-lite/encodings/tables/eucjp.json 79.3kb 11.1% ├ node_modules/iconv-lite/encodings/tables/cp949.json 71.0kb 10.0% ├ node_modules/iconv-lite/encodings/sbcs-data-generated.js 60.5kb 8.5% ├ node_modules/iconv-lite/encodings/tables/shiftjis.json 45.8kb 6.4% ├ node_modules/iconv-lite/encodings/tables/big5-added.json 35.8kb 5.0% ├ node_modules/vscode-oniguruma/release/main.js 20.1kb 2.8% ├ node_modules/iconv-lite/encodings/dbcs-codec.js 16.1kb 2.3% ├ node_modules/iconv-lite/encodings/utf32.js 7.7kb 1.1% ├ node_modules/iconv-lite/encodings/utf7.js 7.3kb 1.0% ├ node_modules/vscode-textmate-languageservice/out/src/workspaceSymbolProvider.js 7.1kb 1.0% ├ node_modules/iconv-lite/encodings/sbcs-data.js 6.8kb 1.0% ├ node_modules/vscode-textmate-languageservice/out/src/textmateEngine.js 5.7kb 0.8% ├ node_modules/vscode-textmate-languageservice/out/src/foldingProvider.js 5.0kb 0.7% ├ node_modules/iconv-lite/encodings/internal.js 4.9kb 0.7% ├ node_modules/iconv-lite/lib/index.js 4.7kb 0.7% ├ node_modules/iconv-lite/encodings/utf16.js 4.5kb 0.6% ├ node_modules/vscode-textmate-languageservice/out/src/util/registryResolver.js 4.2kb 0.6% ├ node_modules/vscode-textmate-languageservice/out/src/peekDefinitionProvider.js 4.0kb 0.6% ├ src/extension.ts 4.0kb 0.6% ├ node_modules/vscode-textmate-languageservice/out/src/tableOfContentsProvider.js 3.8kb 0.5% ├ node_modules/iconv-lite/encodings/dbcs-data.js 3.7kb 0.5% ├ src/mlintErrors.ts 3.2kb 0.4% ├ node_modules/vscode-textmate-languageservice/out/src/documentSymbolProvider.js 3.2kb 0.4% ├ node_modules/iconv-lite/lib/streams.js 3.0kb 0.4% ├ node_modules/iconv-lite/encodings/tables/gb18030-ranges.json 2.7kb 0.4% ├ node_modules/safer-buffer/safer.js 2.3kb 0.3% ├ node_modules/iconv-lite/encodings/tables/gbk-added.json 2.2kb 0.3% ├ node_modules/find-up/index.js 2.2kb 0.3% ├ node_modules/iconv-lite/encodings/sbcs-codec.js 2.0kb 0.3% ├ src/matlabDiagnostics.ts 1.9kb 0.3% ├ node_modules/locate-path/index.js 1.7kb 0.2% ├ node_modules/p-limit/index.js 1.5kb 0.2% ├ node_modules/iconv-lite/lib/bom-handling.js 1.2kb 0.2% ├ node_modules/p-locate/index.js 1.2kb 0.2% ├ node_modules/yocto-queue/index.js 1.1kb 0.2% ├ node_modules/vscode-textmate-languageservice/out/src/util/onigLibs.js 1.1kb 0.2% ├ node_modules/vscode-textmate-languageservice/out/src/util/dispose.js 1.0kb 0.1% ├ node_modules/vscode-textmate-languageservice/out/src/util/lazy.js 782b 0.1% ├ node_modules/vscode-textmate-languageservice/out/src/index.js 724b 0.1% ├ node_modules/iconv-lite/encodings/index.js 645b 0.1% ├ node_modules/path-exists/index.js 552b 0.1% ├ node_modules/pkg-dir/index.js 520b 0.1% └ node_modules/vscode-textmate-languageservice/out/src/util/file.js 389b 0.1%
And as can be seen in the log, there are multiple entries that mention files from vscode-textmate-languageservice
.
I hope this helps with fixing the issue.
@Gimly , it looks the extension hard errors on every load w/ version 2.20 because of this missing dependency. Syntax highlighting gets loaded but downstream things break. Any ETA on a fix for this?
Last couple of weeks were a little crazy and I wasn't able to work on that. I'm not so sure about this week either. I'll do my best. Really sorry.
@SNDST00M any thoughts on what may be going wrong here? The missing dependency is your new vscode-textmate-languageservice so any insight would be appreciated. Maybe there's something special about how it should be depended on?
I don't believe so, and I'm also unable to reproduce
Curious. If you open the Output window and go to "Log (Extension Host)" and scroll around, you don't see the errors that @mjdshibly reported?
I reliably see those. Syntax highlighting works, but the other providers are then broken. Some other folks I work with have reported similar issues.
@SNDST00M Did you make sure that your installation of the extension is completely clean, and that you're not running the development version in an Extension Host window? You might also want to try opening the installation folder for VSCode extensions, and manually deleting the extension's folder. Maybe VSCode does not clean everything up when doing a normal extension uninstallation and what sticks around prevents the error from reproducing for you.
Happened when I deleted the gimly81.matlab
folder. There isn't actually a node_modules
folder post-installation, hence the issue.
This should be generated using npm list -parseable -depth 0 -dev true
or left out (as VSCE is meant to work with a bundler like webpack).
https://github.com/SNDST00M/vscode-native-svg-preview/blob/v1.60.2/package.json#L201-L204
I've pushed a new version which should hopefully fix that issue. Reopening until I have confirmation it is indeed fixed.
I've pushed a new version which should hopefully fix that issue. Reopening until I have confirmation it is indeed fixed.
I'm glad to see this new version has fixed the bugs recently mentioned, but "Peek Defination" still cannot work when I put the function into the same folder. It says "No definition found".
Something's gone catastrophically wrong in the TM-based language service again.
ERR Unable to read file '%APPDATA%\Roaming\Code\User\globalStorage' (Error: Unable to read file '%APPDATA%\Roaming\Code\User\globalStorage' that is actually a directory): EntryIsADirectory (FileSystemError): Unable to read file '%APPDATA%\Roaming\Code\User\globalStorage' (Error: Unable to read file '%APPDATA%\Roaming\Code\User\globalStorage' that is actually a directory)
at _handleError (%APPDATA%\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:164071)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
In the backend it reads off the document symbol provider just like the "go to symbol" feature. Those two providers work, so I'll have to debug.
I found the problem and I'm planning a new release to fix it. I am also hammering together a test suite so this doesn't repeat itself.
Good news, I have made a breakthrough with the testing and will have this out by tomorrow.
Unexplained regression, the 0.2.0 release of the LSP is delayed indefinitely I guess.
Now fixed! Full steam ahead with a publish definitely coming soon™
Hi these issues have been addressed in the latest version! Please notify us if not
Same here. Downgrading to 2.0.1 fixed the issue.