Skip to content

feat: move every wheel package into packages/, starting with clangd-bin - #8

Merged
shenxianpeng merged 8 commits into
mainfrom
claude/project-thread-8krsne
Dec 4, 2026
Merged

shenxianpeng merged 8 commits into
mainfrom
claude/project-thread-8krsne

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Turns this repository into the one home of the cpp-linter wheels: every PyPI package is a directory under packages/, and one set of workflows builds, tests, releases and uploads all of them. This first step moves hatch-prebuilt and clangd-bin in; the other wheel repositories follow one pull request each.

Merge with "Create a merge commit" (not squash): the clangd-wheel history comes in with it.

Layout

packages/<PyPI name>/      one directory per package (hatch-prebuilt, clangd-bin)
scripts/                   plan.py, update.py, release.py, new_package.py (+ tests/)
templates/                 the template that new_package.py writes from
.github/workflows/
  ci.yml                   builds only the packages a change touches; "All wheels pass"
  publish.yml              the one PyPI upload, for every package
  automation.yml           releases new versions, one update PR per upstream project
  binary-wheels.yml        builds and tests one package on every platform

How it works

  • CI: scripts/plan.py maps the changed files to packages; a change to hatch-prebuilt, scripts/ or the shared workflows builds them all. Wheels are built with hatch-prebuilt from the same commit, so a plugin change is tested against every package before it merges.
  • Releases: tagged <package>-v<version> (clangd-bin-v23.1.7, hatch-prebuilt-v0.4.0). On each push to main, scripts/release.py releases every package whose version file has a version that is neither released nor on PyPI; the App publishes the release, which starts publish.yml.
  • Updates: once a day, scripts/update.py updates all packages of an upstream project (LLVM, ccache, ...) in one pull request, which merges itself when "All wheels pass".
  • hatch-prebuilt keeps its version from the tag; the old v0.1.0 to v0.3.0 tags still count, the next release is hatch-prebuilt-v0.4.0.

The repositories that have not moved yet keep calling binary-wheels.yml (unchanged defaults), wheel-automation.yml, monitor-upstream.yml and wheel-release.yml, now marked legacy.

Before merging

  1. Ruleset default-branch: require the check All wheels pass (replaces the old Test jobs, which are gone).
  2. On PyPI and TestPyPI, replace the trusted publisher of clangd-bin with repository wheels, workflow publish.yml, environment pypi / testpypi, once clangd-wheel has released 23.1.6.
  3. Environments pypi and testpypi: if their deployment rules only allow v* tags, allow *-v* too (clangd-bin-v*, hatch-prebuilt-v*).
  4. Delete the old Release Drafter draft v0.4.0: publishing it would create a v0.4.0 tag that publish.yml rejects.
  5. After merging, archive cpp-linter/clangd-wheel (its README will point here) so its daily bot stops.

Checked

  • tests/test_scripts.py (31 tests), pre-commit, actionlint and zizmor pass locally.
  • scripts/new_package.py clang-query writes a package that builds and passes its smoke test with hatch-prebuilt from this branch; a clangd-bin wheel builds from packages/clangd-bin the same way.
  • hatch-prebuilt builds as 0.4.0 from a hatch-prebuilt-v0.4.0 tag.
  • An independent review found no blocker; its fixes are in: publish.yml uploads only files of the released package and version (every project trusts the same workflow), hatch-prebuilt publishes only from a tag, and package names are checked against the tag format.

Generated by Claude Code

shenxianpeng and others added 6 commits November 30, 2026 21:36
* feat: publish clangd as Python wheels

Repackage clangd and clang's builtin headers from the
clang-tools-static-binaries releases, unchanged, as wheels for LLVM 18
and later on Linux (glibc and musl), macOS and Windows, x86_64 and arm64.
clangd goes into the environment's bin/ and the headers into
lib/clang/<major>/include next to it, where clangd looks for them.
sources.json pins the SHA-512 of every file. A daily workflow pins new
LLVM releases and opens a pull request.

* feat: publish clangd as clangd-bin wheels

Build the wheels with hatch-prebuilt from the clangd binaries and clang
resource headers in the clang-tools-static-binaries releases (LLVM 18 and
later), and test and release them with the shared cpp-linter/wheels
workflows. The smoke test checks that clangd parses a file with clang's
builtin headers and answers a language server initialize request.
Every package of the repository gets a directory under packages/. Its
release tags become hatch-prebuilt-v<version>; the old v0.1.0 to v0.3.0
tags still count.
The history of cpp-linter/clangd-wheel, moved into packages/clangd-bin.
…-bin

The workflows, Dependabot, pre-commit and .gitignore come from the root
of this repository now; the links point here.
…place

- ci.yml builds and tests the wheels of each package that a change touches
  (scripts/plan.py), with hatch-prebuilt from the same commit; a change to
  hatch-prebuilt, scripts/ or the shared workflows builds them all. One
  check, All wheels pass, sums it up.
- publish.yml uploads any package: a release tagged <package>-v<version>,
  or a run by hand with the package's name.
- automation.yml releases each package whose version file has a new
  version (scripts/release.py), and opens one update pull request per
  upstream project (scripts/update.py).
- binary-wheels.yml builds a package in a directory, with artifact names
  of its own and, optionally, hatch-prebuilt from this repository.
- scripts/new_package.py (was runbooks/new-wheel.py) writes a package
  under packages/; CONTRIBUTING.md takes over from runbooks/.

The wheel repositories that have not moved yet keep calling
binary-wheels.yml, wheel-automation.yml, monitor-upstream.yml and
wheel-release.yml as before.
@shenxianpeng shenxianpeng self-assigned this Dec 3, 2026
@shenxianpeng
shenxianpeng merged commit 93c3d3b into main Dec 4, 2026
47 of 50 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-8krsne branch December 4, 2026 11:38
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.

1 participant