rust-lang / rust-lang/rust-bindgen
Inconsistent Git tags
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
I see some issues with the Git tags:
- Some tags include the "v" prefix and some do not
- Some crates.io releases do not have corresponding Git tags:
- 0.0.2
- 0.14.0
- 0.15.0
- 0.16.0
- 0.17.0
- 0.18.0
- 0.19.0
- 0.19.1
- 0.20.1
- 0.21.0
- 0.21.1
- 0.21.2
- 0.25.4
- 0.26.2
- 0.28.0
- 0.32.3
- 0.33.0
- 0.33.2
Expected Results
Each crates.io release has a unique corresponding Git tag
Recommendation
- Write a shell script that makes a Git tag that is run every time a crates.io release is made.
- I wrote
tag_release.shforcapstone-systhat scrapes the version fromCargo.toml
- I wrote
- Pick a convention for git tag names (has a "v" or not)
- Create replacement git tags for existing git tags that do not meet the new naming convention.
- Optionally, delete the old git tags that do not meet the convention.
- For crates.io releases that do not have git tags, create the tags (they are listed above)
- Or at least the recent ones ;-)
I used the following script to list the crates.io releases without Git tags:
#!/bin/bash
set -euxo pipefail
# Creates temp files
BINDGEN_CRATES_RELEASES="/tmp/bindgen_crate_releases.json"
CLEAN_GIT_TAGS="/tmp/clean_git_tag_versions.txt"
# tag names without leading 'v'; sort numerically
git tag | tr -d 'v' | sort -n -t'.' -k1,1g -k2,2g -k3,3g > "$CLEAN_GIT_TAGS"
# Get release information from crates.io-index
wget "https://raw.githubusercontent.com/rust-lang/crates.io-index/master/bi/nd/bindgen" -O "$BINDGEN_CRATES_RELEASES"
echo "Crates.io releases w/o a Git tag:"
# Select version field with jq uitility; get rid of quotes with xarsg
cat "$BINDGEN_CRATES_RELEASES" | jq '.vers' | xargs -n1 | grep -v -f <(cat "$CLEAN_GIT_TAGS")
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by auditing the repository's existing Git tags against the crates.io versions listed in the issue, then review the referenced tag_release.sh script for an automation model. Define one tag naming convention, identify the missing and duplicate releases, and document verification that every crates.io release has one corresponding tag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust, shell
- Domain
- devops, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100