You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are these options in my opinion (in order of my preference):
A: Add new arguments --derive-for-type-recursive and --attributes-for-type-recursive.
B: Make all derives recursive by default: This would make sense in most cases, but maybe not in all.
C: Introduce a new input format per derive, e.g. subxt codegen --derive-for-type my_module::my_type=serde::Serialize/recursive so we just adjust the derive_for_type_parser function to check for this flag. This requires some weird syntax though, that the user has to know about.
D: Have no recursive derives in the CLI. People need to specify the derives manually (status quo)
I'd be up for A or C myself (A is fine for now, but runs into a future limitation if we ever add more options to derives other than "recursive", and C would be more tricky because if we went that route I'd want a general approach to passing arbitrary options to derives that also wasn't syntactically hideous, possible eg being able to have comma separated options after eg my_module::my_type=serde::Serialize,recursive,foo=123)
Alex raised this question here and after the PR is merged, we need to decide how to implement recursive derives and attributes in the CLI tool.
Right now, you specify derives and attributes like this:
There are these options in my opinion (in order of my preference):
--derive-for-type-recursive
and--attributes-for-type-recursive
.subxt codegen --derive-for-type my_module::my_type=serde::Serialize/recursive
so we just adjust thederive_for_type_parser
function to check for this flag. This requires some weird syntax though, that the user has to know about.I think A would be best, what do you guys think? @niklasad1 @lexnv @jsdw
The text was updated successfully, but these errors were encountered: