-
Originally opened by @codewithcheese in cuelang/cue#912 Hi CUEbies Do you know of any implementations for semantic version and comparison in-built or CUE? I see there is an issue from a year ago here: cuelang/cue#407 I am about to implement a CUE based solution for semantic version strings and comparison but double checking before coding. I'm planning a CUE based solution, use regexp to parse a version string into its components something like We use semantic version strings in our config files to represent versions and also have a need for version comparison to check that component updates are mutually compatible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Original reply by @myitcv in cuelang/cue#912 (comment) Apologies for the delay in replying, @codewithcheese. A regexp approach will work (per cuelang/cue#407 (comment)). And per @mpvl the plan at the moment is not necessarily to provide a builtin equivalent of https://pkg.go.dev/golang.org/x/mod/semver, rather to consider what building blocks would be better primitive (@mpvl gives the example of https://pkg.go.dev/golang.org/x/text/collate |
Beta Was this translation helpful? Give feedback.
Original reply by @myitcv in cuelang/cue#912 (comment)
Apologies for the delay in replying, @codewithcheese. A regexp approach will work (per cuelang/cue#407 (comment)). And per @mpvl the plan at the moment is not necessarily to provide a builtin equivalent of https://pkg.go.dev/golang.org/x/mod/semver, rather to consider what building blocks would be better primitive (@mpvl gives the example of https://pkg.go.dev/golang.org/x/text/collate