feat: rewrite the format function#86
Merged
Merged
Conversation
…etter handle errors happened on a project when formatting more than once at the same time Signed-off-by: jaudiger <jeremy.audiger@ioterop.com>
Contributor
Author
|
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/biomcargo 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 |
Contributor
Author
|
There is still one issue with that PR. Each last line from |
Member
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)