Myriad-Dreamin / tinymist

Tinymist [ˈtaɪni mɪst] is an integrated language service for Typst [taɪpst].
https://myriad-dreamin.github.io/tinymist
Apache License 2.0
735 stars 30 forks source link

Template gallery index.html is not included in packaging #59

Closed KagaJiankui closed 7 months ago

KagaJiankui commented 7 months ago

Describe the bug Invoking the template gallery command Typst: Show available Typst templates (gallery) for picking up a template to initialize on VSCode leads to error:

image

and there is no content in the template gallery tab consequently.

To Reproduce Steps to reproduce the behavior (Library test):

  1. Invoke the Typst: Show available Typst templates (gallery) for picking up a template to initialize command in VSCode command palette
  2. See error

Expected behavior The template gallery works normally as the readme and update changelog described.

Package/Software version:

VSCode version(Help -> About):

版本: 1.87.2 (system setup)
提交: 863d2581ecda6849923a2118d93a088b0745d9d6
日期: 2024-03-08T15:20:17.278Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.22631

tinymist extension version: v0.10.3

Logs:

There is no related error can be grabbed either from the output of Tinymist server or the VSCode devtool, it is located in the output of VSCode Extension Host.

2024-03-17 03:45:31.520 [error] Error: ENOENT: no such file or directory, open 'c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\editor-tools\index.html' tinymist.showTemplateGallery {"value":"myriad-dreamin.tinymist","_lower":"myriad-dreamin.tinymist"}

And the message from popout window is quite straightforward. Looking up the directory of extension also reveals the reason: there is no existence of the required file.

image

KagaJiankui commented 7 months ago

Moreover, there is an error emitted frequently in VSCode devtool, but it seems not interfering critical functions and performance:

2024-03-17 03:45:28.433 [error] [Extension Host] failed to substitute vscode variables TypeError: Cannot read properties of undefined (reading 'replace')
    at n (c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:44:47779)
    at av (c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:49:3036)
    at c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:49:3353
    at Array.map (<anonymous>)
    at cv (c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:49:3290)
    at Object.configuration (c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:44:51116)

If this error is unrelated, please move this to another separated issue.

Myriad-Dreamin commented 7 months ago

Moreover, there is an error emitted frequently in VSCode devtool, but it seems not interfering critical functions and performance:

2024-03-17 03:45:28.433 [error] [Extension Host] failed to substitute vscode variables TypeError: Cannot read properties of undefined (reading 'replace')
  at n (c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:44:47779)
  at av (c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:49:3036)
  at c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:49:3353
  at Array.map (<anonymous>)
  at cv (c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:49:3290)
  at Object.configuration (c:\Users\Falke\.vscode\extensions\myriad-dreamin.tinymist-0.10.3-win32-x64\out\extension.js:44:51116)

If this error is unrelated, please move this to another separated issue.

The vscode variable may not process some string correctly so I try-catch it. It should not be triggered frequently, so I identity it as an enhancement: I'll implement it by myself when I schedule a time. Anyway it is not related and is an separately issue.