Roger Peppe
Roger Peppe
I'm sure this isn't the fault of this PR, but there's definitely a bit more work to do here. Some comments can be lost. For example: ``` [{ // A...
Another place a comment is lost on export: ``` { name: "Foo" // A comment } ``` I also noticed that end-of-line comments are also lost on import, so the...
One other thing perhaps worth mentioning (might not be fixable): say we import some YAML like this: ``` # Header comment - name: foo value: x - name: bar value:...
After chatting this through with @mpvl, I think that this PR is probably fine as is. There are some hard problems to solve to get comments on output really right...
I think we can treat this as closed by https://cuelang.org/cl/1200578. Further work will be required to implement the OpenAPI variations correctly, but that can be tracked in individual issues.
One thing that just occurred to me: it might be hard to distinguish between `!` the boolean operator and `not` the validation operator when explaining CUE or reading CUE code...
Fixed by https://review.gerrithub.io/c/cue-lang/cue/+/1202854
I tend to agree that required fields should be considered "present" for the purposes of MinFields and MaxFields. It could be argued that making these operations work on incomplete structs...
Oh yes, I was thinking that one possible objection might be that it would not be good if `struct.Len(s)` did not correspond to `len([for x in s {x}])`, but that's...
See the comment here: https://github.com/cue-lang/cue/issues/3300#issuecomment-2260210547 Also, it's not currently trivial to add symlink checks in embed as it uses `fs.FS` which doesn't make it possible to check for symbolic links...