Skip to content

Fix for issue #2864 - #2865

Merged
timcassell merged 3 commits into
dotnet:masterfrom
silkfire:issue-2864
Nov 15, 2025
Merged

timcassell merged 3 commits into
dotnet:masterfrom
silkfire:issue-2864

Conversation

@silkfire

Copy link
Copy Markdown
Contributor

No description provided.

@timcassell

Copy link
Copy Markdown
Collaborator

Thanks @silkfire, I'll look more closely later tonight. For now can you please fix the formatting to match our left-aligned convention?

@silkfire

Copy link
Copy Markdown
Contributor Author

Is there some script I can run to do that? ReSharper formats things differently.

@timcassell

Copy link
Copy Markdown
Collaborator

I'm not sure, when I format the whole file in VS it ignores some newline alignments like yours, but when I just press enter it does the right thing by default.

@timcassell timcassell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the quick fix @silkfire!

@timcassell
timcassell merged commit fcb6d3f into dotnet:master Nov 15, 2025
@silkfire
silkfire deleted the issue-2864 branch November 15, 2025 13:18
@timcassell

Copy link
Copy Markdown
Collaborator

@silkfire I just pulled latest master and tried to build the sln locally with the new dotnet 10 sdk and I'm getting errors (apparently they don't manifest with the dotnet 8 sdk we use in the CI).

  BenchmarkDotNet.IntegrationTests net462 failed with 3 error(s) (1.8s)
    C:\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests\ArgumentsTests.cs(441,24): error BDN1502: Unexpected type for argument value 'expectedString'. Expected 'System.ReadOnlySpan<char>' but found 'string'.
    C:\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests\ArgumentsTests.cs(776,55): error BDN1502: Unexpected type for argument value '(SomeEnum)(-100)'. Expected 'BenchmarkDotNet.IntegrationTests.ArgumentsTests.WithUndefinedEnumValue.SomeEnum' but found 'BenchmarkDotNet.IntegrationTests.ArgumentsTests.WithUndefinedEnumValue.SomeEnum'.
    C:\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests\ParamsTests.cs(172,24): error BDN1502: Unexpected type for argument value 'Json'. Expected 'string' but found 'string'.
  BenchmarkDotNet.Exporters.Plotting.Tests net8.0 succeeded (1.9s) → tests\BenchmarkDotNet.Exporters.Plotting.Tests\bin\Debug\net8.0\BenchmarkDotNet.Exporters.Plotting.Tests.dll
  BenchmarkDotNet.IntegrationTests net8.0 failed with 2 error(s) (2.0s)
    C:\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests\ArgumentsTests.cs(776,55): error BDN1502: Unexpected type for argument value '(SomeEnum)(-100)'. Expected 'BenchmarkDotNet.IntegrationTests.ArgumentsTests.WithUndefinedEnumValue.SomeEnum' but found 'BenchmarkDotNet.IntegrationTests.ArgumentsTests.WithUndefinedEnumValue.SomeEnum'.
    C:\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests\ParamsTests.cs(172,24): error BDN1502: Unexpected type for argument value 'Json'. Expected 'string' but found 'string'.

Can you PTAL?

@timcassell

Copy link
Copy Markdown
Collaborator

I added multi-targeting in #2866, and now the errors manifest in the CI. I conditionally compiled out the string -> ReadOnlySpan<char> error (as it's expected to trigger in net462 anyway), but I'm not sure how to fix the other errors.

@timcassell

Copy link
Copy Markdown
Collaborator

I figured it out. Switched to using semantic model instead of syntax model.

@silkfire

Copy link
Copy Markdown
Contributor Author

Do you have a branch I can test with? Can we create a test for this or tweak any of the existing ones?

@timcassell

Copy link
Copy Markdown
Collaborator

Yes my branch in #2866. Still WIP, but you can play with it.

@silkfire

Copy link
Copy Markdown
Contributor Author

Added some comments to the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.15.7 throws ArgumentException analyzing code causing build to fail with AD0001 error

2 participants