Skip to content

feat: build include-what-you-use from source here, in packages/include-what-you-use - #12

Merged
shenxianpeng merged 5 commits into
mainfrom
claude/move-iwyu-1796404934
Dec 4, 2026
Merged

shenxianpeng merged 5 commits into
mainfrom
claude/move-iwyu-1796404934

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Moves include-what-you-use into packages/include-what-you-use. It comes from the open include-what-you-use-wheel#1, with its history, and it is the last wheel to move here. IWYU publishes source code only, so this adds one shared feature: a package can build its binaries in CI.

  • [tool.wheels.binaries] sets three things:
    • command builds the binaries for $PLATFORM into binaries/binary-<platform>/;
    • platforms lists the runners it runs on;
    • cache-files lists the files the binaries are built from.
  • binary-wheels.yml gains a binaries job that runs the command on each runner before the wheels are built. The binaries are cached by the hash of cache-files, so a change to anything else does not rebuild them. The build job downloads them into binaries/. "All wheels pass" lets binaries be skipped for every other package. The unused binaries-artifacts input goes.
  • include-what-you-use: [tool.wheels] carries what its test.yml and automation.yml did:
    • binaries on six runners;
    • iwyu_version.txt;
    • the latest upstream tag;
    • hatch_build.py update;
    • the binaries attached to the GitHub release.
  • Smoke test: on Windows it now looks for iwyu_tool.py.exe by its full name. shutil.which() does not add .exe to a name that already has an extension. That made both Windows tests fail on include-what-you-use-wheel#1, while all 6 builds passed there.

The first CI run builds IWYU from source on every platform, which takes about an hour each (1.5 hours on macOS x86_64). After that the cache holds the binaries.

Before merging

  1. On PyPI, add a pending trusted publisher for the new project include-what-you-use: owner cpp-linter, repository wheels, workflow publish.yml, environment pypi (and testpypi on TestPyPI). If one already points at include-what-you-use-wheel, replace it.
  2. Merging releases include-what-you-use-v0.27, the first upload of IWYU to PyPI.
  3. Afterwards, close include-what-you-use-wheel#1 and delete or archive that repository.

Checked

  • pytest: 38 passed; pre-commit, actionlint (apart from the known $/ self-repository syntax) and zizmor clean.
  • python -m hatch_prebuilt info, platforms and release-notes, plus scripts/plan.py --tag include-what-you-use-v0.27.

Generated by Claude Code

shenxianpeng and others added 5 commits December 3, 2026 22:07
For a tool whose upstream ships source code only, [tool.wheels.binaries]
names the command that builds the binaries for one platform, the runners
and the files they are made of. binary-wheels.yml runs the command on each
runner first, cached by the hash of those files, and the wheel build reads
the binaries from binaries/. This replaces the binaries-artifacts input,
which no workflow passes.
…ou-use

The repository files go and the links point here. [tool.wheels] carries
what test.yml and automation.yml did: the binaries built from source on six
runners, the version file, the upstream and its latest tag, the update
command and the binaries for the GitHub release. The smoke test looks for
iwyu_tool.py.exe by its full name on Windows, where shutil.which() does not
add .exe to a name with an extension.
@shenxianpeng shenxianpeng self-assigned this Dec 4, 2026
@shenxianpeng
shenxianpeng merged commit 93b8b28 into main Dec 4, 2026
79 of 81 checks passed
@shenxianpeng
shenxianpeng deleted the claude/move-iwyu-1796404934 branch December 4, 2026 18:27
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