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
Clean up CodeGenerator by moving compilation-global data and logic to Context (#1190)
* refactor(prost-build): Context
Move global context data and logic around it from CodeGenerator
to a new Context struct. Also move the logic of can_message_derive_copy
and can_field_derive_copy from MessageGraph where it caused some
data duplication.
* chore: make CodeGenerator::generate crate-private
It was not obvious immediately from the declaration that
CodeGenerator is private to the crate.
* docs(prost-build): life of Context, CodeGenerator
Add doc comments clarifying the lifetime of `Context` and
`CodeGenerator` in the code generation process.
* refactor: CodeGenerator::config helper
* refactor: rename Context::service_generator
Rename to service_generator_mut so it's evident that we are obtaining
a mutable reference even though the Context reference is shared.
* chore: revert can_message_derive_copy behavior
Avoid behavioral changes in the Context refactoring.
* chore: revert should_disable_comments behavior
Avoid behavioral changes in the Context refactoring.
* chore: elide a lifetime in CodeGenerator impl
To please clippy.
0 commit comments