Closed lazerwalker closed 1 year ago
Two thoughts:
I agree that automatic commits are generally Not Great.
A problem we ran into frequently with Little Mario was a lot of people would commit changes that converted whitespace from tabs to spaces (or the other way around, can't remember) since that was a per-editor setting you couldn't enforce at the project level. A general concern was asking folks with less git and/or programming experience to make and push stylistic changes; a specific concern was that the only autoformatter we could find required you to have a functioning local python3 setup and be comfortable operating it from the CLI. For that set of constraints, I still think an autocommit bot was the right choice. Notably, we have also not yet (to my knowledge) encountered a situation where the autoformatter has caused a bug.
What might have changed now?
I agree we should be more stringent about code review standards for metastructure changes than individual microgames. But I still like the idea of keeping the barrier to contribution for "core" changes as low as possible -- if the autoformatter allows a class of PR complaints to be irrelevant, I'm not sure if it's better for the project to have "core" contributions have a hard gdlint
check (and a requirement to just set up and run gdformat
locally) rather than stopping it from being able to share a technical workflow with game contributions and having the more stringent standards be purely social/code review?
Maybe it's also the case that we don't care about tabs vs spaces for individual games, but having that be inconsistent feels wrong to me.
I truly don't know the right choice here. My gut is still that enforcing formatting with auto-commits across all commits is an okay strategy for our specific project. I think it's less the case here than it was with Little Mario, but it still feels like a low-effort low-friction option compared to coming up with a more complicated strategy.
I guess to also try to shift this from philosophical debate to something more actionable (although I think the discussion is important!): this is a relatively small amount of code, that we know from Little Mario works reasonably well. My instinct is to merge this in as-is, and I'm not at all opposed to replacing it sooner rather than later if you want to put together an alternative flow.
Merging this in for now! To summarize my current viewpoint about code formatting:
This copies (and ever-so-slightly updates) our build-and-publish workflow from A Little Game Called Mario:
gdformat
tool, making a bot git commits if necessaryOn merging this, steps 1-3 should work (although we are not yet consuming the credits.txt file). Step 4 requires us to generate a butler API key (instructions here: https://itch.io/docs/butler/login.html#running-butler-from-ci-builds-travis-ci-gitlab-ci-etc). This is gated on @iznaut either generating a key or giving me access to the
new-cylandia
itch account.The two pieces that exist in little-mario that haven't been ported:
I think this should be good to merge, unless anyone has any thoughts.
My one open question: this hardcodes us as using Godot 3.5.2. I think this is correct, but isn't documented anywhere. I'd love someone else who's been working on this to confirm that, and if so we should probably add it to the README and add the same sort of popup (#29)