Repository navigation
Add every benchmark and example to All.slnx and fix their builds - #10848
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified, and the listed project, dependency, build, analyzer, and formatting fixes address the reported integration problems.
No open issues 🎉
What changed in this PR
This PR expands src/All.slnx to include all benchmark and example projects under src/ and fixes the associated build, dependency, analyzer, and formatting issues.
Changes:
- Adds all previously missing benchmark and example projects to
src/All.slnx. - Corrects project references, API usage, package-version conflicts, and source-level build issues.
- Removes stale generated files and applies naming, formatting, and unused-code cleanup across Mocha and Hot Chocolate projects.
| File | Description |
|---|---|
| src/Mocha/src/Mocha.Analyzers/Utils/CodeWriterExtensions.cs | Removes an unnecessary null-forgiving operator. |
| src/Mocha/src/Examples/Sagas/ParallelSaga/ParallelSaga.cs | Removes an unused namespace import. |
| src/Mocha/src/Examples/Middleware/UnitOfWork/UnitOfWork.cs | Removes unused imports and names an unused middleware parameter. |
| src/Mocha/src/Examples/Middleware/CustomMiddleware/CustomMiddleware.cs | Removes unused imports and names an unused middleware parameter. |
| src/Mocha/src/Examples/MediatorShowcase/Handlers.cs | Applies static-field naming conventions. |
| src/Mocha/src/Examples/MediatorShowcase/Generated/Mocha.Analyzers/Mocha.Analyzers.MediatorGenerator/MediatorShowcaseMediatorBuilderExtensions._5hYhW_IBO7W3L_MSoxCPw.g.cs | Removes a committed generated mediator source file. |
| src/Mocha/src/Examples/MediatorShowcase/Generated/Microsoft.AspNetCore.App.SourceGenerators/Microsoft.AspNetCore.SourceGenerators.PublicProgramSourceGenerator/PublicTopLevelProgram.Generated.g.cs | Removes a committed generated program source file. |
| src/Mocha/src/Examples/HandlersAndConsumers/CustomConsumer/CustomConsumer.cs | Removes an unused namespace import. |
| src/Mocha/examples/ExceptionPolicies/Program.cs | Updates the example to use AddResilience. |
| src/Mocha/examples/ExceptionPolicies/Handlers/Handlers.cs | Applies static-field naming conventions. |
| src/Mocha/examples/AzureServiceBusTransport/AzureServiceBusTransport.ShippingService/Program.cs | Removes unused namespace imports. |
| src/Mocha/examples/AzureServiceBusTransport/AzureServiceBusTransport.ShippingService/Handlers/PrepareShipmentRequestHandler.cs | Applies static-field naming conventions. |
| src/Mocha/examples/AzureServiceBusTransport/AzureServiceBusTransport.ShippingService/Handlers/OrderPlacedEventHandler.cs | Applies static-field naming conventions. |
| src/Mocha/examples/AzureServiceBusTransport/AzureServiceBusTransport.OrderService/Program.cs | Removes an unused namespace import. |
| src/Mocha/examples/AzureServiceBusTransport/AzureServiceBusTransport.OrderService/OrderSimulatorWorker.cs | Applies static-field naming conventions. |
| src/Mocha/examples/AzureServiceBusTransport/AzureServiceBusTransport.NotificationService/Program.cs | Removes an unused namespace import. |
| src/Mocha/examples/AzureServiceBusTransport/AzureServiceBusTransport.AppHost/AppHost.cs | Removes unused namespace imports. |
| src/Mocha/benchmarks/PostgresBenchmark/PostgresBenchmark.csproj | Corrects project-reference paths to the Mocha projects. |
| src/Mocha/benchmarks/PostgresBenchmark/PostgresBenchmark.cs | Simplifies asynchronous benchmark callbacks. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Mocha.Mediator.Benchmarks.csproj | Removes conflicting Microsoft.Extensions package pins and warning suppressions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/WolverineMessages.cs | Applies static-field and unused-parameter naming conventions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/SwitchMediatorMessages.cs | Applies static-field naming conventions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/PipelineBenchmarks.cs | Adds required braces around conditional returns. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/NotificationBenchmarks.cs | Adds required braces around conditional returns. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/Messages.cs | Applies static-field naming and formatting conventions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/MediatorSgMessages.cs | Applies static-field naming and formatting conventions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/MassTransitMessages.cs | Applies static-field naming conventions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/ImmediateHandlersMessages.cs | Applies static-field and unused-parameter naming conventions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/FullPipelineMessages.cs | Applies static-field and unused-parameter naming conventions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/FullPipelineBenchmarks.cs | Adds required braces around conditional returns. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/ConcurrentPipelineBenchmarks.cs | Removes unused benchmark setup and applies formatting fixes. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/CommandBenchmarks.cs | Adds required braces around conditional returns. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Messaging/BenchmarkSetup.cs | Removes an unused namespace import. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Internal/PoolingBenchmarks.cs | Applies static-field naming conventions to the thread-static cache. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Internal/PipelinePatternBenchmarks.cs | Removes an unused import and applies naming conventions. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Internal/LookupBenchmarks.cs | Applies naming conventions and simplifies service-provider usage. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Internal/DispatchPatternBenchmarks.cs | Applies naming, brace, formatting, and dispatch-pattern changes. |
| src/HotChocolate/Language/benchmarks/Language.Benchmarks/UnescapeBenchmarks.cs | Removes an unused namespace import. |
| src/HotChocolate/Language/benchmarks/Language.Benchmarks/ReaderBenchmarks.cs | Removes an unused namespace import. |
| src/HotChocolate/Language/benchmarks/Language.Benchmarks/ParserBenchmarks.cs | Removes an unused namespace import. |
| src/HotChocolate/Core/benchmarks/Execution.Abstractions.Benchmarks/NarrowConditionCachedExecutionBenchmark.cs | Removes unused namespace imports. |
| src/All.slnx | Adds all previously omitted benchmark and example projects to the solution. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/All.slnxnow lists every project undersrc/, including the 42 benchmark and example projects it was missing, sodotnet build src/All.slnxand solution-widedotnet formatruns cover them. The CI test matrix takes only the*.Tests.csprojentries, so CI builds the same projects as before.var,s_prefixes). Beyond those,PostgresBenchmarkreferences the Mocha projects at their actual paths, theExceptionPoliciesexample callsAddResilience, and handler parameters that a framework requires but the benchmark doesn't use are named_and__.Mocha.Mediator.Benchmarksno longer pinsMicrosoft.Extensions.DependencyInjection,ObjectPool, andHostingto 10.0.0. On net11.0 the pins conflicted with the 11.0 versionsMocha.Mediatordepends on (MSB3277), and the benchmarks failed at runtime becauseMicrosoft.Extensions.ObjectPool11.0 was missing. The NU1605 and NU1608 suppressions go with them.MediatorShowcase/Generated/are removed, becausesrc/Mocha/src/.gitignorealready ignores that folder and every build rewrote them.Mocha.Analyzersalso drops an unnecessary!from code that only Release builds compile.Running the BenchmarkDotNet benchmarks on net11.0 needs a BenchmarkDotNet change and is left for a follow-up.
Test plan
dotnet build src/All.slnxpasses with no warnings.src/All.slnxthat reuses a restore made without a configuration passes, so the analyzer config also covers code that only Release builds compile.Mocha.Mediator.Benchmarkscommand, Wolverine, and Immediate.Handlers benchmarks ran under a dry job with BenchmarkDotNet 0.16.0-preview.2 swapped in for the run, because 0.15.8 cannot run net11.0 jobs. Wolverine compiled its handlers at runtime, so the real libraries ran.