How to extend Package in v2?
#2019
Unanswered
Frederick888
asked this question in
Q&A
Replies: 1 comment
-
|
@williamboman If you can shed some light on me 🙏 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
(Cross posted from mason-org/registry-examples#1. This is probably a better place for this discussion. Sorry for the noise.)
I'd like to always use the latest Git version of
java-testandjava-debug-adapter. So when I was on Mason v1, Iuser.mason-repositoryin my configLocalPackagethat extendedPackagea.
LocalPackage:get_installed_versionreturned the SHA of GitHEADb.
LocalPackage:check_new_versionfetched Git remote and returned the SHA of Gitorigin/HEADlua/user/mason-registrya. They used
LocalPackage.new()b. Their
installrangit reset --hard origin/HEAD, built the package, and finally symlinked the filesNow I'm working on v2 migration in
lazyvim15branch, and I'm getting the error below:I'm mainly stuck on how I can pass the registry itself to the new
Package:new(spec, reg)at the moment. Hopefully that's my last problem. Or maybe the whole thing is an overkill and there's a much simpler way to do Git + build + symlink?I'd appreciate a little guidance. Thank you!
Update: Also tried getting rid of
Package:new()let Mason hydrate the packages itself https://git.tsundere.moe/Frederick888/frederick-settings/-/commit/9b14146d0dbf6e87c60186295e8c03e0508d8d6bInstallation worked. However since all my
LocalPackagemethods, includingget_latest_version()andget_installed_version(), are now only in the package specs rather than packages themselves, Mason cannot show / detect their versions correctly as it just uses the default ones fromAbstractPackage.Beta Was this translation helpful? Give feedback.
All reactions