-
Notifications
You must be signed in to change notification settings - Fork 21
Move formatting to a separate workflow #189
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
base: beta
Are you sure you want to change the base?
Conversation
curious for the context - why was this change needed? |
@convextriangle build process doesn't depend on actual formatting, so makes sense to split it out and run in parallel I saw build failing in #188 and wanted to see why it failed, turns out it wasn't even build-related ¯\_(ツ)_/¯ so that's where I got an idea for this change |
i kind of see the point but do we really need to do this? why waste time waiting for build completion when someone can't even format their code
likely a better solution would be auto-formatting support for common editors and such, not sure |
why not? |
my thought was to have some sanity checks which would rule out common setup mistakes (such as someone formatting only in one big commit and breaking reviews in the progress), and would probably save some CI time (fail fast instead of waiting for build) -- an indication to the dev that their env is sorta broken would be nice |
Would it make sense to refactor this as a separate job in the same workflow? |
Having a separate build item might make the problem clearer, but it only takes a few seconds to diagnose as is. That said, I've had formatting errors break builds twice while using the "correct" environment: In both cases the CI broke but there were no warnings on my local build. Long story short, I think breaking nonconformant compilation on CI is fine. It'd save me effort reviewing PRs. But it should do the same locally so I'm not playing whack-a-mole. Does that sound like a better solution? |
I see formatting and build process as two separate problems, broken code can pass formatting check and vice versa, so makes sense to decouple them in CI too, as I mentioned above.
Yeah, checking for formatting while compiling would be ideal, but CMake developers sorta disagree with us. Pre-commit/pre-push hooks get us close, but those require manual setup, which is better than nothing |
Sure, for some reason I thought build matrices apply to an entire workflow and not to a job |
Sure, go for it.
We don't need to automatically format the build files; just error out if clang-format fails when building locally. That has to be doable. |
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.
@DolphinChips can you update this per bren's suggestion to refactor this into the windows.yml file?
I've handled the formatting improvements in #200.
Regarding #189 (comment), you can simply move |
No description provided.