Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update SDKs #1022

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: |
8.0.405
9.0.102
8.0.406
9.0.200
- uses: actions/[email protected]
with:
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/infer-sharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/[email protected]
with:
dotnet-version: '9.0.102'
dotnet-version: '9.0.200'
- uses: actions/[email protected]
- run: dotnet build
- run: ls -al
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/[email protected]
with:
dotnet-version: 9.0.102
dotnet-version: 9.0.200
- uses: actions/[email protected]
- run: dotnet build --configuration Release --nologo
- name: push
Expand Down
2 changes: 1 addition & 1 deletion Bullseye/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ public static class CommandLine
/// <param name="args">A list of argument strings.</param>
/// <returns>An instance of <see cref="Options"/> and a list of target names.</returns>
public static (IReadOnlyList<string> Targets, Options Options, IReadOnlyList<string> UnknownOptions, bool ShowHelp) Parse(IEnumerable<string> args) =>
ArgsParser.Parse(args.ToList());
ArgsParser.Parse([.. args]);
}
2 changes: 1 addition & 1 deletion Bullseye/Internal/Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class Target(string name, string description, IEnumerable<string> depende

public string Description { get; } = description;

public IReadOnlyCollection<string> Dependencies { get; } = dependencies.ToList();
public IReadOnlyCollection<string> Dependencies { get; } = [.. dependencies];

public virtual Task RunAsync(bool dryRun, bool parallel, Output output, Func<Exception, bool> messageOnly, IReadOnlyCollection<Target> dependencyPath) => output.Succeeded(this, dependencyPath, TimeSpan.Zero);

Expand Down
6 changes: 3 additions & 3 deletions Bullseye/Internal/TargetCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

namespace Bullseye.Internal;

public class TargetCollection : KeyedCollection<string, Target>
public class TargetCollection() : KeyedCollection<string, Target>(StringComparer.OrdinalIgnoreCase)
{
private static readonly Queue<Target> rootDependencyPath = new();

public TargetCollection() : base(StringComparer.OrdinalIgnoreCase) { }

protected override string GetKeyForItem(Target item) => item.Name;

public async Task RunAsync(
Expand Down Expand Up @@ -101,7 +99,9 @@ private async Task RunAsync(
if (output.Verbose)
{
// can switch to ImmutableQueue after moving to .NET 5+
#pragma warning disable IDE0306
dependencyPath = new Queue<Target>(dependencyPath);
#pragma warning restore IDE0306
dependencyPath.Enqueue(target);
}

Expand Down
2 changes: 1 addition & 1 deletion Bullseye/Internal/TargetCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private static async Task RunAsync(
return;
}

names = targets.Expand(names).ToList();
names = [.. targets.Expand(names)];

if (listTree || listDependencies || listInputs || listTargets)
{
Expand Down
8 changes: 4 additions & 4 deletions Bullseye/Targets.Instance.Run.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task RunAndExitAsync(
TextWriter? outputWriter = null,
TextWriter? diagnosticsWriter = null) =>
await this.targetCollection.RunAsync(
args.ToList(),
[.. args],
messageOnly ?? defaultMessageOnly,
getMessagePrefix ?? await GetDefaultGetMessagePrefix(diagnosticsWriter ?? Console.Error).Tax(),
outputWriter ?? Console.Out,
Expand Down Expand Up @@ -72,7 +72,7 @@ public async Task RunAndExitAsync(
TextWriter? outputWriter = null,
TextWriter? diagnosticsWriter = null) =>
await this.targetCollection.RunAsync(
targets.ToList(),
[.. targets],
options,
unknownOptions?.ToList() ?? defaultList,
showHelp,
Expand Down Expand Up @@ -107,7 +107,7 @@ public async Task RunWithoutExitingAsync(
TextWriter? outputWriter = null,
TextWriter? diagnosticsWriter = null) =>
await this.targetCollection.RunAsync(
args.ToList(),
[.. args],
messageOnly ?? defaultMessageOnly,
getMessagePrefix ?? await GetDefaultGetMessagePrefix(diagnosticsWriter ?? Console.Error).Tax(),
outputWriter ?? Console.Out,
Expand Down Expand Up @@ -145,7 +145,7 @@ public async Task RunWithoutExitingAsync(
TextWriter? outputWriter = null,
TextWriter? diagnosticsWriter = null) =>
await this.targetCollection.RunAsync(
targets.ToList(),
[.. targets],
options,
unknownOptions?.ToList() ?? defaultList,
showHelp,
Expand Down