Skip to content

Commit e9dc397

Browse files
Update deps
1 parent dcd3d37 commit e9dc397

File tree

11 files changed

+65
-53
lines changed

11 files changed

+65
-53
lines changed

.aiignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# An .aiignore file follows the same syntax as a .gitignore file.
2+
# .gitignore documentation: https://git-scm.com/docs/gitignore
3+
4+
# you can ignore files
5+
.DS_Store
6+
*.log
7+
*.tmp
8+
9+
# or folders
10+
dist/
11+
build/
12+
out/

Build/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
{
171171
switch (coveragePercentage)
172172
{
173-
case < 75:
173+
case < 70:
174174
Error($"The coverage percentage {coveragePercentage} is too low.");
175175
break;
176176

CSharpInteractive.Tests/CSharpInteractive.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1212
<PackageReference Include="Moq" Version="4.20.72" />
13-
<PackageReference Include="Pure.DI" Version="2.1.60">
13+
<PackageReference Include="Pure.DI" Version="2.1.68">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>

CSharpInteractive/CSharpInteractive.Tool.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<ItemGroup>
3232
<!--<CompilerVisibleProperty Include="PureDIProfilePath" />-->
3333
<PackageReference Include="Microsoft.CodeAnalysis.Scripting" Version="4.12.0" />
34-
<PackageReference Include="Pure.DI" Version="2.1.60">
34+
<PackageReference Include="Pure.DI" Version="2.1.68">
3535
<PrivateAssets>all</PrivateAssets>
3636
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3737
</PackageReference>
@@ -66,7 +66,7 @@
6666
</When>
6767
<Otherwise>
6868
<ItemGroup>
69-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
69+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
7070
<PackageReference Include="NuGet.Build.Tasks" Version="6.12.1"/>
7171
<PackageReference Include="Microsoft.Build.Framework" Version="17.12.6" IncludeAssets="all"/>
7272
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.12.6" IncludeAssets="all"/>

CSharpInteractive/CSharpInteractive.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<ItemGroup>
2424
<PackageReference Include="Microsoft.CodeAnalysis.Scripting" Version="4.12.0" />
25-
<PackageReference Include="Pure.DI" Version="2.1.60">
25+
<PackageReference Include="Pure.DI" Version="2.1.68">
2626
<PrivateAssets>all</PrivateAssets>
2727
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2828
</PackageReference>
@@ -57,7 +57,7 @@
5757
</When>
5858
<Otherwise>
5959
<ItemGroup>
60-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
60+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
6161
<PackageReference Include="NuGet.Build.Tasks" Version="6.12.1"/>
6262
<PackageReference Include="Microsoft.Build.Framework" Version="17.12.6" IncludeAssets="all"/>
6363
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.12.6" IncludeAssets="all"/>

CSharpInteractive/Composition.cs

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ private static void Setup()
3636
#if TOOL
3737
.DefaultLifetime(Transient)
3838
.Bind().To(_ => RunningMode.Tool)
39+
.Bind("RuntimePathTag").To(_ => Path.GetDirectoryName(typeof(object).Assembly.Location) ?? string.Empty)
3940
.Bind().To(ctx =>
4041
{
4142
ctx.Inject<ISettings>(out var settings);
@@ -55,6 +56,14 @@ private static void Setup()
5556
.Bind().To(_ => (WarningLevel)ScriptOptions.Default.WarningLevel)
5657
.Bind().To(_ => ScriptOptions.Default.CheckOverflow ? CheckOverflow.On : CheckOverflow.Off)
5758
.Bind().To(_ => ScriptOptions.Default.AllowUnsafe ? AllowUnsafe.On : AllowUnsafe.Off)
59+
.Bind().To<ScriptCommandFactory>()
60+
.Bind().To<SourceResolver>()
61+
.Bind().To<MetadataResolver>()
62+
.Bind().To<AssembliesProvider>()
63+
.Bind(Unique).To<ConfigurableScriptOptionsFactory>()
64+
.Bind().To<ScriptSubmissionAnalyzer>()
65+
.Bind(Unique).To<HelpCommandFactory>()
66+
.Bind(Unique).To<HelpCommandRunner>()
5867

5968
.DefaultLifetime(Singleton)
6069
.Bind(Unique).To<ExitManager>()
@@ -64,6 +73,41 @@ private static void Setup()
6473
.Bind().To<CommandSource>()
6574
.Bind().To<Setting<TTE>>()
6675
.Bind(Unique).Bind<IReferenceRegistry>().To<ReferencesScriptOptionsFactory>()
76+
.Bind(Unique).To<CSharpScriptCommandRunner>()
77+
.Bind(Unique).To<SettingCommandFactory<VerbosityLevel>>()
78+
.Bind(Unique).To<SettingCommandRunner<VerbosityLevel>>()
79+
.Bind(Unique).To<AddNuGetReferenceCommandFactory>()
80+
.Bind(Unique).To<AddNuGetReferenceCommandRunner>()
81+
.Bind().To<CommandsRunner>()
82+
.Bind().To<CodeSourceCommandFactory>()
83+
.Bind().To<CSharpScriptRunner>()
84+
.Bind("LineCodeTag").To<LineCodeSource>()
85+
.Bind().To<NuGetReferenceResolver>()
86+
.Bind().To<ScriptContentReplacer>()
87+
.Bind(Unique).To<AssembliesScriptOptionsProvider>()
88+
.Bind(Unique).To<SourceFileScriptOptionsFactory>()
89+
.Bind(Unique).To<MetadataResolverOptionsFactory>()
90+
.Bind(Unique).To<ImportsOptionsFactory>()
91+
.Bind(Unique).To<SettingCommandFactory<LanguageVersion>>()
92+
.Bind(Unique).To<SettingCommandRunner<LanguageVersion>>()
93+
.Bind(Unique).To<SettingCommandFactory<OptimizationLevel>>()
94+
.Bind(Unique).To<SettingCommandRunner<OptimizationLevel>>()
95+
.Bind(Unique).To<SettingCommandFactory<WarningLevel>>()
96+
.Bind(Unique).To<SettingCommandRunner<WarningLevel>>()
97+
.Bind(Unique).To<SettingCommandFactory<CheckOverflow>>()
98+
.Bind(Unique).To<SettingCommandRunner<CheckOverflow>>()
99+
.Bind(Unique).To<SettingCommandFactory<AllowUnsafe>>()
100+
.Bind(Unique).To<SettingCommandRunner<AllowUnsafe>>()
101+
.Bind(Unique).To<SettingCommandFactory<NuGetRestoreSetting>>()
102+
.Bind(Unique).To<SettingCommandRunner<NuGetRestoreSetting>>()
103+
104+
.DefaultLifetime(PerBlock)
105+
.Bind().To<TextReplacer>()
106+
.Bind().To<RuntimeExplorer>()
107+
.Bind().To<ExitCodeParser>()
108+
.Bind().To<StringService>()
109+
.Bind().To<DiagnosticsPresenter>()
110+
.Bind().To<ScriptStatePresenter>()
67111
#endif
68112
#if APPLICATION
69113
.Bind().As(Transient).To(_ => RunningMode.Application)
@@ -72,24 +116,15 @@ private static void Setup()
72116
.Bind().To(_ => Now)
73117
.Bind().To(_ => typeof(Composition).Assembly)
74118
.Bind().To(_ => new CSharpParseOptions().LanguageVersion)
75-
.Bind(RuntimePathTag).To(_ => Path.GetDirectoryName(typeof(object).Assembly.Location) ?? string.Empty)
76119
.Bind().To((CancellationTokenSource cancellationTokenSource) => cancellationTokenSource.Token)
77120
.Bind(TargetFrameworkMonikerTag).To((Assembly assembly) => assembly.GetCustomAttribute<System.Runtime.Versioning.TargetFrameworkAttribute>()?.FrameworkName ?? string.Empty)
78121
.Bind().To(_ => Process.GetCurrentProcess())
79122
.Bind(ModuleFileTag).To((Process process) => process.MainModule?.FileName ?? string.Empty)
80-
.Bind().To<ScriptCommandFactory>()
81123
.Bind().To<ReliableBuildContext>()
82124
.Bind().To<ProcessMonitor>()
83125
.Bind().To<ProcessManager>()
84126
.Bind(BaseTag).To<BuildContext>()
85127
.Bind().To(_ => MemoryPool<TT>.Shared)
86-
.Bind().To<SourceResolver>()
87-
.Bind().To<MetadataResolver>()
88-
.Bind().To<AssembliesProvider>()
89-
.Bind(Unique).To<ConfigurableScriptOptionsFactory>()
90-
.Bind().To<ScriptSubmissionAnalyzer>()
91-
.Bind(Unique).To<HelpCommandFactory>()
92-
.Bind(Unique).To<HelpCommandRunner>()
93128
.Bind().To<FilePathResolver>()
94129
.Bind().To<StartInfoFactory>()
95130

@@ -105,11 +140,8 @@ private static void Setup()
105140
.Bind(typeof(VerbosityLevel)).To<VerbosityLevelSettingDescription>()
106141
.Bind().To<MSBuildArgumentsTool>()
107142
.Bind().To<CommandLineParser>()
108-
.Bind().To<StringService>()
109143
.Bind().To<TracePresenter>()
110144
.Bind().To<StatisticsPresenter>()
111-
.Bind().To<DiagnosticsPresenter>()
112-
.Bind().To<ScriptStatePresenter>()
113145
.Bind().To<BuildEngine>()
114146
.Bind().To<NuGetRestoreService>()
115147
.Bind().To<NuGetLogger>()
@@ -124,11 +156,8 @@ private static void Setup()
124156
.Bind(CustomTag).To<CustomMessagesProcessor>()
125157
.Bind().To<TeamCityContext>()
126158
.Bind().To<SummaryPresenter>()
127-
.Bind().To<ExitCodeParser>()
128159
.Bind(BaseTag).To<ProcessRunner>()
129160
.Bind().To<ProcessResultHandler>()
130-
.Bind().To<TextReplacer>()
131-
.Bind().To<RuntimeExplorer>()
132161

133162
.DefaultLifetime(Singleton)
134163
.Bind().To<Root>()
@@ -151,11 +180,7 @@ private static void Setup()
151180
.Bind().To<Info>()
152181
.Bind().To<ConsoleSource>()
153182
.Bind(LoadFileCodeTag).To<LoadFileCodeSource>()
154-
.Bind(LineCodeTag).To<LineCodeSource>()
155183
.Bind().To<Statistics>()
156-
.Bind().To<CommandsRunner>()
157-
.Bind().To<CodeSourceCommandFactory>()
158-
.Bind().To<CSharpScriptRunner>()
159184
.Bind().To<TargetFrameworkMonikerParser>()
160185
.Bind().To<DockerSettings>()
161186
.Bind().To<ProcessOutputWriter>()
@@ -164,35 +189,12 @@ private static void Setup()
164189
.Bind().To<MessagesReader>()
165190
.Bind().To<PathResolverContext>()
166191
.Bind().To<ProcessInFlowRunner>()
167-
.Bind().To<NuGetReferenceResolver>()
168-
.Bind().To<ScriptContentReplacer>()
169-
.Bind(Unique).To<AssembliesScriptOptionsProvider>()
170-
.Bind(Unique).To<SourceFileScriptOptionsFactory>()
171-
.Bind(Unique).To<MetadataResolverOptionsFactory>()
172-
.Bind(Unique).To<ImportsOptionsFactory>()
173-
.Bind(Unique).To<SettingCommandFactory<LanguageVersion>>()
174-
.Bind(Unique).To<SettingCommandRunner<LanguageVersion>>()
175192
.Bind(Unique).As(PerBlock).To<LanguageVersionSettingDescription>()
176-
.Bind(Unique).To<SettingCommandFactory<OptimizationLevel>>()
177-
.Bind(Unique).To<SettingCommandRunner<OptimizationLevel>>()
178193
.Bind(Unique).As(PerBlock).To<OptimizationLevelSettingDescription>()
179-
.Bind(Unique).To<SettingCommandFactory<WarningLevel>>()
180-
.Bind(Unique).To<SettingCommandRunner<WarningLevel>>()
181194
.Bind(Unique).As(PerBlock).To<WarningLevelSettingDescription>()
182-
.Bind(Unique).To<SettingCommandFactory<CheckOverflow>>()
183-
.Bind(Unique).To<SettingCommandRunner<CheckOverflow>>()
184195
.Bind(Unique).As(PerBlock).To<CheckOverflowSettingDescription>()
185-
.Bind(Unique).To<SettingCommandFactory<AllowUnsafe>>()
186-
.Bind(Unique).To<SettingCommandRunner<AllowUnsafe>>()
187196
.Bind(Unique).As(PerBlock).To<AllowUnsafeSettingDescription>()
188-
.Bind(Unique).To<SettingCommandFactory<NuGetRestoreSetting>>()
189-
.Bind(Unique).To<SettingCommandRunner<NuGetRestoreSetting>>()
190197
.Bind(Unique).As(PerBlock).To<NuGetRestoreSettingDescription>()
191-
.Bind(Unique).To<CSharpScriptCommandRunner>()
192-
.Bind(Unique).To<SettingCommandFactory<VerbosityLevel>>()
193-
.Bind(Unique).To<SettingCommandRunner<VerbosityLevel>>()
194-
.Bind(Unique).To<AddNuGetReferenceCommandFactory>()
195-
.Bind(Unique).To<AddNuGetReferenceCommandRunner>()
196198
.Bind(BaseTag, AnsiTag).To<Properties>()
197199
.Bind(TeamCityTag).To<TeamCityProperties>()
198200
.Bind().To((ICISpecific<IProperties> properties) => properties.Instance)

CSharpInteractive/Core/RuntimeExplorer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace CSharpInteractive.Core;
66
using static Pure.DI.Tag;
77

88
internal class RuntimeExplorer(
9-
[Tag(RuntimePathTag)] string runtimePath,
9+
[Tag("RuntimePathTag")] string runtimePath,
1010
IFileSystem fileSystem) : IRuntimeExplorer
1111
{
1212
public bool TryFindRuntimeAssembly(string assemblyPath, [MaybeNullWhen(false)] out string runtimeAssemblyPath)

CSharpInteractive/Core/ScriptContentReplacer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal class ScriptContentReplacer(
1414
IFileSystem fileSystem,
1515
IUniqueNameGenerator uniqueNameGenerator,
1616
IEnvironment environment,
17-
[Tag(LineCodeTag)] Func<string, ICodeSource> codeSourceFactory)
17+
[Tag("LineCodeTag")] Func<string, ICodeSource> codeSourceFactory)
1818
: IScriptContentReplacer
1919
{
2020
[SuppressMessage("Performance", "CA1806:Do not ignore method results")]

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
43
<LangVersion>latest</LangVersion>
54
<Nullable>enable</Nullable>
65
<NoWarn>NETSDK1138;NETSDK1057;NETSDK1215;NU1605;NU5118;NU5100;NU5131;NU5104;NU5105;NU1902;NU1903;NU1904;CS2008;CS1591</NoWarn>

TestBuild/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
.DefaultLifetime(PerResolve)
1717
.Bind().To<RootCommand>()
18-
.Bind().To<Settings>()
1918

2019
.DefaultLifetime(PerBlock)
2120

0 commit comments

Comments
 (0)