Skip to content

Fix custom symbol schematic solver pin IDs and fallback netlabel names#2426

Closed
MustafaMulla29 wants to merge 1 commit into
mainfrom
fix/custom-repro
Closed

Fix custom symbol schematic solver pin IDs and fallback netlabel names#2426
MustafaMulla29 wants to merge 1 commit into
mainfrom
fix/custom-repro

Conversation

@MustafaMulla29

Copy link
Copy Markdown
Contributor

Core was building schematic trace solver pin IDs from schematic_port.pin_number only. Custom symbol ports can be authored with name but no pinNumber, so multiple ports on the same custom symbol were sent to the solver as the same ID, e.g. HOST.undefined. That made the solver input ambiguous and caused incorrect routing/fallback behavior.

This fixes the solver input generation to use the schematic port’s numeric pin_number when available, and fall back to the attached source_port.name for named custom symbol ports. The repro now asserts custom symbol connections are emitted as HOST.pin1, HOST.pin2, etc.

Also fixed fallback netlabel text generation in Port.ts: ports nested inside <symbol> were using the immediate parent symbol name, producing labels like undefined_pin3. Netlabel text now uses the owning normal component name, so custom symbol labels resolve correctly, e.g. HOST_pin3.

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Jun 11, 2026 6:57am

Request Review

@MustafaMulla29 MustafaMulla29 Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

WIll be looking into trace solver why it creates those other two netlabels instead of traces

@MustafaMulla29 MustafaMulla29 requested review from Sang-it, ShiboSoftwareDev, imrishabh18 and seveibar and removed request for imrishabh18 and seveibar June 11, 2026 13:01
_getNetLabelText(): string | undefined {
return `${this.parent?.props.name}_${this.props.name}`
const componentName =
this.getParentNormalComponent()?.props.name ?? this.parent?.props.name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this.getParentNormalComponent()?.props.name not good enough?

const componentName =
this.getParentNormalComponent()?.props.name ?? this.parent?.props.name

return componentName

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

when is componentName not defined for a port?

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

makes code worse by adding ambiguity and extra LoC unnecessarily for the net label text getter

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