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

In SuperComponent utils update _is_compatible(type1, type2) to return the common type #9076

Open
sjrl opened this issue Mar 20, 2025 · 0 comments
Labels
P2 Medium priority, add to the next sprint if no P1 available

Comments

@sjrl
Copy link
Contributor

sjrl commented Mar 20, 2025

In SuperComponents during the validation of an input_mapping provided by a user we check if the types of the combined inputs are compatible using the _is_compatible utility function. _is_compatible works by checking if the two types have some overlapping common type rather than using strict type validation.

This is helpful because it can quickly alert a user if a mapping is not possible due to an incompatible type.

However, after this compatibility check we then assign one of the types (e.g. type1 or type2) as the overall type of the input socket to the SuperComponent. This isn't 100% accurate because we should use the overlapping type of the two types.

So my suggestion would be to expand on _is_compatible to also return the detected overlapping type between type1 and type2 which we could use to assign as the overall type for that input socket.

@julian-risch julian-risch added P1 High priority, add to the next sprint P2 Medium priority, add to the next sprint if no P1 available and removed P1 High priority, add to the next sprint labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium priority, add to the next sprint if no P1 available
Projects
None yet
Development

No branches or pull requests

2 participants