mason-org / mason-registry

Core registry for mason.nvim.
https://mason-registry.dev/registry/list
Apache License 2.0
130 stars 292 forks source link

Mason fails to resolve JDTLS version for older milestones #3017

Open dorin-suletea opened 9 months ago

dorin-suletea commented 9 months ago

:MasonInstall jdtls@1.26.0 fails with Failed to download file : https://download.eclipse.org/jdtls/milestones/1.26.0/jdt-language-server-1.26.0-202309281329.

The actual version published is : https://www.eclipse.org/downloads/download.php?file=/jdtls/milestones/1.26.0/jdt-language-server-1.26.0-202307271613.tar.gz

The suffix -202309281329 matches latest jdtls version (1.28.0) https://www.eclipse.org/downloads/download.php?file=/jdtls/milestones/1.28.0/jdt-language-server-1.28.0-202309281329.tar.gz

I believe this happens as the suffix is hardcoded : https://github.com/mason-org/mason-registry/commit/80bd37edc0c919914b80c9421be7c3199ddebaa4

Might be somewhat related to this : https://github.com/williamboman/mason.nvim/discussions/286

zenoli commented 9 months ago

I made an issue for this on the mason repo as well a couple of days ago

mikehaertl commented 2 months ago

Following the purl specs I wonder if we could add the required timestamp a qualifier to the package id:

id: pkg:generic/eclipse/eclipse.jdt.ls@v1.34.0?timestamp=202404031240

This should make it easy to reference it in the source.file.download section.

Alternatively we could append it to the version separated with a dash:

id: pkg:generic/eclipse/eclipse.jdt.ls@v1.34.0-202404031240

Then split it with an expression to create the final download URL.