Skip to content

Commit

Permalink
Use List<string> for excludes (#6598)
Browse files Browse the repository at this point in the history
Fixes AB#1344683
  • Loading branch information
sharwell authored Jun 25, 2021
1 parent 9fc3fa5 commit e9593e8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Build/Evaluation/LazyItemEvaluator.IncludeOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class IncludeOperation : LazyItemOperation

readonly string _rootDirectory;

readonly ImmutableList<string> _excludes;
// TODO: Convert this to ImmutableSegmentedList<T> once available.
// https://github.com/dotnet/msbuild/issues/6601
readonly List<string> _excludes;

readonly ImmutableList<ProjectMetadataElement> _metadata;

Expand All @@ -31,7 +33,7 @@ public IncludeOperation(IncludeOperationBuilder builder, LazyItemEvaluator<P, I,
_elementOrder = builder.ElementOrder;
_rootDirectory = builder.RootDirectory;

_excludes = builder.Excludes.ToImmutable();
_excludes = builder.Excludes;
_metadata = builder.Metadata.ToImmutable();
}

Expand Down Expand Up @@ -167,7 +169,9 @@ class IncludeOperationBuilder : OperationBuilderWithMetadata
public int ElementOrder { get; set; }
public string RootDirectory { get; set; }

public ImmutableList<string>.Builder Excludes { get; } = ImmutableList.CreateBuilder<string>();
// TODO: Convert this to ImmutableSegmentedList<T>.Builder once available.
// https://github.com/dotnet/msbuild/issues/6601
public List<string> Excludes { get; } = new();

public IncludeOperationBuilder(ProjectItemElement itemElement, bool conditionResult) : base(itemElement, conditionResult)
{
Expand Down

0 comments on commit e9593e8

Please sign in to comment.