Apply CLI platform defaults to exports (enable platform autorouters + loaders)#3561
Open
maci0 wants to merge 1 commit into
Open
Apply CLI platform defaults to exports (enable platform autorouters + loaders)#3561maci0 wants to merge 1 commit into
maci0 wants to merge 1 commit into
Conversation
…oaders) The export command rendered the board with the raw platformConfig, while the spice path wraps it with getPlatformConfigWithCliDefaults. So kicad/gerber/pcb/etc. exports never got the CLI platform defaults - the eval autorouterMap (e.g. the krt KiCad-routing-tools autorouter), static-file loaders and footprint loaders. A board with autorouter="krt" silently fell back to the built-in router on export. Wrap the export platformConfig the same way spice does, so exports and the dev server resolve the same platform autorouters and loaders.
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.
Bug
tsci exportrenders the board with the rawplatformConfig, but thespicepath wraps it withgetPlatformConfigWithCliDefaults(...). Result: kicad / gerbers / pcb / etc. exports never receive the CLI platform defaults from@tscircuit/eval— theautorouterMap(e.g. thekrtKiCad-routing-tools autorouter), the static-file loaders and footprint loaders.Concretely, a board with
autorouter="krt"silently falls back to the built-in router on export (verified: selectingkrtchanged nothing until this fix, after which the platform autorouter is actually invoked).cli/export/register.ts:Fix
Wrap the export
platformConfigthe same way the spice path does, so exports and the dev server resolve the same platform autorouters and loaders. One line, mirrors existing behavior.Verification
With
autorouter="krt", before this change the export produced the built-in-router result; after it, thekrtplatform autorouter is invoked (route changes). Happy to add a regression test asserting a board with a platform-mapped autorouter routes via that autorouter on export.