Skip to content

Add symbol-driven default footprint inference in Component()#559

Merged
akhilles merged 9 commits intomainfrom
feat/component-footprint-inference
Feb 20, 2026
Merged

Add symbol-driven default footprint inference in Component()#559
akhilles merged 9 commits intomainfrom
feat/component-footprint-inference

Conversation

@akhilles
Copy link
Contributor

@akhilles akhilles commented Feb 19, 2026

Note

Medium Risk
Changes component construction semantics and footprint resolution paths, which can affect evaluation/build/netlist output when symbols or dependencies are missing or mis-specified.

Overview
Component() now accepts an omitted footprint and will infer it from a file-backed symbol’s Footprint property, first by treating it as a local <stem> (or legacy <stem>:<stem>) resolved to <symbol_dir>/<stem>.kicad_mod, and then (when an eval context exists) by mapping KiCad’s <lib>:<fp> to the KiCad footprints package and resolving via declared dependencies before normalizing to package:// URIs.

pcb search/component finalization now rewrites symbol Footprint properties to the local stem form (instead of lib:fp), and the PR adds focused unit/integration tests and snapshots for inference success/failure cases, updates the language spec, refreshes examples to rely on inference, and bumps example pcb.toml assets accordingly.

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


Open with Devin

use std::path::PathBuf;
use std::sync::Arc;

fn eval_with_files(
Copy link
Contributor

Choose a reason for hiding this comment

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

Would these be cleaner as snapshot_eval! tests?

Copy link

@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 5 additional findings.

Open in Devin Review

@akhilles akhilles force-pushed the feat/component-footprint-inference branch from 681c7bc to 4facf45 Compare February 19, 2026 23:31
@akhilles akhilles force-pushed the feat/component-footprint-inference branch from 4facf45 to 7afdb29 Compare February 19, 2026 23:52
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@akhilles akhilles force-pushed the feat/component-footprint-inference branch from 7afdb29 to 8feabb8 Compare February 20, 2026 00:08
@akhilles akhilles merged commit 9d1976f into main Feb 20, 2026
11 checks passed
@akhilles akhilles deleted the feat/component-footprint-inference branch February 20, 2026 00:08
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