Replies: 9 comments 5 replies
-
We have a cli utility, written in Go, that uses the Go standard library's We will always embed a CUE module into the binary, because it's a nice delivery mechanism for air-gapped environments. But for everyone else we want to have a native versioning concept (remember, we have multiple library authors down there), and the ability to fetch updates over the network. We talked about this on a call a while ago, but I thought I'd share it here. ❤️ |
Beta Was this translation helpful? Give feedback.
-
On today's community call (#2219), several features for the module system were outlined. Is there an updated proposal that can be commented on? It seems like there is already implementation before the proposal, which is the opposite order for other major initiatives and changes. |
Beta Was this translation helpful? Give feedback.
-
Using the OCI format for modules & packaging, publishing and consuming, is very interesting It would allow for using a standardized format and protocol tools are starting to adopt. It would mean that CUE does not have to create a format, protocol, or the code & infra for supporting a module ecosystem. Many existing tools in a broader ecosystem could be leveraged for day-2 issues as well. I could imagine 3 layers for
|
Beta Was this translation helpful? Give feedback.
-
I saw “Will use "hub" server rather than VCS directly (most common approach).” mentioned on the slides and I want to say, I really would prefer the VCS approach that Go uses because it makes everything simpler and easier and does not need additional infrastructure. |
Beta Was this translation helpful? Give feedback.
-
As for a use case example: We have some reusable CUE code called "kubekit" for our Kubernetes objects. Right now we use Git submodules for “importing” it. The biggest downside is that we have to specify a commit as opposed to a tag. Combined with Renovate auto-updating the downstream repositories, we have a lot of churn in those, because every commit in kubekit creates a commit in the downstream repositories. |
Beta Was this translation helpful? Give feedback.
-
We currently use a simplified version of the go module algorithm. This does look like: // cue.mod/module.cue
module: "github.com/loft-orbital/cue-module"
require: [
{
path: "github.com/loft-orbital/cue-lib"
version: "v0.10.0"
},
]
godef: [
// Kubernetes
"k8s.io/api/apps/v1@v0.23.4",
"k8s.io/api/autoscaling/v2beta2@v0.23.4",
"k8s.io/api/batch/v1@v0.23.4",
"k8s.io/api/core/v1@v0.23.4",
"k8s.io/api/networking/v1@v0.23.4",
"k8s.io/api/rbac/v1@v0.23.4",
"k8s.io/api/policy/v1@v0.23.4",
] Then we leverage cuebe mod commands to vendor and generate dependencies. It's still brittle, but gives us enough material to work. |
Beta Was this translation helpful? Give feedback.
-
How we implemented package management for CUE, it's not perfect, it's distributed (git-based), doesn't support locking yet (but you can pin commits), and doesn't do nested dependency resolution. I'm wondering about the tradeoffs of using git-based vs registry/hub based package distribution. we used git because it required no additional effort to publish packages, and we can reuse git versioning. |
Beta Was this translation helpful? Give feedback.
-
It would be nice if dependency modules with tools have a way to make them runnable from the importing project. This is similar to installing a node development tool from npm packages per project.
This could be constrained by having a top level bin directory, or in |
Beta Was this translation helpful? Give feedback.
-
This proposal was superseded by #2939. As we updated in #2939 (comment), that proposal (and its sub-proposals) have now been accepted, hence we are closing this discussion to represent the decision on the v3 proposal. |
Beta Was this translation helpful? Give feedback.
-
This is an umbrella discussion where people can post their thoughts on how they'd hope or expect to use CUE modules. In particular, concrete use cases would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions