Skip to content

Warn on unused module io ports#669

Merged
akhilles merged 6 commits intomainfrom
warn-unused-ios
Mar 28, 2026
Merged

Warn on unused module io ports#669
akhilles merged 6 commits intomainfrom
warn-unused-ios

Conversation

@akhilles
Copy link
Copy Markdown
Contributor

@akhilles akhilles commented Mar 27, 2026

  • warn when a module io() is declared but never connected to any realized ports
  • add core and CLI regression coverage for forwarded vs genuinely unused module inputs
  • add an unreleased changelog entry for the new warning

Note

Medium Risk
Adds a new warning emitted during schematic conversion and threads span/call-stack metadata through module parameter tracking, which may change diagnostic output and snapshots across builds.

Overview
Adds a new module.io.unused warning when a module io() value (including interfaces) is ultimately not connected to any realized ports in that module, while avoiding false positives for forwarded nets/partially-used interfaces.

Plumbs io()/config() declaration span + call stack into ParameterMetadata and Diagnostic (new with_call_stack) to produce richer, correctly-attributed warnings, and updates tests/snapshots accordingly.

Fixes stdlib variant APIs by making Crystal.GND and MountingHole.P1 only exist for the relevant package/plating variants, updating downstream tests that previously passed now-nonexistent ports, and documents the changes in CHANGELOG.md.

Written by Cursor Bugbot for commit cb2eaac. This will update automatically on new commits. Configure here.


Open with Devin

@akhilles akhilles requested a review from LK March 27, 2026 22:50
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown

Build Performance

Board Base (median) Head (median) Change
demo/DM0001 199ms ±4 197ms ±5 -1.4%
demo/DM0002 176ms ±3 181ms ±4 +2.6%
demo/DM0003 194ms ±3 197ms ±2 +1.3%
arduino/Nano 130ms ±4 138ms ±2 +5.9%
arduino/UNOQ 218ms ±4 232ms ±3 1.07× ±0.02 slower

Measured with hyperfine. Times show median ±stddev.

@akhilles akhilles merged commit 35bf692 into main Mar 28, 2026
12 checks passed
@akhilles akhilles deleted the warn-unused-ios branch March 28, 2026 19:00
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