Open errantepiphany opened 1 year ago
I've created this issue here, replacing https://github.com/mason-org/mason-registry/issues/2450
Hello! Ah yeah versions should not target mutable references, such as the latest
tag in this case. https://github.com/mason-org/mason-registry/pull/2512 changes to use commit SHAs instead. Ideally they'd tag immutable releases
Hi @williamboman, thank you. That makes sense, but I'm curious: is there any configuration option in mason I can use in drools-lsp that checks the timestamp on a release artifact, and re-downloads the artifact if a new one has been created? What if an artifact was referenced as part of a branch instead of a tag, and you wanted the latest on that branch? How would that work? I think this would be a nice feature for a kind of "developer mode", where you always want the latest from a CI build, but not necessarily bump a version. Thanks again. :)
While it's possible to modify release assets after publishing them to GitHub, they are treated as immutable. Having additional logic and features that track changes to the digests of artifacts would provide little to no utility, imo.
~In the case of drools, the asset file is also not provided via releases but is instead a file within the git repo itself, which perfectly follows the immutability principle.~
edit: Actually nvm it does seem like it's providing built assets via releases 🙈
@williamboman Okay, so the recommendation is whenever there is a new release of an lsp server, someone (like me) should create a PR in mason to bump the version tag/commit hash?
Addendum: This is a bit more work (which is fine, I guess) then nvim plugins themselves, which normally just pull from the main/master branch, and then whatever nvim package manager you use (whether it be vim-plug or lazy.nvim or whatever) can automatically update it. You also have the option to target a fixed label/branch/commit point, however most people just have their nvim plugin managers follow latest on main/master. But this is a different methodology than what I think you're suggesting for lsp-servers with mason, which in addition to a new lsp server version being released, a maintainer needs to also submit a PR in mason to point to the newly released version of the lsp server. Like I said, this is fine, but it's just an extra step. I still think it would be nice to have mason follow new releases of lsp servers dynamically, but it's not a deal-breaker. Many thanks again for a fantastic open source project. :)
Version updates are entirely automated via Renovate, there's only a few select packages that need to be manually bumped.
I'm so sorry to keep bugging you on this, and I sincerely appreciate all the time and patience you've spent on this.
So, the (hopefully last) question I have is, does that mean the git commit hash that you have here: https://github.com/mason-org/mason-registry/pull/2512/files#diff-9cd5400c4c3b88d1b384488d9f3aa38763fa4ed56e5868cc2139f2b2e270706fR14 will automatically be updated to the latest commit by a mason CI process that gets run periodically? (I'm not familiar with Renovate...)
Yeah Renovate is responsible for scheduling and checking for new commits in the default branch of the repository. However in the case of drools-lsp I didn't realize it relies on release assets, so using commit SHAs won't work. For versioning to behave "correctly" we'll need drools-lsp to tag releases other than retagging "latest" all the time.
Okay, that makes sense, thank you!
I've searched open issues for similar requests
I've recently downloaded the latest plugin version of mason.nvim
Problem description
Hello, I don't know if this is a code bug, a misconfiguration, or perhaps should be a feature request.
If you look here on line 13: https://github.com/mason-org/mason-registry/blob/main/packages/drools-lsp/package.yaml#L13C11-L13C37 , you can see that it references the
@latest
tag. However, "latest" is a moving target. For example, "latest" was updated here just recently as the results of a CI build kicked off from a recent PR merge: https://github.com/kiegroup/drools-lsp/tags The problem is that when I ask Mason to check for (and install) updates, it doesn't recognize that "latest" was updated. I think it might be because Mason's just looking at the name of the tag, and thinks, "I've already downloaded the latest artifact - no need to do so again", but it's not taking into consideration that the timestamp on that tag has changed and it should re-download and replace it.Now, I can understand the argument that tags shouldn't change, however "latest" is special, and I can envision other, similar moving targets. Is there anyway to configure mason to notice the updated timestamp?
Aside, yes, I recognize that there are no numbered releases in drools_lsp yet. Just the "latest" tag at this point. Whereas the Drools LSP server does function at a basic level, it is still in its early stages. Perhaps the only answer is for us to just start doing numbered releases? (Like 0.1.0, 0.1.1, etc.?) I still think being able to set it up somehow to recognize tag timestamp changes would be a useful capability.
Thank you so much! :)
Expected behavior
I would expect Mason to notice that the tagged release has been updated, and re-download the asset and overwrite it locally.
Affected packages
drools-lsp (or maybe All?)
Mason output
Installation log
Neovim version (>= 0.7)
NVIM v0.9.1 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3
Operating system/version
Linux tpad 6.4.10-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 11 12:20:29 UTC 2023 x86_64 GNU/Linux
Healthcheck
Screenshots
No response