You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Format and Clippy action uses unstable rustfmt options, which require a Nightly toolchain to be used.
When run with a Stable toolchain, these options are simply ignored.
For now, this seems to not cause major problems:
If a user runs the Action exclusively with Stable toolchain, the formatting will just be slightly different from what we intended.
If a user runs the Action with both a Stable toolchain and a Nightly toolchain (like in classic-diagnostic-adapter), then the Nightly formatter applies its stricter formatting, which the Stable formatter seems to also be fine with. At least, this has been the observation in classic-diagnostic-adapter so far.
Running with both, Nightly and Stable, could result in thrashing however, where one formatter changes it in one way and the other wants to change it back, which would cause the CI/CD run to fail.
Solution options
From what I can tell, to keep using the unstable formatter options, we should block execution when a user tries to run the formatter with Rust-Stable.
For that, we can either:
Add a flag to the Action to skip the format run.
Pro: Keep unified Action, which might be extended in future.
Con: Users likely need at least Format+Nightly and Clippy+Stable, which requires two mutually exclusive configuration blocks.
Split the "Format and Clippy" action into two actions/workflows.
If we do this, we should also mind Improvement: convert linter composite into action #19.
Pro: Allows individual configuration in intuitive fashion.
Con: Breaking Change.
Important
Link the pull request that addresses this bug once created.
Description
The Format and Clippy action uses unstable
rustfmtoptions, which require a Nightly toolchain to be used.When run with a Stable toolchain, these options are simply ignored.
For now, this seems to not cause major problems:
Running with both, Nightly and Stable, could result in thrashing however, where one formatter changes it in one way and the other wants to change it back, which would cause the CI/CD run to fail.
Solution options
From what I can tell, to keep using the unstable formatter options, we should block execution when a user tries to run the formatter with Rust-Stable.
For that, we can either:
Add a flag to the Action to skip the format run.
Pro: Keep unified Action, which might be extended in future.
Con: Users likely need at least Format+Nightly and Clippy+Stable, which requires two mutually exclusive configuration blocks.
Split the "Format and Clippy" action into two actions/workflows.
If we do this, we should also mind Improvement: convert linter composite into action #19.
Pro: Allows individual configuration in intuitive fashion.
Con: Breaking Change.
Important
Link the pull request that addresses this bug once created.