-
Notifications
You must be signed in to change notification settings - Fork 11
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
Tracking issue regarding changes required to support new modules #257
Comments
So if we're wanting to have a way to declare the version of NuShell used for the module, this might require having the binaries mounted for version and module call. We could then have the If the property for the nushell version doesn't exist, we could assume either:
If we're going to go the route of allowing NuShell version specification, I don't think we would be able to ship images with a NuShell binary as they could be very different versions used. Which would mean that for runtime modules (modules that run when the user is booted), we should rely soley on using Bash since we can pretty much guarantee that shell will be available. On another note, I think for ease of use we should have a label on the image containing the contents of |
Could we set the version to be same for the whole repo? Keeping it updated while slightly controlling it such that the builds don't break would be ideal. Not having to re-release the CLI on every version change would be nice too. Maybe a recipe parameter to set the Nushell version tag in the same vein as we can set the CLI version from the recipe. The default could be a special tag in our Nushell repo that points to the currently supported version. |
I don't think that would work well with keeping versioned modules. If we ended up making a v2 of a module and started using a new version of
I'd like to keep most maintenance burdens away from the user. They shouldn't have to manage which version of nushell they need to use for the different versions of modules. Remember the goal is to try to make image generation easy for users. |
That was not my point; it was more that if one of our users would like to use a later version of Nushell for their own purposes they could do that, and that we could more effectively test using different Nushell versions with existing modules to see what, if anything, breaks.
There is nothing stopping us from changing the code of the v1 module to accommodate for the breaking changes. Nushell release blog posts neatly highlight all the breaking changes in a specific release, and being able to test modules on any arbitrary Nushell version would also help with that. |
Yeah that's fair. In this case should we just install nushell from the Fedora repos and use that version? That way we reduce the burden of keeping track of the version ourselves and just keep pace with upstream. Right now it looks like in both Fedora 40 and 41 the latest version is |
In my mind the idea of using the nushell-container (which I already built and is unlikely to break any time soon) is, besides supporting non-Fedora base images and older versions of Fedora, is that we can perfecly control the Nushell version and only switch our users over once we're sure the modules are not broken on the new version. |
Ok after doing some digging, using the Fedora repos might not be the smartest idea since we are also supporting stages for other distros. The best thing to do at that point would be to just use the statically compiled version of the code. So we're back to specifying the version somehow. So how about we do:
export PATH="/tmp/nushell/:$PATH"
The biggest caveat being that our modules define the version that is installed into the final image. Though this does bring up the worry that a user might want to try to install the version that is supplied by Fedora packaging which would end up conflicting with what we supply. Maybe we could go the |
This all sounds pretty good.
Where is that set? I assumed it'd be the recipe, but I'm confused by the clarifying sublist. My idea was that the
I guess this proposal is an alternative to the others? This is kind of the intuitive initial plan I had, but just including a single Nushell version per image, inside the image, sounds like the preferable option right now.
Installing Nushell to libexec by default sounds fine, if installing Nushell from repos potentially causes an error when it is already installed. Having two copies of Nushell in an image would be a bummer, though. Maybe it would be possible that if an user specifies For the default version of Nushell, I think it should be based on a tag set for a specific version of |
That would be on the module definition itself. That way each module could run a specific version. The
I think I'm starting to prefer it being specified as a LABEL. I don't think the module should have nushell itself inside it. We'll let the CLI template the
So the libexec way would just require that our scripts are sure to set the shebang to point to the correct version. #!/usr/libexec/bluebuild/nushell-0.99.1/nu Cause otherwise if you specify: #!/usr/bin/env nu That will rely on what is set in |
I believe there's been some mutual misunderstanding here.
I don't think this is how it should be done. Say I'm reworking all modules that use Nushell to support a later Nushell version, it would be more straightforward to just set the Nushell version for the entire build. Or, I'm a user and want a specific Nushell version in my image, this approach makes it seem like that isn't even supported?
If it's per-module I would agree, but I don't think it should be per-module.
I don't think so either, I mean that the image that the user is building is the one that should have a single version of Nushell in it, which is put there by us, and shipped with the image and not just there at build-time. So I guess we have some conflicting ideas. Your idea (I presume):
My idea:
Maybe lets come to a better consensus before starting contributions? |
Ok we can work with that.
Ok yeah this could totally work
Sure. I think this will be a good way forward.
I'm a software engineer at heart. It's how I think. You can't stop me :P |
Since this is ours, could we just go with |
It's good to have a software engineer around :P 💙 For me, thinking about software architecture is sometimes even more fun than coding haha
I guess yeah, sure |
What do you think, should we: |
I'd be fine with both B and C with C being the preferred method. |
Ok, nushell support has been released. We should be good to start converting the modules over. |
We have discussed the usage of Nushell for developing modules here: blue-build/modules#212
We're working on a v2 of the default-flatpaks module here: blue-build/modules#336
Here's a quick list of things that need to be implemented in CLI to finish off the support for the new types of modules and default-flatpaks v2:
type: default-flatpaks@v1
,type: default-flatpaks@v2
,type: default-flatpaks@latest
etc.@latest
by default.sh
suffix.sh
suffix..sh
to be there by default, unless themodule.yml
declares that the module is in Nushell.sh
to not be there, rename the script files of all modules (would break builds with earlier versions, but could be mitigated with symlinks) (local modules might need a different procedure).sh
file that is a shim for the.nu
script) (no CLI changes required).sh
,.nu
, or.bash
suffixes.COPY --from=ghcr.io/blue-build/nushell-image:0.98.0 /nu/nu /usr/bin/nu
cp
the binary to the appropriate location.cp
the binary to the appropriate location.yq
(and possibly others) and goes alongsidebluebuild
as one of the binaries that gets included in every image. The version is the same across all builds and modules (need to make sure all modules support the newer version before upgrading, but wasting resources on shipping multiple versions becomes impossible).The text was updated successfully, but these errors were encountered: