-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
@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 oflibrustcandlibsyntax, which are on the critical path when buildingrustc.
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.)
- Need to clean up the macro usage and maybe debate about either we want to convert all error codes to strings directly and therefore move the unused/unexistent/duplicates check into tidy.
mati865, ecstatic-morse and Mathspysrinivasreddy and In-line
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.