-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rewrite the format function #86
Conversation
…etter handle errors happened on a project when formatting more than once at the same time Signed-off-by: jaudiger <[email protected]>
Some examples: cargo run -- fmt --check -p ../brioche-packages/packages/bat -p ../brioche-packages/packages/biome -p ../brioche-packages/packages/go -p ../brioche-packages/packages/biom
Compiling brioche v0.1.1 (/Users/jaudiger/Development/git-repositories/jaudiger/brioche/crates/brioche)
Finished `dev` profile [optimized + debuginfo] target(s) in 32.03s
Running `target/debug/brioche fmt --check -p ../brioche-packages/packages/bat -p ../brioche-packages/packages/biome -p ../brioche-packages/packages/go -p ../brioche-packages/packages/biom`
[938µs] 0 / 0 jobs complete
The following files of project '../brioche-packages/packages/bat' are not formatted:
- /Users/jaudiger/Development/git-repositories/jaudiger/brioche-packages/packages/bat/project.bri
[106.1ms] 0 / 0 jobs complete
The following files of project '../brioche-packages/packages/biome' are not formatted:
- /Users/jaudiger/Development/git-repositories/jaudiger/brioche-packages/packages/biome/project.bri
[211.2ms] 0 / 0 jobs complete
All files of project '../brioche-packages/packages/go' are formatted
Error occurred while formatting project '../brioche-packages/packages/biom': failed to canonicalize path ../brioche-packages/packages/biom cargo run -- fmt -p ../brioche-packages/packages/bat -p ../brioche-packages/packages/biome -p ../brioche-packages/packages/go -p ../brioche-packages/packages/biom
Finished `dev` profile [optimized + debuginfo] target(s) in 0.78s
Running `target/debug/brioche fmt -p ../brioche-packages/packages/bat -p ../brioche-packages/packages/biome -p ../brioche-packages/packages/go -p ../brioche-packages/packages/biom`
[947µs] 0 / 0 jobs complete
The following files of project '../brioche-packages/packages/bat' have been formatted:
- /Users/jaudiger/Development/git-repositories/jaudiger/brioche-packages/packages/bat/project.bri
[106.3ms] 0 / 0 jobs complete
The following files of project '../brioche-packages/packages/biome' have been formatted:
- /Users/jaudiger/Development/git-repositories/jaudiger/brioche-packages/packages/biome/project.bri
[211.5ms] 0 / 0 jobs complete
Error occurred while formatting project '../brioche-packages/packages/biom': failed to canonicalize path ../brioche-packages/packages/biom |
There is still one issue with that PR. Each last line from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Yeah, that sounds like another issue I've seen related to the formatter where the last line of the console output gets overridden... I think the issue is that superconsole doesn't mix well with |
Resolve #85
Add the formatted files and better handle errors happened on a project when formatting more than once at the same time as suggested by @kylewlacy #84 (review)