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

Support rank #96

Open
eygraber opened this issue Dec 31, 2024 · 3 comments
Open

Support rank #96

eygraber opened this issue Dec 31, 2024 · 3 comments

Comments

@eygraber
Copy link
Contributor

I've run into some scenarios where I can't use replaces because my test module doesn't have access to my impl module. It would be helpful if rank was available.

@vRallev
Copy link
Contributor

vRallev commented Dec 31, 2024

I'm hesitant. I never liked this API in the original Anvil and we only added it because of Square's opinionated module structure. I think an exclude on the component works better and keeps it more explicit if you cannot use replaces.

@eygraber
Copy link
Contributor Author

Is it the specific rank API, or the overall idea? If the former, what about specifying that this should replace any type bound to the boundType (i.e. same outcome but different semantics)?

@vRallev
Copy link
Contributor

vRallev commented Dec 31, 2024

The rank API in general, because it only worked for ContributesBinding and not ContributesTo for example. This very loose coupling could also lead to negative surprises.

what about specifying that this should replace any type bound to the boundType (i.e. same outcome but different semantics)?

This basically restricts the rank integer to 0 and 1. Very soon the first person will ask for 0, 1 and 2 🙃

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

No branches or pull requests

2 participants