Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use parameterized error message for ERR_FeatureNotAvailableInVersion #19871

Open
jcouv opened this issue May 30, 2017 · 3 comments
Open

Use parameterized error message for ERR_FeatureNotAvailableInVersion #19871

jcouv opened this issue May 30, 2017 · 3 comments
Assignees
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented May 30, 2017

Currently, every new version requires adding a new error code and diagnostic (for example ErrorCode.ERR_FeatureNotAvailableInVersion7_2). But this could be parameterized instead.

Relates to #19846 (review)

@jcouv jcouv added this to the 15.6 milestone May 30, 2017
@jcouv jcouv self-assigned this May 30, 2017
@jcouv jcouv changed the title Use parameterized error message for Use parameterized error message for ERR_FeatureNotAvailableInVersion May 30, 2017
@jcouv
Copy link
Member Author

jcouv commented Jun 6, 2017

ErrorCode.cs has a comment regarding telemetry:
ERR_FeatureNotAvailableInVersion1 = 8022, // Note: one per version to make telemetry easier

@dotnet/roslyn-compiler Can anyone confirm whether having a separate error code per language version actually solves any telemetry problem?

@jcouv
Copy link
Member Author

jcouv commented Jun 13, 2017

From discussion with Neal, he's not aware of any telemetry benefits of using separate error codes for this specific case. I'll check with Jared too.

@Neme12
Copy link
Contributor

Neme12 commented Oct 8, 2018

Could we please get a property in the error message that would say which feature the error targets? It would be helpful for a certain kind of code fixes which look for this error to find usages of a language feature that cannot be used in the current language version and offer to convert it to something that does exist in this version (for example an out-var into a declared variable). These fixes would need to know that the diagnostic relates to the feature they're looking for. Would that be possible? Thanks.

@jcouv jcouv modified the milestones: 16.0, 16.1, 16.2 Apr 18, 2019
@jcouv jcouv modified the milestones: 16.2, 16.3, Compiler.Next Jun 25, 2019
@jaredpar jaredpar modified the milestones: Compiler.Next, Backlog Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants