Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: autorouter is inhertited by the subcircuit child #610

Merged
merged 6 commits into from
Feb 9, 2025

Conversation

imrishabh18
Copy link
Member

Copy link

vercel bot commented Feb 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tscircuit-core-benchmarks ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2025 8:00pm

this.parent._shouldRouteAsync()
) {
return false
}
Copy link
Contributor

Choose a reason for hiding this comment

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

not the right behavior, this is the correct behavior:

  • The props define what the subcircuit should do FIRST
  • If the props don't specify what you should do, THEN you look at your subcircuit, not your parent

Copy link
Contributor

Choose a reason for hiding this comment

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

you can't do trace-by-trace autorouting until your children have finished autorouting, but that's outside the scope of this function and may already be implemented

if (props.autorouter) return false
// Inherit from parent if not set by props
const autorouter =
this._parsedProps.autorouter ?? this.getInheritedProperty("autorouter")
Copy link
Contributor

Choose a reason for hiding this comment

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

ahhh very nice

@imrishabh18 imrishabh18 merged commit b0c8b57 into main Feb 9, 2025
9 checks passed
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.

3 participants