Skip to content

Report actionable SysConfig pin errors without source IDs or stack traces - #257

Merged
AnasSarkiz merged 2 commits into
mainfrom
fix/actionable-pin-errors
Oct 6, 2026
Merged

AnasSarkiz merged 2 commits into
mainfrom
fix/actionable-pin-errors

Conversation

@AnasSarkiz

@AnasSarkiz AnasSarkiz commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

When ti generate-sysconfig encounters connected MCU pins without selected functions, it previously printed generated record IDs, Bun source excerpts and a stack trace. Bundle the actionable converter from converter PR #9 at commit 3da9ac4b464a84eac13615dc684da7105065c685, and report its message with a nonzero exit status.

Before:

Failed to generate SysConfig: SysConfig conversion failed:
14461 | throw new Error(...)
error: Unresolved CC2340 pin configuration for U1 (source_component_0, CC2340R52E0RGER):
U1.DIO11 (source_port_3, pin 4): missing or ambiguous selected function...
...
at deriveCc2340Requests (...convert.mjs:14461:11)

After, for two connected pins without selected functions:

Failed to generate SysConfig: SysConfig conversion failed:
Unresolved CC2340 pin configuration for U1 (CC2340R52E0RGER):
- U1 pin 4 (DIO11): no GPIO direction or supported peripheral selected
- U1 pin 6 (DIO13): no GPIO direction or supported peripheral selected
Update U1's TSX pinAttributes with the intended function for each listed pin: set exactly one of isInput: true or isOutput: true for GPIO, or activeCapability: "i2c_sda" / "i2c_scl" for I2C.
Datasheet capabilities such as isGpio describe what a pin supports; they do not select how this board uses it.

Add toMatchInlineSnapshot() assertions for complete terminal errors from both Circuit JSON and TSX inputs. Also assert exit status 1, empty stdout and no partial .syscfg file. Include these Bun tests in the existing test:cli command alongside the Node CLI suite and schematic snapshot.

Validation:

  • 60 Node CLI tests and 3 Bun tests pass, including both new inline error snapshots and the existing schematic snapshot.
  • Typecheck and Biome pass.
  • npm build and clean local/global package installation tests pass with the minimum supported tscircuit@0.0.2745.

This PR is limited to error reporting and its regression coverage. Pin capability behavior and datasheet metadata follow-ups are separate work. Nothing has been released.

@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ti-system-block-ui Ready Ready Preview Oct 6, 2026 5:48pm UTC

Request Review

@ShiboSoftwareDev

Copy link
Copy Markdown
Contributor

test with inline snapshots

@AnasSarkiz
AnasSarkiz merged commit 44475b7 into main Oct 6, 2026
5 of 6 checks passed
@AnasSarkiz
AnasSarkiz deleted the fix/actionable-pin-errors branch October 6, 2026 18:18

This branch had an error being deployed

1 failed deployment
Preview — 9ade9aae Deployed Oct 6, 2026 by tscircuit[bot]
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.

2 participants