JacquesLucke / blender_vscode

Visual Studio Code extension for Blender development.
MIT License
568 stars 75 forks source link

addon_folders.ts: assign scheme to URIs created for mockups #147

Closed kiraacorsac closed 1 month ago

kiraacorsac commented 1 year ago

Correctly constructs URI objects that are passed to functions related to searching addon files.

Additionally, vscode dependency is updated to a non-depricated version, compatible with the same engine version, and typescript is updated to a version that is compatible with that version.

Small changes in addon_folder.ts are to make the new typescript version happy.

Closes #146

kiraacorsac commented 11 months ago

looking at MR now, it should have been two MRs with the a "assign a scheme" depending on the "update packages". I can fix it if needed - I was kinda in a hurry to compile a working version for myself.

Griperis commented 2 months ago

@kiraacorsac can you resurrect this, so this can get into a newer version? I think the module update might still be required.

CC @JacquesLucke

Mateusz-Grzelinski commented 1 month ago

I have some time to refresh the issue, but I have no idea what it fixes and how to test it. Any tips?

Mateusz-Grzelinski commented 1 month ago

Finally I was able to reproduce the problem. Please next time say that is it about blender.addonFolders - I have never used it before.

19037 text: AsyncIterable;



[14:15:26] Found 1 error. Watching for file changes.
```
* one time I got this error, what indicates completely different issue on hand:
```
RuntimeError: Can't listen for client connections: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
```

**Please Review the changes!**

Tested in basic way with blender 4.2, 2.8.
kiraacorsac commented 1 month ago

Finally I was able to reproduce the problem. Please next time say that is it about blender.addonFolders - I have never used it before.

It is both in the merge request title and the issue it closes, but yeah.

* I had to reinstall dependencies for development, no big deal

Yes, as package.json got updated this is needed.

* Are we dropping support for older VS code versions by updating dependencies?

  * do I see correctly that oldest vs code version we support is now `"^1.28.0"`?

Yes. 1.28 is 5 years old at this point, hopefully it's OK. The update is needed as it's the lowest version where vscode.Uri does what it's supposed to do.

* I got error, fixed in [cfddba7](https://github.com/JacquesLucke/blender_vscode/pull/147/commits/cfddba70294615778af417a6c3af7a31e418b095) - it was pretty much random google fix, anyone knows why it happens?

Not sure why it appears now, propably some typescript weirdness. Cleaner fix should be bumping the es6 as a whole, by setting lib: ['es2018'] or lib: ['es2020'], but I haven't tried it. That way you avoid having two libraries, one pulled only for a single type.

kiraacorsac commented 1 month ago

I will try to rebuild it later this week and let you know whether everything works as expected. I don't have the repo for this extension running right now.

Mateusz-Grzelinski commented 1 month ago

the vs code samples are even more aggressive when it comes to dependency version, so i think we do not need to worry https://github.com/microsoft/vscode-extension-samples/blob/main/helloworld-sample/package-lock.json we probably can switch to es2020

Mateusz-Grzelinski commented 1 month ago

I updated branch to the newest master yet again. @kiraacorsac after you make the change and we merge this PR, I will test the changes on linux and windows and then ask Jack to do a release.

Mateusz-Grzelinski commented 1 month ago

@kiraacorsac recently i was developing using typescript 5.5.2 and es2020 - worked totaly fine so I commited this change here. I would like to merge the change and ask Jack for release. Can you confirm if it looks good?

kiraacorsac commented 1 month ago

Thank you for resurrecting this @Mateusz-Grzelinski, it works as expected when installed as VSIX with addonFolders located on D:/ drive, on windows, Bledner 3.6 and Blender 4.1.