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.
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.
This will be a rolling version. It means PR might pass a check when merging but main branch might fail later and need to be updated.
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.
Can you explain why will the main branch might fail later if the CI passes?
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.
if this runs on 1.68 and passes, later 1.69 comes out with new clippy rules. Then locally update to 1.69, pull main, run clippy and it will fail.
This can be annoying for contributors as they might have a PR open and rebased on the main branch but now this starts failing when the new tool chain comes out. Either they need to submit a sperate PR and fix then rebase or fix it in same PR to get it in.
If you do release branches this can be a similar issue, where before the fix goes into the branch the formats need to be applied for the new version.
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.
Ah I see. What do you recommend to mitigate this issue? I think what we can do is that whenever a new release of clippy comes out (together with a new cargo release), we manually submit a PR to fix the main branch.
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.
IMO we should be pinning the version of Rust that we build against. This creates a little bit more work from a maintenance perspective but it allows more control, sets up for repeatable builds and avoids the pitfalls I mentioned above.
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.
Done. I've pinned the rust version to 1.69.0