Skip to content

Conversation

mthalman
Copy link
Member

When using the latest build of .NET 8 Preview 4 SDK to build the aspnetcore repo, it results in the following analyzer error:

/repos/dotnet/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-jwts/src/Commands/ListCommand.cs(55,45): error IDE0059: Unnecessary assignment of a value to 'jwts' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059) [/repos/dotnet/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj]

This was caught by the Source-build bootstrapping build workflow which uses a source-built version of the latest SDK to build the product's repos.

Fixed by removing the unused variable.

@ghost ghost added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Apr 27, 2023
Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

cc @captainsafia we should have these warnings turned on in our build too.

@davidfowl davidfowl merged commit ab1bfa7 into dotnet:main Apr 28, 2023
@ghost ghost added this to the 8.0-preview5 milestone Apr 28, 2023
@mitchdenny
Copy link
Member

mitchdenny commented Apr 28, 2023

I think this actually broke the build. The variable was used - I think this might have just been a sequencing issue with the SDK update PR when it came in. If you look at the source on main the jwts variable is used:

reporter.Output(JsonSerializer.Serialize(jwts, new JsonSerializerOptions { WriteIndented = true }));

That code came into being in the Update SDK PR that was merged today.

@ghost
Copy link

ghost commented Apr 28, 2023

Hi @mitchdenny. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@davidfowl
Copy link
Member

oops the build was green no?

davidfowl added a commit that referenced this pull request Apr 28, 2023
@davidfowl
Copy link
Member

#47944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants