-
Notifications
You must be signed in to change notification settings - Fork 158
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
feat: add #[validator(crate = "...")]
for crate alias
#339
Conversation
Is it possible to add a test? |
Added (also fixed the compile error). The tests cover:
It doesn't cover every branch, but I checked the ones for |
Whoops, seems like that "private" type is now permitted on the nightly channel I was on, but not on 1.70. I shuffled it around so it could be |
It looks like ti still fails? |
The fail appears to be unrelated to this commit and more related to the version of
Looks like it has placed them at the end instead of at the start for a lot of the expect-fail tests. It might be a good idea to pin to the last-working nightly, or maybe there's a way to specify different output for a different toolchain? |
I think I should remove nightly entirely from the CI, it's always failing on there for one reason or another |
Sounds like a good idea. Let me know if you need anything from me to get this merged! |
Currently it's not possible to package up the
validator
crate's derives without requiring users to include the dependency locally (cluttering up their deps list if they don't actually use it).This PR adds an optional
crate
attribute that overrides all references to the crate with a new name.It also works with paths, e.g.
#[validate(crate = "some::other::location")]