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

Trait bounds: derive as much as is reasonable, #[scale_info(bounds())] for the rest #78

Closed
ascjones opened this issue Mar 12, 2021 · 2 comments · Fixed by #88
Closed
Assignees

Comments

@ascjones
Copy link
Contributor

In a meeting it was decided that we put forward with scale-info in the following way:

  • We will go with the "hacks" that have already been implemented for it and for parity-scale-codec crates to cover the most common use cases with 80/20 rule.
  • For the other 20% of cases that are not covered by the scale-info and parity-scale-codec derive macros we will provide a feature for users to define custom trait bounds similar to the design serde chose. Those custom trait bounds will be replacing the generated ones instead of being additive.
  • We might consider in the future to remove the "cruft" of "hacks" for common cases and consider removing them altogether with a major release for both derives.

Originally posted by @Robbepop in #76 (comment)

@dvdplm
Copy link
Contributor

dvdplm commented Mar 12, 2021

cc @thiolliere

@dvdplm dvdplm self-assigned this Mar 12, 2021
@ascjones
Copy link
Contributor Author

ascjones commented Apr 7, 2021

Linking paritytech/parity-scale-codec#263

@dvdplm dvdplm changed the title Derive trait bounds Trait bounds: derive as much as is reasonable, #[scale_info(bounds())] for the rest May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants