Jeroen Op 't Eynde
Jeroen Op 't Eynde
I rebased this PR here: https://github.com/google/jsonnet/pull/1039
It's nice to see this move along, the discussions on the PR is promising. I have a use case involving JSON schema, I'm building a validator in jsonnet and turns...
Just had a quick look in other projects as I was curious: Kubernetes uses `regexp` to validate the JSON schema `pattern` attribute ([link](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/validation.go#L267)). [ogen](https://github.com/ogen-go/ogen) has an interface with a fallback...
Just playing around with this before reading about the `std.parseJson` workaround and came up with this naive implementation: ```jsonnet { parseFloat(str):: local decimalPoint = std.find('.', std.reverse(std.stringChars(str))); assert std.length(decimalPoint)
Could this be a good fit for upstream go-jsonnet? Looks like a potential improvement for `jsonnet.NativeFunction`.
Perhaps it would be more beneficial to poke upstream to fix the issue?
That doesn't seem related @James-Riordan, please move this to the discussions tab.
Thanks for the report. For maintainers: this was discussed and verified on Slack, would be an interesting fix.
I'm not sure what you are optimizing, this simple model of generating a library per software version keeps maintenance low. Doing something smarter inevitably brings more code that we need...
> @Duologic If we're codegenerating the Same CRD's helpers over and over for different software versions - it makes sense to skip the generation of duplicates entirely. Keep only the...