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

Add codes to MSBuild warnings and errors #2065

Closed
natemcmaster opened this issue Mar 19, 2018 · 4 comments
Closed

Add codes to MSBuild warnings and errors #2065

natemcmaster opened this issue Mar 19, 2018 · 4 comments
Assignees
Milestone

Comments

@natemcmaster
Copy link
Contributor

Follow-up to this: #2064 (comment)

Most MSBuild warnings and errors issued by this SDK do not have error codes. We should add codes to all of them.

@livarcocc livarcocc added this to the Unknown milestone Mar 21, 2018
@nguerrera nguerrera modified the milestones: Unknown, 2.1.4xx May 15, 2018
@nguerrera
Copy link
Contributor

nguerrera commented May 15, 2018

Moving to 2.1.4xx because there's a 15.8 project system feature that needs to light up on a well known code. I want us to establish a convention that we can follow moving forward and close on this. I don't want to pick one code for the particular error that project system will need and then get stuck with that being different when we finally make a decision for all error codes.

Here is my straw man proposal:

NETSDK1001
NETSDK1002
etc.

I chose NETSDK because the errors are generated by our code referenced as "Microsoft.NET.Sdk".

That said, the particular error needed now is generated from a separate component in this repo: the ".NET Framework extensions". How about this for that component:

NETEXT1001
NETEXT1002
etc.

I'm open to other prefixes and starting numbers. For example, we could use DOTNET for everything. If we do that, we may need to be careful to avoid collision with DOTNETNNNN errors from the project.json era CLI. Does the CLI still issue it's own codes elsewhere? If so, it would probably be best to use different prefix for things from the build tasks and the CLI to prevent unintentional collision risk.

cc @KathleenDollard, @livarcocc, @dotnet/dotnet-cli It would be very helpful to close on this quickly to unblock @tmeschter

@nguerrera nguerrera self-assigned this May 15, 2018
@KathleenDollard
Copy link

I would expect the number one consideration to be avoiding collisions, followed by clarity (perhaps stating the obvious).

I like the prefix and the simple number - not more than six digits, four is nice.

I do not think we should use DOTNET for everything. It seems doomed to collisions.

@nguerrera
Copy link
Contributor

So it turns out that the extensions and the sdk proper share a resx file and can issue the same messages. As such, it would actually be easier for them to share a prefix that we just increment whenever we add a new one regardless if extensions or Microsoft.NET.Sdk or both issue it. NETSDK isn't entirely accurate for both, but that's probably a technicality that doesn't really impact any user experience.

My proposal is now:

NETSDK1001
NETSDK1002
etc.

For any error or warning that originates from the source code in this repo.

@nguerrera
Copy link
Contributor

Fixed by #2269

JL03-Yue pushed a commit that referenced this issue Mar 19, 2024
* Update dependencies from https://github.com/dotnet/roslyn build 20240104.13

Microsoft.CodeAnalysis
 From Version 4.9.0-3.23629.3 -> To Version 4.9.0-3.24054.13

* Allow SCI and SRM as prebuilts

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Matt Thalman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants