Open indirection42 opened 1 week ago
Currently, we calculate like this (only consider trait_ident
and method_ident
):
https://github.com/open-web3-stack/XCQ/blob/f1af976cd761d722c6aa7ca6b3d7e4f688b03401/xcq-extension/procedural/src/lib.rs#L169-L178
Currently, the
extension_id
is simply calculated on AST level which is not only stable. see: https://github.com/open-web3-stack/XCQ/blob/3c0d9b4c70ff6995c6c66270e2edb18a7b199427/xcq-extension/procedural/src/lib.rs#L171 Theoretically, we want two trait methods sets produce the sameextension id
, after the resolution of type aliases. However, the type aliases can be defined out of theTokenStream
that current proc-macro-attribute processed. So how we do with it? https://github.com/open-web3-stack/XCQ/blob/3c0d9b4c70ff6995c6c66270e2edb18a7b199427/xcq-extension-fungibles/src/lib.rs#L4-L19 And we also need a helper function/macro for "client" to easily specify theextension_id
which matches the "server" side. However, these types are concrete types. https://github.com/open-web3-stack/XCQ/blob/3c0d9b4c70ff6995c6c66270e2edb18a7b199427/xcq-extension/tests/extension_executor_works.rs#L113-L117