Streamline the autoformat workflow to enable version pinning for all platforms #571
+108
−63
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.
TODO:
Document the process for installing and running formatters(Tracked separately)The autoformat workflow currently doesn't pin the version of
clang-format
which is supposed to be used. That's problematic because both MSYS2 and Homebrew install the "latest" version, but their definition of "latest" can differ quite a bit.With this patch, the version is pinned for all three platforms and can manually be updated to track MSYS. It's still possibe for the versions to diverge, when MSYS deploys a new major release and the workflow hasn't been updated. In that case, there might be breaking changes which should lead the workflow to fail (can update version to re-sync). Otherwise it "just works".
As a side effect, the autoformat script will now fail unless the clang-format version is set via(Stored inEVO_AUTOFORMAT_VERSION
. This is slightly annoying because it makes running the script more cumbersome, but it can be exported automatically. If that's too inconvenient I'll have to think of a better solution later.autoformat.env
now)I don't particularly like the increase in complexity, but formatters randomly messing up the code isn't helpful either.