Opt out from default derives and attributes#925
Merged
jsdw merged 9 commits intoparitytech:masterfrom Apr 24, 2023
Merged
Conversation
jsdw
reviewed
Apr 24, 2023
jsdw
reviewed
Apr 24, 2023
jsdw
reviewed
Apr 24, 2023
jsdw
reviewed
Apr 24, 2023
jsdw
reviewed
Apr 24, 2023
jsdw
reviewed
Apr 24, 2023
jsdw
reviewed
Apr 24, 2023
Collaborator
|
A couple more naming nits for consistency with DerivesForType etc but otherwise looks great! |
jsdw
approved these changes
Apr 24, 2023
lexnv
approved these changes
Apr 24, 2023
pepoviola
reviewed
Apr 24, 2023
cli/src/commands/codegen.rs
Outdated
| derives_for_type: Vec<(String, String)>, | ||
| /// Additional attributes for a given type. | ||
| /// | ||
| /// Example `--attribute-type my_module::my_type=#[allow(clippy::all)]`. |
There was a problem hiding this comment.
Suggested change
| /// Example `--attribute-type my_module::my_type=#[allow(clippy::all)]`. | |
| /// Example `--attributes-for-type my_module::my_type=#[allow(clippy::all)]`. |
Typo on docs.
Contributor
Author
There was a problem hiding this comment.
fixed, thanks!
pepoviola
approved these changes
Apr 24, 2023
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims at giving the
subxtuser full control over derived traits and attributes for generated types. Until now, every new type was given:This in particular meant that
subxtwas assumed to be available when working with justsubxt_macrocrate. In order to allow some flexibility, we add (both to the macro and CLI):