Skip to content

Commit

Permalink
ensure consistent tfm value
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Dec 20, 2024
1 parent 0095890 commit b54ecc1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ internal static async Task<ImmutableArray<Dependency>> FindUpdatedDependenciesAs
.SelectMany(p => p.TargetFrameworks)
.Select(NuGetFramework.Parse)
.Distinct()
.Select(f => f.GetShortFolderName())
.ToImmutableArray();

// When updating peer dependencies, we only need to consider top-level dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ namespace NuGetUpdater.Core.Analyze;

internal static class DependencyFinder
{
public static async Task<ImmutableDictionary<NuGetFramework, ImmutableArray<Dependency>>> GetDependenciesAsync(
public static async Task<ImmutableDictionary<string, ImmutableArray<Dependency>>> GetDependenciesAsync(
string repoRoot,
string projectPath,
IEnumerable<NuGetFramework> frameworks,
IEnumerable<string> frameworks,
ImmutableHashSet<string> packageIds,
NuGetVersion version,
NuGetContext nugetContext,
Expand All @@ -23,13 +23,13 @@ public static async Task<ImmutableDictionary<NuGetFramework, ImmutableArray<Depe
.Select(id => new Dependency(id, versionString, DependencyType.Unknown))
.ToImmutableArray();

var result = ImmutableDictionary.CreateBuilder<NuGetFramework, ImmutableArray<Dependency>>();
var result = ImmutableDictionary.CreateBuilder<string, ImmutableArray<Dependency>>();
foreach (var framework in frameworks)
{
var dependencies = await MSBuildHelper.GetAllPackageDependenciesAsync(
repoRoot,
projectPath,
framework.ToString(),
framework,
packages,
experimentsManager,
logger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

internal static class Extensions
{
public static ImmutableArray<Dependency> GetDependencies(this ImmutableDictionary<NuGetFramework, ImmutableArray<Dependency>> dependenciesByTfm)
public static ImmutableArray<Dependency> GetDependencies(this ImmutableDictionary<string, ImmutableArray<Dependency>> dependenciesByTfm)
{
Dictionary<string, Dependency> dependencies = [];
foreach (var (_framework, dependenciesForTfm) in dependenciesByTfm)
Expand Down

0 comments on commit b54ecc1

Please sign in to comment.