Move compilation-global context data and logic around it from CodeGenerator to a new Context struct.
Lift similar logic into Context from MessageGraph, where it caused some data duplication.
Resolve some awkwardness about the Config reference needing to be mutable for its user-provided service generator, by exposing both from Context in a more disciplined way.
I would like this in, before I add an enum type registry, which is necessary to properly implement imports (and later with editions, the enum_type feature) for #1079.
Refactoring improvements to prost-build:
CodeGenerator
to a newContext
struct.Context
fromMessageGraph
, where it caused some data duplication.Config
reference needing to be mutable for its user-provided service generator, by exposing both fromContext
in a more disciplined way.