mfussenegger / nvim-jdtls

Extensions for the built-in LSP support in Neovim for eclipse.jdt.ls
GNU General Public License v3.0
979 stars 62 forks source link

Simplify vscode-java-test installation instructions in README #596

Open gbroques opened 6 months ago

gbroques commented 6 months ago

Problem Statement

I recently setup this plugin for debugging JUnit tests with vscode-java-test, and ran into an issue following the instructions in the README. Particularly with the npm run build-plugin step since vscode-java-test depends on a SNAPSHOT version of JDTLS.

See https://github.com/microsoft/vscode-java-test/issues/1580 and https://github.com/microsoft/vscode-java-test/pull/1581 for details.

I noticed looking at @mfussenegger's configuration, linked to from the Wiki, that they also had trouble with this step: https://github.com/mfussenegger/dotfiles/blob/833d634251ebf3bf7e9899ed06ac710735d392da/vim/.config/nvim/ftplugin/java.lua#L109-L110

-- npm install broke for me: https://github.com/npm/cli/issues/2508 -- So gather the required jars manually; this is based on the gulpfile.js in the vscode-java-test repo

See discussion https://github.com/mfussenegger/nvim-jdtls/discussions/329 for other problems with vscode-java-test bundles.

Building the bundles for vscode-java-test may require a certain version of Java, npm / Node.js, and fail for an unknown reason.

Ideas or possible solutions

A better way could be to download the pre-built bundles from the latest release.

For example, we can download the vscjava.vscode-java-test-0.39.0.vsix file, extract it, and specify the path to /extension/server/.


SEE ALSO: Discussion https://github.com/mfussenegger/nvim-jdtls/discussions/521

gbroques commented 6 months ago

Unfortunately, the vscode-java-test team stopped providing prebuilt assets for their GitHub releases starting with 0.39.1.

See: https://github.com/microsoft/vscode-java-test/issues/1594#issuecomment-1670774550

gbroques commented 6 months ago

The Mason registry also depends on this vsix asset, and @williamboman had the following to say:

I've been meaning to host built assets for these projects...

See https://github.com/mason-org/mason-registry/pull/3083#issuecomment-1787340319.

From that same pull-request thread, someone created a project to build and host vscode-java-test artifacts: https://github.com/nvim-java/vscode-java-test-releases

See https://github.com/mason-org/mason-registry/pull/3083#issuecomment-1842510410.

I'll wait on this issue, and update the README.md based on wherever the Mason registry chooses to download a prebuilt vscode-java-test artifact from.

gbroques commented 3 months ago

A quick update on this.

The Mason registry is sourcing these pre-built artifacts from the Open VSX registry:

I can work on a PR for this issue when I find time.