Repository navigation
How to handle async-traits with external types - #2423
dignifiedquire wants to merge 3 commits into
Conversation
|
external types have had many many changes since 0.28 - are you able to test against |
|
(oops, actually, I see you are, sorry about that!) |
|
The problem here is that the type isn't being "used" by the lib crate - eg, adding this: to the proc-macro crate is enough to make it work. This is clearly a bug though, but sadly it's not immediately obvious how to fix it in a reasonable way, so in the meantime this might be an OK work-around? (Also note this has nothing to do with async, it's just about objects implementing traits) |
|
and for someone in the future looking at actually fixing it - I think what we need is somehow to call |
|
I have added usage, both in the lib and the proc-macro lib, but this still fails |
|
Ouch, yeah - this is failing for Swift for a similar reason to what I wrote above - the "lib" crate is trying to find out information about the trait, but because the trait is defined in a different module it can't find info about it. I think the correct answer here is to have each CI somehow arrange to share this info, but it's not a trivial change. |
|
fixed in #2430 |
I have been trying to get external types, combined with async trait implementations to work, and created this failing test to show how far I ave come. I don't know if this is missing something fundamental, or if I am setting it up wrong. I would appreciate any pointers.
This fails with