-
Notifications
You must be signed in to change notification settings - Fork 135
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: add rustfmt imports_granularity #1077
Conversation
the lint ci failed, not very familiar with circleci, please help😁 |
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.
The new rustlang/rust:nightly-slim
image seems to break the CircleCI lint job because the sudo command is not included.
I'm not sure what the slim version contains compared to the regular nightly but I guess we can get away with the regular image.
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.
We need also to update the fmt command in book/src/developers/contributing/git/pull_requests.md.
The lint is still failing, it looks like we don't need the Creating an |
Nice, lint works now, I also added a rust-toolchain file so developers don't need to manually switch toolchain |
Great but we don't want to pin Trin to the latest nightly version (at least we need to have a discussion about that with the rest of the team). The current workflow is to use |
By the way, while we are still here, could you also add those configs to the
|
- setup-and-restore-sccache-cache | ||
- run: | ||
name: Run Clippy | ||
command: cargo clippy --all --all-targets --all-features --no-deps -- --deny warnings |
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.
Looking at this now, I assume here clippy
is running with the nightly version, but because we don't pin Trin to nightly there may be some discrepancies between nightly clippy and stable clippy in the future.
It would be better if we split the lint
job to cargo-fmt
and cargo-clippy
and run clippy with the default stable toolchain.
If you don't feel like doing it in this PR, we can leave it for a future fix (this will not be a blocker for merging this PR).
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.
I could try it in this PR, seems like a simple change
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.
all done!
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.
Looks good to me 💯 !. Thank you for this contribution, really happy to see some structure to our imports. ❤️
What was wrong?
resolve #1046
How was it fixed?