Skip to content

Suggestion: Remove generated code from repo #4909

@weswigham

Description

@weswigham

After seeing #4884, I'd like to ask about this. Having diagnosticInformationMap.generated.ts in the repo seems fine since it's part of the build, but since we want to check if for duplicate IDs we should consider incorporating the generation of the code into the standard build process, rather than a script run by hand as-needed.

The only downsides I can see are that editor intellisense for the Diagnostic object won't work after a clean clone until after a build or pre-build is run, and we'll lose the ability to simply run tsc over the compiler folder and get a functioning compiler (you have to generate the generated code first).

As far as upsides go, adopting this strategy should result in fewer merge conflicts in diagnostic messages and, additionally, will add a warning in the form of a failed build in a PRs when someone tries to add a message with an identical message id to one in master.

To do this, we should remove the generated code file from the repo, add the filename to the .gitignore, and make the script to rebuild it run as part of the build process.

Does anyone feel strongly about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions