-
-
Notifications
You must be signed in to change notification settings - Fork 583
Fix non_exhaustive enums missing arms #2607
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
cargo test --workspace
doesn't pass, need to add more arms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. cargo test --workspace
passes. We've discovered all relevant match
statements*. Now we need to decide what to do with them. See the other comments
*At least, under this default test configuration. @tyt2y3, can you trigger a CI run, please? It could find more
It now contains changes needed for SeaQL/sea-query#890 as well |
Everything is now okay. Those examples are expected to fail |
Why? What's the deal here? I'm out of the loop |
those examples depends on downstream crates: loco and seaography. we have our own fork of loco for now, so may be we can use git dependency there, then everything should work |
Yeah, I think we should use git dependencies for now. And when CI fails, we fix the fork to make CI pass. This will also help to assess the breakage and prevent the merge if it's too bad. No different from fixing SeaORM before merging breaking SeaQuery PRs |
Actually, I have a counter example to consider: use crate::ExprTrait;
struct MyType(String);
impl PartialEq for MyType {
fn eq(&self, other: &Self) -> bool {
self.0.eq(&other.0)
}
} it collided with
is this annoyance acceptable? this is the only change required in seaography |
// Sometimes, you'll have to qualify the call because of conflicting std traits.
In my experience, these conflicts are very rare. In my queries, I usually compare a column and a value, an expression and a value, a column and an expression, etc. These pairs of different types don't have After SeaQL/sea-query#890, the only difference is that now you need to If this conflict really bothers you, we could use this major release to rename these methods into something more verbose that doesn't conflict. But IMO, this breaking change and verbosity is not worth it. These conflicts are rare |
I think it's acceptable. but then I can't put it in prelude. I will merge this now and fix other examples, easier to have it on master |
Ok, I'll mention the prelude in the PR description |
PR Info
non_exhaustive
to enums sea-query#891New Features
Bug Fixes
Breaking Changes
ExprTrait
re-export fromsea_orm::entity::prelude
due to potential conflicts withPartialEq
andPartialOrd
methods.Changes