Skip to content
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

Missing files using VSCode extension installer #253

Closed
Selenyhr opened this issue Feb 15, 2023 · 2 comments · Fixed by #254
Closed

Missing files using VSCode extension installer #253

Selenyhr opened this issue Feb 15, 2023 · 2 comments · Fixed by #254
Labels
bug Something isn't working
Milestone

Comments

@Selenyhr
Copy link

Hello,

Using v2.0.15 on Code - OSS (installed from the community/code Archlinux repository):

Version: 1.75.1
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-09T20:16:38.064Z
Electron: 19.1.9
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 6.1.11-arch1-1
Sandboxed: No

The extension has been added from within VSCode, from a simple marketplace search.

I have experiences the same "Initializing Ren'Py static data..." as issue #180, and when opening up dev console, the following message pops up:

mainThreadExtensionService.ts:111 Activating extension 'LuqueDaniel.languague-renpy' failed: Cannot find module '/home/selenyhr/.vscode-oss/extensions/luquedaniel.languague-renpy-2.0.15-universal/src/renpy.json'
Require stack:
- /home/selenyhr/.vscode-oss/extensions/luquedaniel.languague-renpy-2.0.15-universal/out/navigationdata.js
- /home/selenyhr/.vscode-oss/extensions/luquedaniel.languague-renpy-2.0.15-universal/out/navigation.js
- /home/selenyhr/.vscode-oss/extensions/luquedaniel.languague-renpy-2.0.15-universal/out/hover.js
- /home/selenyhr/.vscode-oss/extensions/luquedaniel.languague-renpy-2.0.15-universal/out/completion.js
- /home/selenyhr/.vscode-oss/extensions/luquedaniel.languague-renpy-2.0.15-universal/out/extension.js
- /usr/lib/code/out/vs/loader.js
- /usr/lib/code/out/bootstrap-amd.js
- /usr/lib/code/out/bootstrap-fork.js.

The automatically installed extension contains the following files within the luquedaniel.languague-renpy-2.0.15-universal folder:

.
├── CHANGELOG.md
├── icon.png
├── language-configuration.json
├── LICENSE.txt
├── out
│   ├── character.js
│   ├── color.js
│   ├── completion.js
│   ├── definition.js
│   ├── diagnostics.js
│   ├── displayable.js
│   ├── extension.js
│   ├── hover.js
│   ├── navigationdata.js
│   ├── navigation.js
│   ├── outline.js
│   ├── references.js
│   ├── semantics.js
│   ├── signature.js
│   └── workspace.js
├── package.json
├── README.md
├── renpy.svg
├── snippets
│   └── snippets.json
├── syntaxes
│   └── renpy.tmLanguage.json
└── Visual Studio Code.edit.py

4 directories, 25 files

Injecting both src/renpy.json and src/renpyauto.json solves the issue, and Ren'Py static data can be correctly generated.

Not having this static data leads to the extension malfunctioning and some warnings being falsely triggered. The biggest example is the persistent variable has not been defaulted or defined when used in another file where they have been defaulted in. This is most likely the cause for #189.

@duckdoom4
Copy link
Collaborator

Ah thanks for that, we've been wondering why it didn't work in the stable version. We've been recommending people to just use the pre-release version up till now.

This should be an easy fix

@LuqueDaniel
Copy link
Member

LuqueDaniel commented Feb 15, 2023

Nice catch, thanks! We can solve it by importing the JSON files as modules and adding "resolveJsonModule": true to tsconfig.json. As has been done in develop branch.

@LuqueDaniel LuqueDaniel added the bug Something isn't working label Feb 15, 2023
LuqueDaniel added a commit that referenced this issue Feb 15, 2023
duckdoom4 pushed a commit that referenced this issue Feb 15, 2023
@LuqueDaniel LuqueDaniel added this to the 2.0.16 milestone Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants