Skip to content

chore: drop clang 11 support and update default version to 21#458

Merged
shenxianpeng merged 1 commit into
mainfrom
chore/drop-clang-11-default-to-21
Jul 3, 2026
Merged

chore: drop clang 11 support and update default version to 21#458
shenxianpeng merged 1 commit into
mainfrom
chore/drop-clang-11-default-to-21

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

This PR drops support for clang version 11 and updates the default clang version from 20 to 21.

Changes

  1. action.yml — Removed 11 from the list of accepted version strings and updated the default from '20' to '21'.
  2. .github/workflows/self-test.yml — Removed '11' from the clang-version test matrix.

Motivation

Clang 11 is now several years old and is no longer actively maintained in the clang-tools-pip ecosystem. Clang 21 is the latest major version and should be the default going forward.

Summary by CodeRabbit

  • Bug Fixes
    • Updated the supported toolchain version range to start at a newer minimum version.
    • Changed the default clang-tools version to a newer release.
    • The self-test workflow now runs against the updated version matrix, improving consistency with current supported versions.

@shenxianpeng shenxianpeng requested a review from a team as a code owner July 2, 2026 19:41
@shenxianpeng shenxianpeng requested review from 2bndy5 and removed request for a team July 2, 2026 19:41
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v16.0.6) reports: 2 file(s) not formatted
  • docs/examples/demo/demo.hpp
  • docs/examples/demo/demo.cpp
clang-tidy (v16.0.6) reports: 7 concern(s)

Have any feedback or feature suggestions? Share it here.

@shenxianpeng shenxianpeng added the maintenance Maintenance updates label Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e629c712-b883-45d1-bc5c-1f2d9db4d100

📥 Commits

Reviewing files that changed from the base of the PR and between 8e85cd0 and 5432019.

📒 Files selected for processing (2)
  • .github/workflows/self-test.yml
  • action.yml

Walkthrough

This PR updates supported Clang version references: the self-test workflow's clang-version matrix drops version 11 (starting at 12), and action.yml's version input documentation removes 11 from accepted options and changes the default from '20' to '21'.

Changes

Clang Version Support Update

Layer / File(s) Summary
Update clang-version matrix and defaults
.github/workflows/self-test.yml, action.yml
Self-test matrix drops clang-version 11 (starts at 12); action.yml documentation removes 11 from accepted options and updates default from '20' to '21'.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: dropping clang 11 support and updating the default version to 21.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shenxianpeng

Copy link
Copy Markdown
Member Author

This PR will resolve the CI failure from #457 since the latest version of clang-tools and clang-tools-static-binaries drops support for clang version 11

@2bndy5 2bndy5 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that cpp-linter/clang-tools-static-binaries deploys a versions.json, the CI matrix could be automated

jobs:
  pre-seed-versions:
    runs-on: ubuntu-latest
    outputs:
      versions: ${{ steps.versions.outputs.versions }}
    steps:
      - id: versions
        env:
          # may not be needed because release assets are not rate limited
          GITHUB_TOKEN: ${{ github.token }}
        run: >-
          gh release download
          --repo cpp-linter/clang-tools-static-binaries
          --pattern "versions.json" -O -
          | python3 -c "import sys, json;
          d = json.load(sys.stdin);
          v = [x for x in d['llvm_versions']];
          print(f'versions={json.dumps(v)}')"
          >> $GITHUB_OUTPUT

  test:
    needs: [pre-seed-versions]
    permissions:
      contents: write
      pull-requests: write
    strategy:
      matrix:
        os: [ ubuntu-latest, macos-latest, windows-latest ]
        clang-version: ${{ fromJson(needs.pre-seed-versions.outputs.versions) }}

See fromJson() in GH docs.

Maybe the doc strings too, but that would be trickier

@shenxianpeng

shenxianpeng commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Good point. Since there are still other place that need to be updated, I think explicitly displaying the version range here seems reasonable.

@shenxianpeng shenxianpeng merged commit 8295a99 into main Jul 3, 2026
41 checks passed
@shenxianpeng shenxianpeng deleted the chore/drop-clang-11-default-to-21 branch July 3, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants