chore: drop the last of the Python - #53
Merged
Merged
Conversation
The repository read as 99.1% Rust and 0.9% Python because of one script that generated the dock icon, and it had no business being committed: it was a one-off tool, not part of the product, and nothing in the build ever invoked it. Deleting the file is enough for the language breakdown — GitHub computes that from the current tree, not from history — so nothing is rewritten and nothing is force-pushed. The script remains reachable in history for anyone who needs it. The icon itself is untouched. `main.rs` embeds `assets/icon.png` with `include_bytes!`, and the section of CLAUDE.md that records why the artwork looks the way it does — the 11x11 grid, 824 of 1024 pixels, the superellipse of exponent 5 — is still accurate about the PNG that ships. Only the sentences pointing at the generator are gone, since a pointer at a file that no longer exists is worse than no pointer. The release workflow was the second, less visible trace: it shelled out to `python3` to pull the version out of `cargo metadata`'s JSON. `cargo pkgid` reports the same version and bash can take the part after the last `@`, so the step now needs neither Python nor jq. A guard fails the job if `pkgid` ever stops carrying a version, because a silently empty version would publish a binary labelled as a release it is not — which is precisely what the tag check below it exists to prevent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The repository read as 99.1% Rust and 0.9% Python because of one script that generated the dock icon. It had no business being committed — a one-off tool, not part of the product, and nothing in the build ever invoked it.
Two traces, not one
crates/gitr/assets/make_icon.pywas the obvious one. The second was in.github/workflows/release.yaml, which shelled out topython3 -cto pull the version out ofcargo metadata's JSON. Searching for*.pywould not have found it.cargo pkgidreports the same version and bash can take the part after the last@, so the step now needs neither Python norjq:A guard fails the job if
pkgidever stops carrying a version. A silently empty version would publish a binary labelled as a release it is not, which is exactly what the tag check below it exists to prevent.No history rewrite
GitHub computes the language breakdown from the current tree of the default branch, not from history, so deleting the file is enough. Nothing is rewritten, nothing is force-pushed, and the script stays reachable in history for anyone who ever needs it.
The icon is untouched
main.rsstill embedsassets/icon.pngwithinclude_bytes!. The part ofCLAUDE.mdrecording why the artwork looks the way it does — the 11×11 grid, 824 of 1024 pixels, the superellipse of exponent 5 — is still accurate about the PNG that ships and stays. Only the sentences pointing at the generator are gone: a pointer at a file that no longer exists is worse than no pointer.The icon can no longer be regenerated from the tree. That is the deliberate trade — the tool was not worth its language column.
Verification
grep -rniE "python|make_icon|rsvg"over the tree returns nothing.cargo build -p gitr_guisucceeds, 414 tests pass, and the new workflow step was run locally end to end and printedgitr_gui is 0.1.0.