Skip to content

Pin useful_abstractions to v0.1.0; clone it without credentials in CI - #40

Merged
lemire merged 1 commit into
mainfrom
francisco/pin-useful-abstractions
Nov 14, 2026
Merged

lemire merged 1 commit into
mainfrom
francisco/pin-useful-abstractions

Conversation

@FranciscoThiesen

Copy link
Copy Markdown
Collaborator

Closes #28.

When #28 was filed, ConstexprCore/useful_abstractions was private, so the FetchContent clone failed for anyone outside the organization. It's public now and an anonymous clone works, but two things let the problem happen and would let it come back:

  • CI cloned with a token. Every workflow rewrote https://github.com/ to use USEFUL_ABSTRACTIONS_PAT, so CI could never see a clone failure that users would hit. Those steps are removed from ci.yml (matrix, Fil-C and single-header jobs), loongarch64.yml and release.yml.
  • The dependency tracked master. Every perfect_hash release, old ones included, fetched whatever that branch held at configure time. CMakeLists.txt now pins the v0.1.0 tag (shallow clone), and singleheader/amalgamate.py --fetch clones the same tag. A comment in CMakeLists.txt says to keep the two in sync.

v0.1.0's headers are identical to today's master (the commits after the tag only touch docs), so nothing changes for the library.

Checked with no git credentials (GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 GIT_TERMINAL_PROMPT=0):

  • a fresh configure fetches v0.1.0 (fae9101), and all 80 tests pass;
  • amalgamate.py --check says the single header is up to date: it is byte-for-byte the same;
  • amalgamate.py --fetch clones v0.1.0.

…#28)

The dependency was private when #28 was filed, so FetchContent failed for
everyone outside the organization. CI didn't notice because every workflow
rewrote github.com URLs to use an access token. The repository is public
now, so the token steps go: CI clones the way users do.

FetchContent also tracked `master`, so each perfect_hash release fetched
whatever the dependency's branch held at configure time. Pin to the
v0.1.0 release (its headers are identical to today's master, and the
amalgamated single header is byte-for-byte unchanged). amalgamate.py
--fetch clones the same tag.
@lemire
lemire merged commit 8e64af0 into main Nov 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useful_abstractions does not exist?

2 participants