microsoft / vscode-java-dependency

Manage Java projects in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency
MIT License
152 stars 74 forks source link

java projects view remains empty, error popup appears #763

Closed SLepUbIn closed 1 year ago

SLepUbIn commented 1 year ago

When tring to unfold the java projects view with extension v0.22.0, a popup appears with the message :

"no delegateCommandHandler for java.project.checkImportStatus"

Screenshot_20230510_094036

Java projects is empty :

Screenshot_20230510_094059

Cleaning workspace and server space does not help. Restarting code neither.

Also you can find logs attached

vscode.log

Reverting the extension to 0.21.2 fixes the issue.

jdneo commented 1 year ago
Contains: Cannot extract bundle symbolicName or version /home/ubik/.vscode-oss/extensions/vscjava.vscode-java-dependency-0.22.0-universal/server/com.microsoft.jdtls.ext.core-0.22.0.jar
java.nio.file.NoSuchFileException: /home/ubik/.vscode-oss/extensions/vscjava.vscode-java-dependency-0.22.0-universal/server/com.microsoft.jdtls.ext.core-0.22.0.jar

Looks like the extension file is broken causing the required jar is missing.

Could you try to remove /home/ubik/.vscode-oss/extensions/vscjava.vscode-java-dependency-0.22.0-universal and reinstall the extension?

jdneo commented 1 year ago

Wait, is VS Code OSS use the same marketplace of VS Code?

SLepUbIn commented 1 year ago

Yes it uses the same marketplace. It is the version bundled by the linux distribution manjaro.

I tried to delete folder /home/ubik/.vscode-oss/extensions/vscjava.vscode-java-dependency-0.22.0-universal/ and reinstall, same problem.

I looked in the new ly created /home/ubik/.vscode-oss/extensions/vscjava.vscode-java-dependency-0.22.0-universal/ folder and there is no server subfolder in it.

When I look at the /home/ubik/.vscode-oss/extensions/vscjava.vscode-java-dependency-0.21.2-universal/ folder , there is a server subfolder with the jar in it.

~/.vscode-oss/extensions/vscjava.vscode-java-dependency-0.21.2-universal/server
❯ ls
com.microsoft.jdtls.ext.core-0.21.2.jar
~/.vscode-oss/extensions/vscjava.vscode-java-dependency-0.22.0-universal
❯ ls
CHANGELOG.md  icons        logo.png  package.json      package.nls.zh-cn.json  README.md    templates
dist          LICENSE.txt  main.js   package.nls.json  package.nls.zh-tw.json  SECURITY.md  ThirdPartyNotices.txt
jdneo commented 1 year ago

This is the link where you can download 0.22.0 from the official marketplace. I verified that the server folder exists in the downloaded vsix: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/vscjava/vsextensions/vscode-java-dependency/0.22.0/vspackage

Your extension must be downloaded from open vsx: https://open-vsx.org/extension/vscjava/vscode-java-dependency

I checked the content of the vsix, the server folder is not there.

As a workaround, you can manually install the extension downloaded from the official marketplace and file an issue at https://github.com/eclipse/openvsx to report this problem.

amvanbaren commented 1 year ago

@SLepUbIn, @jdneo The Open VSX server does not remove any files or folders from the VSIX package.

jdneo commented 1 year ago

@amvanbaren How does Open VSX build the vsix? If it's simply run vsce package, then I'm afraid it will cause some problem.

amvanbaren commented 1 year ago

@jdneo ovsx, the Open VSX CLI, calls vsce's createVSIX function. https://github.com/eclipse/openvsx/blob/f013e2d8ec9e4e4cc4b9fdc14980c2d59584cc66/cli/src/publish.ts#L163

Is ovsx missing functionality or does vscode-java-dependency have extra (non standard) build steps?

jdneo commented 1 year ago

Yes, npm run build-server is required to build the jar.

amvanbaren commented 1 year ago

Ok, in that case ovsx also supports publishing pre-built VSIX packages:

npx ovsx publish --packagePath 'path/to/package.vsix' -p my-access-token
amvanbaren commented 1 year ago

Ok, in that case ovsx also supports publishing pre-built VSIX packages:

npx ovsx publish --packagePath 'path/to/package.vsix' -p my-access-token

To clarify, you build the VSIX package and publish it to the Visual Studio Marketplace, and then publish the same package to the Open VSX Registry using the above command.

jdneo commented 1 year ago

@amvanbaren We didn't release the vsix to Open VSX Registry, and I don't know who did those releases before either. Given that the limited resources we have, at least in the near future, we will only maintain the release in the VS Code Marketplace.

On the other hand, I think people can re-publish to Open VSX Registry if they want to. As long as the released package works as expected, it should be fine.

filiptronicek commented 1 year ago

Thanks for the assistance here, @jdneo!

I am currently responsible for releasing the extension to Open VSX and therefore, if you get any other reports concerning the version published there feel free to ping me anywhere :).

We are currently in the process of removing the broken version of 0.23.0 and re-publishing it with https://github.com/microsoft/vscode-java-dependency/releases/download/0.23.0/vscjava.vscode-java-dependency-0.23.0.vsix.

jdneo commented 1 year ago

@filiptronicek Thank you for the help!

TechPro424 commented 1 year ago

Is the issue supposed to be fixed? I'm still having this issue (using vscodium)

TechPro424 commented 1 year ago

Oh just realised I'm supposed to ping @filiptronicek because the issue is closed meaning notifications may not go through