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

bump up java-test to 0.40.1 #3348

Closed
wants to merge 3 commits into from
Closed

bump up java-test to 0.40.1 #3348

wants to merge 3 commits into from

Conversation

s1n7ax
Copy link

@s1n7ax s1n7ax commented Nov 6, 2023

After the removal of .vsix from releases, updating java-test is not possible. So, this change will build the package from source. #3036

IMPORTANT: path to shared jars in the vsix was java-test/extension/server/*.jar but when build with source, there is no extension directory anymore. This might break existing configs.

Current latest version in Mason-registry also has a bug where there is an error upon test search. microsoft/vscode-java-test#1625 so updating current version is important.

@williambotman williambotman requested a review from a team November 6, 2023 17:16
@mikehaertl
Copy link

@williamboman I'd like to help testing this as this update is quite important for Java Devs.

Can you (or @s1n7ax ) give me a quick pointer how configure mason to point to the source branch of this PR?

I found this, but unsure how to set the branch:
https://github.com/williamboman/mason.nvim/blob/41e75af1f578e55ba050c863587cffde3556ffa6/README.md?plain=1#L221-L227

This information could probably also be added to CONTRIBUTING.md

@s1n7ax
Copy link
Author

s1n7ax commented Nov 24, 2023

@mikehaertl 0.40.1 clean build stopped working for me. I don't know if it worked the first time because I had a cache. Main branch however is working. So, I forked the vscode-java-test and created a new tag 0.40.2 from main. I created a new mason registry called nvim-java-mason-registry. It uses my java-test fork and 0.40.2 tag. If you want to use that, you can add the registry to mason config. After adding the registry, you should run MasonUpdate.

edit:
BTW, I don't think mason gets the package definitions from git repo. I think it fetches the latest release artifacts.

edit:
This PR is not updated with any of that. I don't think this will be accepted either. I believe they are looking for a more friendly approach because building requires node & npm.

I didn't know #3083 PR existed when this is created. You could check the comments in there if you want to get that exact PR working.

return {
	'williamboman/mason.nvim',
	opts = {
		registries = {
			'github:nvim-java/nvim-java-mason-registry',
			'github:mason-org/mason-registry',
		},
	},
}

@mikehaertl
Copy link

@s1n7ax Thanks for the update and for the pointer to that other issue.

I quickly tried your registry but had some trouble due to changed paths or something and had no time to fix my config. TBH I will then probably wait a bit and see if there's an "official" solution.

Thanks for your effort nonetheless.

@s1n7ax
Copy link
Author

s1n7ax commented Dec 6, 2023

Hello. I have created a workflow that release build artifacts on new release of java-test. This is daily checking to see if there are new relea are available in the original project that's not available in the current releases.

NOTE that 0.40.1 release fail to build so at the moment I have used main branch to release the build artifacts.

https://github.com/nvim-java/vscode-java-test-releases

I have a custom mason registry to use the releases from this here

https://github.com/nvim-java/mason-registry

Adding the registry to mason & Mason should to the job. MasonInstall java-test@0.40.1 should install the newest version.

{
	'williamboman/mason.nvim',
	opts = {
		registries = {
			'github:nvim-java/mason-registry',
			'github:mason-org/mason-registry',
		},
	},
}

@williamboman
Copy link
Member

Nice @s1n7ax! I like the idea of the community taking ownership of specific areas 👍 (I know creating your own Mason registry is a hassle currently, I need to make it much easier and document it).

As for java-test and java-debug, the good news is that OpenVSX seems to have been revitalized earlier this year after announcing they were shutting down their services. They host built artifacts for both java-test and java-debug, and I'm right now working on adding OpenVSX support in the mason.nvim client. Once that's done we can update these packages to install from OpenVSX (e.g. pkg:openvsx/vscjava/vscode-java-test@0.40.1). I'll close this PR and create new ones once it's ready to go.

@s1n7ax
Copy link
Author

s1n7ax commented Dec 29, 2023

@williamboman That's better. Idea of adding third party registries are brilliant however, in reality, pretty much most issues we got had something to do with updating mason registries. So far it's always user messing up something when setting up mason. I would like some improvements when it comes to mason APIs available for plugin developers at least to show better error messages to user.

I will create an issue with challenges but in simple words, registry versioning & dynamic registry loading would be perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants