fix: strip kicad prefix from circuit-json and prevent footprinter crashes for library footprints#2037
Closed
techmannih wants to merge 5 commits intotscircuit:mainfrom
Closed
fix: strip kicad prefix from circuit-json and prevent footprinter crashes for library footprints#2037techmannih wants to merge 5 commits intotscircuit:mainfrom
techmannih wants to merge 5 commits intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
seveibar
requested changes
Mar 11, 2026
Contributor
seveibar
left a comment
There was a problem hiding this comment.
Solution is wrong. Footprinter string should not be defined
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
|
This PR was closed because it has been inactive for 1 day since being marked as stale. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses issues with loading KiCad footprints by correctly handling the
kicad:prefix . It ensures that library-prefixed footprints don't crash the standard footprinter parser and that the prefix is stripped when generating the final Circuit JSON for compatibility with 3D model loaders.Key Changes
NormalComponent.getFootprinterString(). When a footprint likekicad:Connector_JST/JST_PH_B6B...is used, thekicad:prefix is removed before being stored incad_componentmetadata.props.footprint.@tscircuit/footprinterparser from attempting to process strings containing colons (library references). This fixes theInvalid footprint function, got "kicad"crash.propsand Footprint source attributes to ensurepcbSxselectors (e.g.,& footprint[src^='kicad:']) continue to work.Bug Fixes
footprinter_stringfields.fix https://linear.app/tscircuit/issue/TSC-394/kicad-prefix-footprints-are-passed-to-circuit-json-should-be-converted