-
Notifications
You must be signed in to change notification settings - Fork 12
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
add support for package versions #43
Conversation
@kubouch that might require reading Git tags 👍 |
To me, replacing |
so we need to install |
Ah, hmm, that won't work, we shouldn't install package.nuon. Then the package would need to keep track of it on its own. I really wouldn't do the |
you mean that wouldn't allow to have more fine-grained version, such as |
Is hardcoding it too bad? With compiled languages like Rust, you could save it as a const into the binary (we do this in Nushell), but that's not applicable for dynamic Nushell code. I'd be curious how other languages do it. Do some languages do this string replacement thing? If we don't like hard-coding, I'm thinking that it could be solved with profiles (previously I called them overlays in nuun). The profile could set up a metadata env var where you could fetch the versions of packages installed in the profile. But that seems even more complicated than the string replacement, although you wouldn't need to modify the module's code like you do in string replacement. Both string replacement and the profile env have the same disadvantage of being reliant on Also, the problem can be abstracted a bit: How to fetch package metadata from inside the package script/module? It might be useful for other things than versions. |
this was an interesting attempt but, as you said @kubouch, the i'll close this for now and we'll try to focus on overlays and profiles in the future 😌 |
Description
this PR
{{ VERSION }}
in the module files with$"($package.name)@($package.version)"
nupm version
command to showcase how that workswhen i install Nupm now, i have the following