build: scope resolver selects pic32mz, which CMake cannot build

Open
#4,545 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c, cmake, python

Research direction

Start in tools/change_impact.py at _prune_buildable (around line 1530), then inspect .claude/skills/build/scripts/check_build.py and the selection test in .claude/test/test_build_select.py. Run the scoped selection for src/class/vendor/vendor_device.c and check whether the Make-only pic32mz family is included. Done means the selection excludes or reports pic32mz as uncovered, with a test covering that case.

Written by the indexing model from the issue text.

Description

follow-up Prio 📌

Found while verifying a fix on #4542.

Problem

check_build.py --scope <common source path> selects the pic32mz family (board olimex_emz64), which has no CMake support, so the CMake build of the scope fails.

  • python3 .claude/skills/build/scripts/check_build.py --select-only --scope src/class/vendor/vendor_device.c lists pic32mz (device/webusb_serial) among the one-board-per-family selection. Same selector code at 2614ea253 and master 719252a00 (git diff 719252a00 2614ea253 -- tools/change_impact.py tools/build.py hw/bsp/family_support.cmake is empty).
  • check_build.py --scope src/class/vendor/vendor_device.c builds 84/85 boards ok; olimex_emz64 fails with CMake Error at hw/bsp/family_support.cmake:132 (message): Family 'pic32mz' is not known/supported.
  • hw/bsp/pic32mz/ holds only family.c, family.mk and boards; there is no family.cmake.

The scoped build therefore exits 1 for any change under src/class/ (likely other core paths too), even when the change is correct. agentrc's pr-babysit build gate runs the build contract and reported fix-verification-failed for a correct fix on #4542 (2026-11-17); two separate writers on that PR hit the same failure.

Not traced: where in tools/change_impact.py the family is picked. _prune_buildable (tools/change_impact.py:1530) accepts a family that builds under Make (family.mk present) while check_build.py builds with CMake; that is the first place to look, unconfirmed.

Solution

Make tools/change_impact.py (or check_build.py) skip families without CMake support, or report them as uncovered/Make-only, instead of selecting them for a CMake build. Add a test to the script suite (.claude/test/test_build_select.py or the tools tests as applicable): a Make-only family such as pic32mz must not appear in the selection for a common class path.

Related: #3941 — covers check_build.py coverage checks in --board mode, not which boards the resolver selects.

Dominant language
C
Stars
7.3k
Forks
1.6k
Avg merge
1d 19h
Merged PRs (30d)
67

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hathach/tinyusb

All issues in hathach/tinyusb

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.