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

initial: cloud autorouter on group #495

Closed
wants to merge 2 commits into from

Conversation

ShiboSoftwareDev
Copy link
Contributor

I don't know how to approach this, the problem is that zod doesn't register the autorouter prop since it is not defined in groupProps but in subcircuitGroupProps

I also need to update the types in props repo that's why I have as any in the test but that's not a difficult

/claim #453
/closes #453

@@ -38,7 +39,7 @@ export class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>

get config() {
return {
zodProps: groupProps as unknown as Props,
zodProps: subcircuitGroupProps as unknown as Props,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use z.union here? (Maybe itll mess something up?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it should be conditional on the subscircuit prop


// Create a basic circuit that needs routing
circuit.add(
<group autorouter={"auto-cloud" as any}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<group autorouter={"auto-cloud" as any}>
<group autorouter={"auto-cloud"} subcircuit />

@ShiboSoftwareDev
Copy link
Contributor Author

@seveibar it worked lol, that was unclear and shouldn't it be a subcircuit by default?

@seveibar
Copy link
Contributor

seveibar commented Jan 9, 2025

Well subcircuit has really big effects and a group is more or less a container that is harmless by default. We are going to introduce a <subcircuit /> type though

@ShiboSoftwareDev
Copy link
Contributor Author

@seveibar I guess you can close the issue now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support changing the autorouter in subcircuits
2 participants