-
Notifications
You must be signed in to change notification settings - Fork 278
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
[refactor] #3814: Update iroha_ffi_derive
to use syn 2.0
#3830
Conversation
cd093fa
to
25af7e5
Compare
Pull Request Test Coverage Report for Build 5949198492
💛 - Coveralls |
…ro-error with manyhow
…arse attributes and use syn 2.0 WIP: do not fail fast in ffi!, ffi_import and ffi_export WIP: fix clippy lints WIP: remove commented out code WIP: make the presence of generic arguments a fatal error (it leads to dubious errors if codegen is ran) WIP: actually fix clippy lints
253155d
to
4839cc6
Compare
…ro-error with manyhow Signed-off-by: Nikita Strygin <DCNick3@users.noreply.github.com>
…arse attributes and use syn 2.0 Signed-off-by: Nikita Strygin <DCNick3@users.noreply.github.com>
73bbc38
to
2567474
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR and a huge code & UI improvement, it seems for me. I don't have critical objections, although I am not proficient in FFI & procmacro topics.
However, there are some questions and suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small doc typo fix, ping afterwards for approval.
6f9bfdd
to
47d383a
Compare
…ro-error with manyhow Signed-off-by: Nikita Strygin <DCNick3@users.noreply.github.com>
…arse attributes and use syn 2.0 Signed-off-by: Nikita Strygin <DCNick3@users.noreply.github.com>
Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
…tokens Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
…into Emitter::finish_token_stream Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
…parsing Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
… ffi function args Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
… Attrs naming Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
…parsing attributes to lib.rs Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
…ives in proc macros Signed-off-by: Nikita Strygin <dcnick3@users.noreply.github.com>
47d383a
to
a255c09
Compare
Description
Separate parsing & (some) validation of attributes and codegen using
darling
, by storing this information into a strongly typed struct (FfiTypeInput
and alike).To facilitate this, add parsers for
derive(FfiType)
,getset
crate and built-inrepr
andderive
attributes and tests for them.One unfortunate concern is that now
ffi_derive
has stopped supporting unions completely, due to a limitation ofdarling
. I don't think they are that useful though, especially in context of a high level API iroha providesLinked issue
Closes #3814
Benefits
Cleaner code, better macro errors
Checklist
[ ] Move utility classes to a common place (not a good idea untiliroha-derive-primitives
, probably)iroha-derive-primitives
is syn2-onlyffi!
,#[ffi_import]
and#[ffi_export]
emit!
errors rather thanbail!
ing