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

Swap to an extensible trait-powered design for resolving clashes #537

Closed
alice-i-cecile opened this issue Jun 10, 2024 · 2 comments
Closed
Labels
code-quality Make the code faster or prettier controversial Requires a heightened standard of review usability Reduce user friction
Milestone

Comments

@alice-i-cecile
Copy link
Contributor

alice-i-cecile commented Jun 10, 2024

Hmm. I don't love this design. Doesn't this just get us back to the same place, where UserInput can't be reasonably extended?

Originally posted by @alice-i-cecile in #490 (comment)

@alice-i-cecile alice-i-cecile added code-quality Make the code faster or prettier usability Reduce user friction controversial Requires a heightened standard of review labels Jun 10, 2024
@alice-i-cecile alice-i-cecile added this to the Trait-driven design milestone Jun 10, 2024
@alice-i-cecile
Copy link
Contributor Author

We want to be able to ensure that we can resolve clashes between inputs, no matter what input kind is there.

The core operation we need is to check if the actions of the two inputs overlap. To do so, we should be using hash sets. We can represent the values in a type-agnostic but reasonably robust way using hashes:

  1. Hash the type path of the input.
  2. Hash the variant name.
  3. Combine these.

Use the power of reflection for good... All of these computations should be able to be mostly cached.

@alice-i-cecile alice-i-cecile moved this to Active: LWIM upstreaming in Alice's Work Planning Jul 8, 2024
@alice-i-cecile
Copy link
Contributor Author

This is already completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Make the code faster or prettier controversial Requires a heightened standard of review usability Reduce user friction
Projects
None yet
Development

No branches or pull requests

1 participant