Skip to content

Commit 59a2796

Browse files
committed
benchmark error repro
1 parent 0a0cf1e commit 59a2796

File tree

12 files changed

+13
-29
lines changed

12 files changed

+13
-29
lines changed

benchmarks/HydraScript.Benchmarks/GeneratedRegexContainer.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

benchmarks/HydraScript.Benchmarks/HydraScript.Benchmarks.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<ProjectReference Include="..\..\src\Domain\HydraScript.Domain.Constants\HydraScript.Domain.Constants.csproj"
9-
OutputItemType="Analyzer" SetTargetFramework="TargetFramework=netstandard2.0"/>
10-
<ProjectReference Include="..\..\src\Infrastructure\HydraScript.Infrastructure.LexerRegexGenerator\HydraScript.Infrastructure.LexerRegexGenerator.csproj"
11-
OutputItemType="Analyzer"
12-
ReferenceOutputAssembly="false"
13-
SetTargetFramework="TargetFramework=netstandard2.0"/>
148
<ProjectReference Include="..\..\src\Infrastructure\HydraScript.Infrastructure\HydraScript.Infrastructure.csproj"/>
159
</ItemGroup>
1610

benchmarks/HydraScript.Benchmarks/InvokeBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void GlobalSetup()
2727
{
2828
_provider = new ServiceCollection()
2929
.AddLogging(x => x.ClearProviders().AddProvider(NullLoggerProvider.Instance))
30-
.AddDomain<GeneratedRegexContainer>()
30+
.AddDomain()
3131
.AddApplication()
3232
.AddInfrastructure(dump: false, _updatableFileOptions.Value)
3333
.AddSingleton<IOptions<FileInfo>>(_updatableFileOptions)

src/HydraScript/HydraScript.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<ProjectReference Include="..\Infrastructure\HydraScript.Infrastructure.LexerRegexGenerator\HydraScript.Infrastructure.LexerRegexGenerator.csproj"
18-
OutputItemType="Analyzer"
19-
ReferenceOutputAssembly="false"
20-
PrivateAssets="all" />
2117
<ProjectReference Include="..\Infrastructure\HydraScript.Infrastructure\HydraScript.Infrastructure.csproj" />
2218
</ItemGroup>
2319

src/HydraScript/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private static ExecuteCommand GetCommand()
2828
private static ServiceProvider GetServiceProvider(FileInfo fileInfo, bool dump) =>
2929
new ServiceCollection()
3030
.AddLogging(c => c.ClearProviders().AddZLoggerConsole())
31-
.AddDomain<GeneratedRegexContainer>()
31+
.AddDomain()
3232
.AddApplication()
3333
.AddInfrastructure(dump, fileInfo)
3434
.BuildServiceProvider();

src/HydraScript/GeneratedRegexContainer.cs renamed to src/Infrastructure/HydraScript.Infrastructure/GeneratedRegexContainer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
using System.Text.RegularExpressions;
22
using HydraScript.Domain.FrontEnd.Lexer;
3-
using HydraScript.Infrastructure;
43

5-
namespace HydraScript;
4+
namespace HydraScript.Infrastructure;
65

76
public sealed partial class GeneratedRegexContainer : IGeneratedRegexContainer
87
{

src/Infrastructure/HydraScript.Infrastructure/HydraScript.Infrastructure.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<ItemGroup>
4+
<ProjectReference Include="..\HydraScript.Infrastructure.LexerRegexGenerator\HydraScript.Infrastructure.LexerRegexGenerator.csproj"
5+
OutputItemType="Analyzer"
6+
ReferenceOutputAssembly="false"
7+
PrivateAssets="all" />
48
<ProjectReference Include="..\..\Application\HydraScript.Application.CodeGeneration\HydraScript.Application.CodeGeneration.csproj" />
59
<ProjectReference Include="..\..\Application\HydraScript.Application.StaticAnalysis\HydraScript.Application.StaticAnalysis.csproj" />
610
</ItemGroup>

src/Infrastructure/HydraScript.Infrastructure/ServiceCollectionExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ namespace HydraScript.Infrastructure;
1515

1616
public static class ServiceCollectionExtensions
1717
{
18-
public static IServiceCollection AddDomain<TGeneratedRegexContainer>(this IServiceCollection services)
19-
where TGeneratedRegexContainer : class, IGeneratedRegexContainer
18+
public static IServiceCollection AddDomain(this IServiceCollection services)
2019
{
2120
services.AddSingleton<ITextCoordinateSystemComputer, TextCoordinateSystemComputer>();
2221
services.AddSingleton<ITokenTypesProvider, TokenTypesProvider>();
23-
services.AddSingleton<IStructure, Structure<TGeneratedRegexContainer>>();
22+
services.AddSingleton<IStructure, Structure<GeneratedRegexContainer>>();
2423
services.AddSingleton<ILexer, RegexLexer>();
2524
services.AddSingleton<IParser, TopDownParser>();
2625

tests/HydraScript.IntegrationTests/TestHostFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void Dispose()
3636
public Runner GetRunner(Options options, Action<IServiceCollection>? configureTestServices = null)
3737
{
3838
var services = new ServiceCollection()
39-
.AddDomain<GeneratedRegexContainer>()
39+
.AddDomain()
4040
.AddApplication()
4141
.AddInfrastructure(options.Dump, new FileInfo(options.FileName));
4242
const string serilogTemplate = "[{Timestamp:HH:mm:ss} {Level:u} [{SourceContext}]]{NewLine}{Message:lj} {Exception}";

tests/HydraScript.UnitTests/Domain/FrontEnd/RegexLexerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using HydraScript.Domain.FrontEnd.Lexer;
44
using HydraScript.Domain.FrontEnd.Lexer.Impl;
55
using HydraScript.Domain.FrontEnd.Lexer.TokenTypes;
6+
using HydraScript.Infrastructure;
67

78
namespace HydraScript.UnitTests.Domain.FrontEnd;
89

0 commit comments

Comments
 (0)