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

Fix FromQueryResult when Result is redefined #495

Merged
merged 2 commits into from
Feb 5, 2022
Merged

Conversation

tasn
Copy link
Contributor

@tasn tasn commented Jan 30, 2022

Macros should only ever use absolute import paths.
Shorthands can clash (as they have in my case).

Macros should only ever use absolute import paths.
Shorthands can clash (as they have in my case).
@tasn
Copy link
Contributor Author

tasn commented Jan 30, 2022

Still not a complete fix (seems to still be failing for me) with the same reason:

error[E0107]: this type alias takes 1 generic argument but 2 generic arguments were supplied
   --> svix-server/src/v1/endpoints/endpoint.rs:144:10
    |
144 | #[derive(FromQueryResult)]
    |          ^^^^^^^^^^^^^^^
    |          |
    |          expected 1 generic argument
    |          help: remove this generic argument
    |
note: type alias defined here, with 1 generic parameter: `T`
   --> svix-server/src/error.rs:16:10
    |
16  | pub type Result<T> = std::result::Result<T, Error>;
    |          ^^^^^^ -
    = note: this error originates in the derive macro `FromQueryResult` (in Nightly builds, run with -Z macro-backtrace for more info)

@billy1624
Copy link
Member

Hey @tasn, thank you for fixing this. We should have fully quantify it, I have go through all procedural macros and fixed some more of it. Please check tasn/sea-orm@patch-1...billy1624:pr/495 and cherrypick it :P

@billy1624 billy1624 requested review from tyt2y3 and billy1624 February 1, 2022 07:47
@billy1624
Copy link
Member

We could merge and release this in 0.6.0
CC @tyt2y3

@tasn
Copy link
Contributor Author

tasn commented Feb 1, 2022

Done. There are probably more instances of other types I've missed. Anyhow, this should be good to go.

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! @tasn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants