Skip to content

Emit error codes when reporting diagnostics.#508

Merged
DanielRosenwasser merged 5 commits into
masterfrom
printDiagnosticCodes
Aug 22, 2014
Merged

Emit error codes when reporting diagnostics.#508
DanielRosenwasser merged 5 commits into
masterfrom
printDiagnosticCodes

Conversation

@DanielRosenwasser
Copy link
Copy Markdown
Member

Addresses part of issue #506.

Before:

file.ts(1,6): ';' expected. 
file.ts(1,11): ';' expected.

After:

file.ts(1,6): error TS1005: ';' expected. 
file.ts(1,11): error TS1005: ';' expected.

Comment thread src/compiler/tsc.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+=

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Aug 22, 2014

👍

Comment thread src/compiler/tsc.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 'category' need to be localized?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sheetalkamat
Copy link
Copy Markdown
Member

Please do not checkin this change without change to https://github.com/Microsoft/TypeScript/blob/printDiagnosticCodes/src/harness/harness.ts#L776

Also I would recommend making the changes to https://github.com/Microsoft/TypeScript/blob/printDiagnosticCodes/src/harness/harness.ts#L791 such that it calls minimalDiagnosticsToString here itself instead of from runners (eg: https://github.com/Microsoft/TypeScript/blob/printDiagnosticCodes/src/harness/rwcRunner.ts#L155 and https://github.com/Microsoft/TypeScript/blob/printDiagnosticCodes/src/harness/projectsRunner.ts#L302)
its important that compiler runner emit the error code so there is a way to verify error codes when someone add/modifies error codes.

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

👍

@DanielRosenwasser
Copy link
Copy Markdown
Member Author

@sheetalkamat I made the change to minimalDiagnosticsToString - I agree that we should make a general change to emit error codes; however, that seems like a change that will make this PR a bit difficult to digest.

@sheetalkamat
Copy link
Copy Markdown
Member

I would either do compilerrunner change as a separate iteration of this same pull request (I prefer that) or create a separate pull request for the same, But given that now we are showing error codes in error that change should be done sooner than later.

@DanielRosenwasser
Copy link
Copy Markdown
Member Author

Will do. I'll start working on it. Thanks!

DanielRosenwasser added a commit that referenced this pull request Aug 22, 2014
Emit error codes when reporting diagnostics.
@DanielRosenwasser DanielRosenwasser merged commit b73558d into master Aug 22, 2014
@DanielRosenwasser DanielRosenwasser deleted the printDiagnosticCodes branch August 22, 2014 23:21
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants