-
Notifications
You must be signed in to change notification settings - Fork 159
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
Remove validator_types dep from main validator crate. #206
Conversation
This removes the transitive dependency on proc_macro, allowing the crate to be cross compiled when a target proc_macro is not available.
This is a breaking API change, as it removes the However, this crate currently does not build in some cross compilation environments, failing with this error:
As far as I can tell, there was no usage of the |
I think the change makes sense. I can't remember why it's being exported. |
Awesome! If you could merge this, that would be fantastic - I don't believe I have permissions to do so. Do you have any idea of when this would make it into a version on crates.io? |
Not sure, I'd like to see if someone knows why it was exported and was using it. |
According to commit 501fe7914222d35dcc42e7cd160ecbd703ecbe39:
Is it possibly necessary for implementing some functionality if the derive feature is not enabled? Is anyone using it like that? |
cc @ELD if you can remember anything |
@rosslannen It's probably without saying that this will be difficult (impossible) for us to prove how all consumers are using this, and introducing a breaking change like this would require Validator to hit its first major release milestone.
|
We're below 1.0, we can have as many breaking changes as we want ;) |
Sorry for the late reply (3 days later?), but I just remembered to get back to this. I can't remember anything in particular, but I am curious if there are other ways to shuffle things around to keep I think if this unblocks the user in the immediate future, it makes sense to merge it, breaking change or otherwise (let's just bump the minor version so that folks don't unintentionally pull in the change). Otherwise, I can hack around and see if I can come up with a better solution. @rosslannen can you shed more light on the cross compilation targets where you see this error? I would like to replicate this, if possible, to find other alternative solutions. Also, fun to find another Mines Alum on here, using Rust, by total happenstance! 😁 |
I am completely OK keeping the That all being said, I really can't see a reason for Right now the issue is showing up in custom yocto linux builds using meta-rust. That is somewhat difficult for others to replicate, so I'm currently exploring other options with Docker and/or cargo-cross. For the immediate future we have our builds pointed at my branch, so we can take the time to get this right. @ELD I think we've met! I believe you managed my field session project at Pivotal a few years back. Small world. |
These proc macro changes I made way back when were when I had a much more elementary understanding of them. I'm sure there is another solution that doesn't change the public interface, but it's reasonable to question to the need for the I appreciate the info on the cross compilation woes. I'll see what I can pick apart there — but that might be a red herring for investigation. It's probably better to just go with your suggestion to remove the transitive dependency on @rosslannen Oh yeah! I'm remembering now. You and your team worked on the team health check project. I'm sorry it slipped my mind at first. Hope you've been well! |
I created a WIP solution that doesn't touch public API here: #208. It still needs some testing, but its another solution to the problem. It is up to you folks to figure out which route you want to take, both work for us. I still think that removing the type should be revisited before the crate would hit 1.0. No better way to help an API from breaking than getting rid of stuff from it. But that can be a future problem to solve. @ELD yup! Fun project. I've been doing dandy, hope the same for you 😃 |
Having thought about it, I would prefer removing it and see if anyone complains. The tried and true method! |
@Keats that sounds great. I believe now it is all in your hands to get this merged in. |
This removes the transitive dependency on proc_macro, allowing the
crate to be cross compiled when a target proc_macro is not available.