Replies: 6 comments 4 replies
-
Original reply by @mvdan in cuelang/cue#449 (comment) I like the idea. Here are two bonus points that I thought of while reading yours:
The biggest downside would perhaps be the added overhead in accomplishing this split, and maintaining these two separate projects in the long run. Perhaps |
Beta Was this translation helpful? Give feedback.
-
Original reply by @verdverm in cuelang/cue#449 (comment) Some thoughts:
Why do we need to remove Is it more about Cue's suggested default automation / scripting solution, and having that removed from the tool, so as not to confuse people? I guess I don't see a pressing enough reason to warrant the removal given that many of us are all already building various I think many of us are actively thinking about and working on solutions in this space. Personally, I have not felt that Cue has impeded my efforts while building hof. Certainly I look forward to a more mature and powerful Go API to help power the next generation of backend automation / developer tools. I guess I don't see the scripting layer as a priority either. Competing against bash / python with devops engineers is not easy, is that where you see Getting back to
Generally, I see the ecosystem experimenting with many ideas. I think we may slide the Pulumi / Terraform way for a bit before coming back to Cue and similarly philosophied ideas. As such, I'm not ready to be overly prescriptive about recommending best practices. I'd like to see more of what ideas and hear more about what users / devs think when presented many options. For Cue tool builders, they will likely all have their own DSLs and we all get a shared language for that, and I would say the "standard pattern" is to read Cue files in like the A closing thought... Go has been consolidating the third party tools into go proper as it has matured. I like this pattern and have adopted it in my own creative works. I'd prefer a single tool to having to install and manage instead of N tools and M versions. I at least get to remove >= 1 of those under this philosophy.
Follow me on social, happy to help with that! :] |
Beta Was this translation helpful? Give feedback.
-
Original reply by @mpvl in cuelang/cue#449 (comment) CUE was set up as a monorepo in true Google tradition. This ensures that changes in any subsystem that cause errors elsewhere are exposed quickly. This may seem to slow down development, but the errors will just have to be dealt with down the road, often making it much more complex, not having the benefit of immediate breakage. For instance, writing the new evaluator is indeed slowed down by the presence of the other components, but only because these components expose bugs. I think other things can have velocity. One thing is splitting the core into more packages to better delineate responsibilities. The new evaluator splits the API/evaluator from one monolith package into about 10 so far. The compiler and evaluator are the most complex . These are now 1000 and 1800 lines respectively. They both used to be intertwined in a 28k-line package. This makes the dependencies of what may affect the core evaluator and what not a lot easier to see. Another is to allow builtin development and testing within their own directories, without the need to generate them into core. This is not yet done, but paving the way for it. The That said, as the core stabilizes, this benefit will diminish. Not for now, though, I suspect. Having different versioning could already be very useful. For instance, it would be nice to version the language separately from the tool, but this can be done within the same repo using separate go.mod files for components. That also brings some pain, though. |
Beta Was this translation helpful? Give feedback.
-
Original reply by @myitcv in cuelang/cue#449 (comment) I'm not clear this is the right thing to do, not least because I'm not totally clear of the problems it seeks to address.
By way of analogy: "Go" is the name of the project, language and But, post v1, I completely agree on the general point of not having any special Until and as part of establishing v1, I think it absolutely makes sense to raise discussions/issues like cuelang/cue#448 that describe specific things that tool authors want/need that may or may not be possible in
I don't understand this point. Can you expand on how this obviates the need for
Can you explain a bit more on this? I don't understand how
Definitely sounds like it would be worth opening up an issue/discussion if there are specific issues/suggestions here. My usage of
What in particular do you think makes Also, what problems specifically would be solved by having And by "separate project" I assume you mean separate repo? What problems are solved by this? |
Beta Was this translation helpful? Give feedback.
-
Original reply by @ibuildthecloud in cuelang/cue#449 (comment) The points @shykes makes resonate with me as someone who is trying leverage cue in some new projects. I have three questions that bother me.
All three of these questions I can't easily answer. Breaking the project up into language, go library, and tools might help to clarify these questions. The use case I'm interested in is using cue as basically (using a dated reference) a better xml, xsd, and xslt. I realize this scope probably diminishes the power and vision of cue, but those are the problems I need solved at the moment. In this scenario most of the I realize what I may have just described could not align with the larger goals of cue, and I'm approaching this wrong, which brings me back to my 2nd question. |
Beta Was this translation helpful? Give feedback.
-
Original reply by @mpvl in cuelang/cue#449 (comment) Note that I'm now slowly moving functionality from |
Beta Was this translation helpful? Give feedback.
-
Originally opened by @shykes in cuelang/cue#449
This is a thought experiment, I'm curious what others think.
TLDR: I'm starting to think
cue cmd
should be moved out of corecue,
into a separate project - I will tentatively call itcuedo
. This separation would be beneficial to bothcue
the language, andcuedo
the tool.The benefits would be:
It's easier to answer the question "what is cue?". At the moment, the answer is "it's a language (Cue), an interpreter (
cue
andcuelang.org/go/cue
) and a special automation tool that can be configured with cue files, and is bundled with the interpreter (but only the command-line interpreter, not the go library). That answer is too complicated, and confuses people. It would be much easier to just say "Cue is a language; it has an official interpreter available as command-line (cue
) and a go library (cuelang.org/go/cue
). It allows creating all sorts of amazing tools. A good example iscuedo
. Check it out!It simplifies the cue file hierarchy. No more
_tool.go
files!cuedo
, like any tool configured by cue, can be provided with a cue configuration. This could be a file, a directory or a package. It loads its configuration usingcuelang.org/go/cue
, then merges it against its own schema. Again, just like any other tool would. There's no need for a special class of files.It shows the ecosystem how to build good Cue tools. Instead of a baked-in special case which no third-party can reproduce,
cuedo
is just a regular tool. Whatever patterns it adopts, can (and should) be emulated by the broader ecosystem of Cue toolmakers.It gives
cuedo
a chance to succeed as a standalone tool. Just likecue
is easier to explain separate from the tooling layer,cuedo
will be easier to explain (and to adopt) separate from the language interpreter. There is a lot of demand for automation / scripting tools, andcuedo
is a great addition to the toolbox, in great part thanks to its use of the Cue language. But as long as it remains bundled withincue
, it cannot truly compete as an automation tool, because it does not clearly fit in the "automation tool" category.It makes
cuedo
configurations easier to share and reuse. Right now, there are restrictions to sharing my commands and tasks: the parts in_tool.cue
files cannot be imported, for example. One can move as much as possible into a regular cue file, and import it from the _tool.cue file, but 1) it's optional so not everyone will do it, and 2) last time I tried this, I hitcue
bugs which caused evaluation to fail.It shrinks the
cue
codebase, which makes it easier to maintain and contribute to. This is especially important at a time where the core team is still very small, and spread thin. By moving the tooling out, we can reduce the scope of the core project, and improve it faster.Again, this is intended as the start of a conversation. I am eager to think what everyone else thinks!
Beta Was this translation helpful? Give feedback.
All reactions