rust-lang / rust-lang/rust-bindgen

Inconsistent Git tags

Open
#1,282 2 comments 0 reactions 0 assignees View on GitHub

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
  1. Write a shell script that makes a Git tag that is run every time a crates.io release is made.
    • I wrote tag_release.sh for capstone-sys that scrapes the version from Cargo.toml
  2. Pick a convention for git tag names (has a "v" or not)
  3. 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.
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.