@ecstatic-morse noted on Zulip that:
Is there a reason that error codes are split across crates instead of combined into a single one e.g., librustc_errors? Seems like doing so would make this easier, as well as move some code out of librustc and libsyntax, which are on the critical path when building rustc.
Should we move all the error codes into a dedicated crate (librustc_error_codes) or into the existing librustc_errors? Advantages include:
- Making other crates, especially
librustc, smaller and thus improving pipelining.
- All the codes and descriptions are in a single place, which should be easier to manage overall -- no need to move error codes when logic is moved between crates or when crates are split.
Disadvantages include:
- Everything that uses error codes will need to be recompiled, in particular
librustc, if you do introduce a new error code or modify a description. I don't think this happens all that frequently. We could also separate the codes from the descriptions.
cc @rust-lang/compiler @GuillaumeGomez @nnethercote
(My personal inclination is to introduce a new fresh crate dedicated to error codes.)
@ecstatic-morse noted on Zulip that:
Should we move all the error codes into a dedicated crate (
librustc_error_codes) or into the existinglibrustc_errors? Advantages include:librustc, smaller and thus improving pipelining.Disadvantages include:
librustc, if you do introduce a new error code or modify a description. I don't think this happens all that frequently. We could also separate the codes from the descriptions.cc @rust-lang/compiler @GuillaumeGomez @nnethercote
(My personal inclination is to introduce a new fresh crate dedicated to error codes.)