-
Notifications
You must be signed in to change notification settings - Fork 197
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
Uuid 1.12.0 contains a downstream build breaking change #787
Comments
Without digging in properly I’m not entirely sure what the source of breakage is there. Does that |
The In fact it doesn't even have any generic bounds at all. See the documentation for a list of all possible Also note that I already merged a fix to the diesel master branch so you would need to checkout to reproduce the problem: diesel-rs/diesel@25cff1d |
Thanks! I’ll have a play with it and see if I can figure out what caused it. |
I gave git bisect a try and that pointed to f570b57 as commit that introduced this. I'm honestly not sure how adding these new trait impls can cause type inference to fail there in diesel. Possibly because Anyway: We fixed that in diesel and I would not expect that this particular usage function call is something that someone outside of diesel does often, so I wouldn't expect any other breakage from this. |
👋 Hi, maintainer of If you're up for it, I'd love your thoughts on what (if anything) you would have found useful for an automated tool to flag here. I believe the new version is 1.12.0 not 0.12.0, so this was a minor release. Adding a new impl of an existing trait on an existing type is one of those "breaking but not SemVer-major" changes, because it breaks inference. So this release followed Rust SemVer norms, even though the breakage is regrettable. It feels to me like some variant of "maintainers should know about it ahead of time, but shouldn't have to make a major bump over it" might be good. Perhaps a warning-level lint? What do you think? Your feedback would inform how (if at all) we tackle this breaking change item on our lint wish list: obi1kenobi/cargo-semver-checks#5 |
I believe the possible inference breakage is going from: impl Trait<B> for A {} to: impl<T> Trait<T> for A {} where It's difficult to tell when this happens because impl blocks can appear anywhere and writing impl blocks is such a fundamental activity. If |
Makes sense! Thank you! I think it makes sense to add warning-level lints about adding trait impls that may break inference. We'll make them produce a warning without requiring a major bump. |
Steps to reproduce:
Example build that's broken: https://github.com/diesel-rs/diesel/actions/runs/12827455942/job/35769450341?pr=4434#step:8:120
(Fortunately that only breaks test code in diesel, so it's relatively easy for us to fix)
The text was updated successfully, but these errors were encountered: