Skip to content

clangd: Add version 22.1.1 - #3276

Draft
luhenry wants to merge 2 commits into
mainfrom
port/clangd
Draft

luhenry wants to merge 2 commits into
mainfrom
port/clangd

Conversation

@luhenry

@luhenry luhenry commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Compiles clangd (LLVM/clang/clang-tools-extra) from the official LLVM source release; clangd-wheel always builds it from source regardless of platform. Upstream publishes no riscv64 wheel.

Mirrors upstream's build.yml.

Differs from upstream

  • Installs lld and caps CMAKE_BUILD_PARALLEL_LEVEL - build-circt.yml OOM'd linking an unrestricted-target LLVM binary on this runner

Testing

  • same as upstream

License: OK

Built on cp312 (py2.py3); CI pending.

Builds clangd (jmpfar/clangd-wheel), the LSP server bundled from a
from-source LLVM+clang+clang-tools-extra compile, modeled on
build-clang-tidy.yml (same scikit-build-core + cibuildwheel +
manylinux_riscv64 lineage: clangd-wheel is a fork of clang-tidy-wheel).

Preemptively installs lld and caps CMAKE_BUILD_PARALLEL_LEVEL, since
build-circt.yml already hit this runner's RAM ceiling linking an
unrestricted-LLVM-target binary and clangd-wheel's own CMakeLists.txt
leaves LLVM_TARGETS_TO_BUILD at upstream's default (all targets) too.
luhenry added a commit that referenced this pull request Oct 15, 2026

luhenry commented Oct 15, 2026 •

Copy link
Copy Markdown
Member Author

check_commit_messages (job 116286357313) failed on the initial pull_request: opened snapshot of this PR's body, which still had the auto-injected "Generated by Claude Code" footer at the moment that webhook fired. The footer was stripped via update_pull_request immediately after creation (confirmed removed in the current PR body above). The edited-triggered re-run of pr-checks.yml picks up the corrected body and should resolve this on its own — not a real failure, no action needed.

The first build of 22.1.1 failed in get_requires_for_build_wheel with
"Use build.verbose instead of cmake.verbose for scikit-build-core >= 0.10".
clangd-wheel leaves scikit-build-core unpinned and still sets the
deprecated cmake.verbose; 0.12.x (what upstream last released 22.1.1 with,
in March) only warned about it, but 1.x errors out when minimum-version is
unset, so build isolation now resolves 1.1.1 and the build stops before
CMake runs. This is not riscv64-specific: any fresh build of the tag hits
it.

Carry a one-line pyproject.toml patch and apply it before cibuildwheel,
checking python-wheels out alongside the upstream tree as the other
patched workflows do.

luhenry commented Oct 15, 2026 •

Copy link
Copy Markdown
Member Author

build_wheels failure (run 38694044993)

The build stopped at cibuildwheel's "Getting build dependencies for wheel..." step, before CMake ran:

ERROR: Use build.verbose instead of cmake.verbose for scikit-build-core >= 0.10
Backend subprocess exited when trying to invoke get_requires_for_build_wheel

Root cause. At v22.1.1.0, jmpfar/clangd-wheel's pyproject.toml has requires = ["scikit-build-core"] with no version pin. It also still sets the deprecated cmake.verbose = true under [tool.scikit-build]. That key was renamed to build.verbose in scikit-build-core 0.10:

  • Through 0.12.x it was only a warning. 0.12.2 was the latest release when upstream built and published 22.1.1 to PyPI on 2026-03-12.
  • scikit-build-core 1.x (_handle_move in settings/skbuild_read_settings.py) makes it a hard error when minimum-version is unset. Build isolation here resolved 1.1.1.
  • Upstream's build.yml doesn't pin scikit-build-core either. Its main (last commit 2026-03-16) still carries cmake.verbose, and its CI hasn't run since 1.0 came out (2026-07).

So this isn't specific to riscv64: a fresh build of this tag fails the same way on every platform today. I reproduced it locally against v22.1.1.0:

  • scikit-build-core 0.12.2: get_requires_for_build_wheel prints a WARNING and succeeds.
  • scikit-build-core 1.1.1: the same hook fails with the exact error above.

Fix (ede3084).

  • New patch patches/clangd/22.1.1/0001-Use-build.verbose-instead-of-the-removed-cmake.verbos.patch renames cmake.verbose to build.verbose. Its tag is Upstream-Status: To upstream. build.verbose has existed since 0.10, so the patch also works with older scikit-build-core.
  • build-clangd.yml now checks python-wheels out into python-wheels/ after the clangd-wheel checkout and runs git apply on the patch before cibuildwheel, like the other patched workflows. patches/clangd/** is added to the pull_request/push paths.

With the patch applied and scikit-build-core 1.1.1, get_requires_for_build_wheel and prepare_metadata_for_build_wheel succeed locally, and the version still resolves to clangd 22.1.1. I couldn't run the full LLVM/clangd compile locally, so the new run will show whether any later stage has its own problems.

This branch has not been deployed

No deployments
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