Daniel Martí
Daniel Martí
That's fine. If you want to go that route, I'd consider regular expressions, which already support named groups to match with, and replace: https://pkg.go.dev/regexp/syntax
Slightly smaller repro, which also doesn't involve the bottom literal `_|_`: ``` exec cue export in.cue -- in.cue -- x = (x): 3 ```
Still seems to happen as of v0.13.0-alpha.4.
The short answer is that it's untested, so probably not. See also https://github.com/burrowers/garble/issues/297.
Perhaps this should be provided as part of the LSP, muc like Go does, since formatting has little to do with removing unused imports or adding missing imports. cc @myitcv
I would suggest that we focus on supporting this within the LSP first, i.e. https://github.com/cue-lang/cue/issues/3573, and once that's done we can see if users still want a feature like this...
Not sure how I hadn't noticed this issue. Yup, the "keep padding" option is flawed and buggy, and is being removed in a future v4, so I won't be fixing...
As of 655236e96e9f447948b8669263da98c5700c147d it seems like we're under a second with the new evaluator, so I think we can mark this as resolved: ``` $ time CUE_EXPERIMENT=evalv3=0 cue eval test.cue...
Below is a reproducer which still shows a sigificant slow-down with a version of CUE very close to Roger's origial report, and then how the old evaluator at master is...
With @jpluscplusm's response above, and given it has been a few months now, I'll close this as resolved. Thanks!