Skip to content

chore: drop the last of the Python - #53

Merged
LeadcodeDev merged 1 commit into
mainfrom
chore/drop-the-python-icon-generator
Aug 29, 2026
Merged

chore: drop the last of the Python#53
LeadcodeDev merged 1 commit into
mainfrom
chore/drop-the-python-icon-generator

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Collaborator

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.py was the obvious one. The second was in .github/workflows/release.yaml, which shelled out to python3 -c to pull the version out of cargo metadata's JSON. Searching for *.py would not have found it.

cargo pkgid reports the same version and bash can take the part after the last @, so the step now needs neither Python nor jq:

pkgid="$(cargo pkgid -p gitr_gui)"   # path+file:///…#gitr_gui@0.1.0
version="${pkgid##*@}"               # 0.1.0

A guard fails the job if pkgid ever 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.rs still embeds assets/icon.png with include_bytes!. The part of CLAUDE.md recording 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_gui succeeds, 414 tests pass, and the new workflow step was run locally end to end and printed gitr_gui is 0.1.0.

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.
@LeadcodeDev LeadcodeDev self-assigned this Aug 29, 2026
@LeadcodeDev LeadcodeDev added the enhancement New feature or request label Aug 29, 2026
@LeadcodeDev
LeadcodeDev merged commit f4364da into main Aug 29, 2026
3 checks passed
@LeadcodeDev
LeadcodeDev deleted the chore/drop-the-python-icon-generator branch August 29, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant