Closed selfuryon closed 6 months ago
Thanks for filing this! Definitely a bug; formatting shouldn't care about package names or imports.
For now, I think your best workaround is to format one file at a time. I realise that's slow, but I'm not sure there's a better general workaround right now.
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes
What did you do?
I tried to create two cue files in two different packages and format them via :
cue fmt .
and `cue fmtWhat did you expect to see?
All files are formatted without any errors.
What did you see instead?
When I use
cue fmt <file1> <file2>
I got this error:Why this is important
I added a cue formatting support to
treefmt-nix
which uses justtreefmt
to format different files in repository. It works via passing a file list as an argument to formatter (cue fmt). This is the place where I faced with that issue, because in my project I have differernt packages in CUE.