Tool version is not compatible with the Python version in CI.
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 77/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cmake, github-actions, python
- Domain
- build-system, ci-cd
Research direction
Start by reading the CI workflow that runs actions/setup-python and the .pre-commit-config.yaml entry for cheshirekow/cmake-format-precommit at v0.6.13. Reproduce the failure with pre-commit run --show-diff-on-failure --color=always --all-files and check whether pinning Python to 3.12 or updating the hook resolves it. Done means the cmake-format hook completes successfully in CI.
Written by the indexing model from the issue text.
Description
Issue applies to:
- pflow
- OPFLOW
- TCOPFLOW
- SCOPFLOW
- SOPFLOW
- CMake and build system
- Spack
- Visualization
- Documentation
- Other
Summary
One issue arised with CI on PR #150 that could affect future PRs.
PR #150 failed in the pre-commit step, specifically the cmake-format hook.
In short, according to log analysis and Github CoPilot, the repo is fine, but the tool version is not compatible with the Python version in CI.
(Feel free to assign a fix to me and I will create a PR.)
Longer explanation:
The relevant evidence is in the workflow and config:
cmake-format............................................................. Failed
It’s a toolchain compatibility issue.
What failed:
The job runs pre-commit
The cmake-format hook is from cheshirekow/cmake-format-precommit
That hook pulls in cmakelang, which crashes under Python 3.15
The logs show the exact root cause:
ValueError: Cannot use capturing groups in re.Scanner
That error is coming from Python’s re.Scanner behavior in Python 3.15, and it is known to break older cmakelang/cmake-format releases.
Why it happened here: Workflow uses actions/setup-python without pinning a version
On GitHub runners, that resolves to Python 3.15
Then pre-commit creates an environment with that Python version
The old cmake-format dependency crashes during parsing
Description how to reproduce the issue
Run pre-commit run --show-diff-on-failure --color=always --all-files
[INFO] Initializing environment for https://github.com/cheshirekow/cmake-format-precommit.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-clang-format.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[WARNING] repo [https://github.com/pre-commit/pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks%60) uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often pre-commit autoupdate --repo [https://github.com/pre-commit/pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks%60) will fix this. if it does not -- consider reporting an issue to that repo.
[INFO] Installing environment for https://github.com/cheshirekow/cmake-format-precommit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-clang-format.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
cmake-format.............................................................Failed
- hook id: cmake-format
- exit code: 1
WARNING main.py:530: While processing src/CMakeLists.txt
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/bin/cmake-format", line 6, in
sys.exit(main())
~~~~^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 633, in main
return inner_main()
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 616, in inner_main
onefile_main(infile_path, args, argparse_dict)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 526, in onefile_main
outtext, reflow_valid = process_file(cfg, intext, args.dump)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 144, in process_file
tokens = lex.tokenize(infile_content)
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/lex/init.py", line 135, in tokenize
scanner = re.Scanner([
# double quoted string
...<48 lines>...
lambda s, t: (TokenType.UNQUOTED_LITERAL, t)),
], re.DOTALL)
File "/opt/hostedtoolcache/Python/3.15.0/x64/lib/python3.15/re/init.py", line 406, in init
raise ValueError("Cannot use capturing groups in re.Scanner")
ValueError: Cannot use capturing groups in re.Scanner
WARNING main.py:530: While processing buildsystem/clang-hip/cache.cmake
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/bin/cmake-format", line 6, in
sys.exit(main())
~~~~^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 633, in main
return inner_main()
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 616, in inner_main
onefile_main(infile_path, args, argparse_dict)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 526, in onefile_main
outtext, reflow_valid = process_file(cfg, intext, args.dump)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 144, in process_file
tokens = lex.tokenize(infile_content)
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/lex/init.py", line 135, in tokenize
scanner = re.Scanner([
# double quoted string
...<48 lines>...
lambda s, t: (TokenType.UNQUOTED_LITERAL, t)),
], re.DOTALL)
File "/opt/hostedtoolcache/Python/3.15.0/x64/lib/python3.15/re/init.py", line 406, in init
raise ValueError("Cannot use capturing groups in re.Scanner")
ValueError: Cannot use capturing groups in re.Scanner
WARNING main.py:530: While processing interfaces/python/CMakeLists.txt
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/bin/cmake-format", line 6, in
sys.exit(main())
~~~~^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 633, in main
return inner_main()
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 616, in inner_main
onefile_main(infile_path, args, argparse_dict)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 526, in onefile_main
outtext, reflow_valid = process_file(cfg, intext, args.dump)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 144, in process_file
tokens = lex.tokenize(infile_content)
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/lex/init.py", line 135, in tokenize
scanner = re.Scanner([
# double quoted string
...<48 lines>...
lambda s, t: (TokenType.UNQUOTED_LITERAL, t)),
], re.DOTALL)
File "/opt/hostedtoolcache/Python/3.15.0/x64/lib/python3.15/re/init.py", line 406, in init
raise ValueError("Cannot use capturing groups in re.Scanner")
ValueError: Cannot use capturing groups in re.Scanner
WARNING main.py:530: While processing tests/unit/opflow/objective/CMakeLists.txt
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/bin/cmake-format", line 6, in
sys.exit(main())
~~~~^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 633, in main
return inner_main()
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 616, in inner_main
onefile_main(infile_path, args, argparse_dict)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 526, in onefile_main
outtext, reflow_valid = process_file(cfg, intext, args.dump)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/format/main.py", line 144, in process_file
tokens = lex.tokenize(infile_content)
File "/home/runner/.cache/pre-commit/repog8fl9qvh/py_env-python3.15/lib/python3.15/site-packages/cmakelang/lex/init.py", line 135, in tokenize
scanner = re.Scanner([
# double quoted string
...<48 lines>...
lambda s, t: (TokenType.UNQUOTED_LITERAL, t)),
], re.DOTALL)
File "/opt/hostedtoolcache/Python/3.15.0/x64/lib/python3.15/re/init.py", line 406, in init
raise ValueError("Cannot use capturing groups in re.Scanner")
ValueError: Cannot use capturing groups in re.Scanner
ExaGO version
99ce24b2270d4683b0bffe421fe739e5be37d4f0
System and environment details
WSL
Additional information
No response
Possible fix or workaround
Proposed best fix: pin Python to 3.12 or 3.13 in the workflow, not 3.15
YAML:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: pre-commit/[email protected]
Also recommended is to upgrade the cmake-format hook to a newer revision if available or update the cmake-format-precommit repo to a maintained release
YAML:
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:- id: cmake-format
- Dominant language
- Python
- Stars
- 17
- Forks
- 11
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 2
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ORNL/ExaGO
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
[E38] a DC line at the reference bus demotes it to PV: `PSSetUp`'s condition is always trueMay be free again @hambrickjc claimed this 50 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
ORNL/ExaGO#109 · 3 comments · 1 assignee ·
Maintainers usually reply within 3 days
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Maintainers usually reply within 3 days
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 3 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Netcracker/qubership-ai-packages#266 ·
Maintainers usually reply within 1 day
-
PROCESSED_DATA_FOLDER: strip whitespace and treat empty as unsetPossibly taken @TorecLuik claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
NL-BioImaging/BIOMERO.importer#63 ·
Maintainers usually reply within 1 day
-
MLX training-complete chat/merge suggestions omit --backend mlxPossibly taken @vaputa claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MakazhanAlpamys/Soup#2913 · 1 comment ·
Maintainers usually reply within 1 day
-
area:security effort:S priority:P3 status:needs-triage type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
randomparity/kdive#3657 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws/mcp-proxy-for-aws#476 ·
Maintainers usually reply within 1 day