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

Allow Remove item operation to match on specified metadata instead of just item identity #4997

Merged
merged 26 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
94e4bb8
Profile Update operations too
cdmihai Dec 13, 2019
cbcc7f7
Allow qualified metadata references in the Update item operation
cdmihai Dec 11, 2019
054dc81
Avoid double matching
cdmihai Dec 13, 2019
aa46e27
Avoid type checks by unifying type params P, I
cdmihai Dec 17, 2019
d420e43
Renames and formatting
cdmihai Dec 17, 2019
263af2b
Resharper fixes
cdmihai Dec 17, 2019
0a3fd78
Add escape hatch to return to old behavior
cdmihai Dec 17, 2019
292334c
remove unnecessary type check
cdmihai Dec 17, 2019
7aa753e
Add Remove with MatchOnMetadata
cdmihai Dec 19, 2019
9738d93
Adding match on metadata implementation for remove not under targets,…
sfoslund Jan 2, 2020
e8d60e3
Adding MatchOnMetadata support for references, responding to PR feedback
sfoslund Jan 3, 2020
604c723
Updating remove on metadata with style changes from PR feedback
sfoslund Jan 7, 2020
c027544
Updating remove on metadata implementation to disallow multiple metad…
sfoslund Jan 15, 2020
229ec05
PR feedback for remove on metadata: renaming tests, converting to linq
sfoslund Jan 16, 2020
56b27de
Adding MatchOnMetadataOptions, implemented CaseInsensitive option
sfoslund Jan 23, 2020
9fcbd61
Adding path like option for MatchOnMetadata implementation and tests,…
sfoslund Jan 23, 2020
1c3454f
Updating error message wording and matchOnMetadata path comparison
sfoslund Jan 30, 2020
f32a94f
Adding file system case sensitivity detection for path comparison
sfoslund Jan 31, 2020
cd322a9
Updating file path comparison tests for case sensitivity changes
sfoslund Feb 4, 2020
374b563
Updating path comparison to match BCL implementation
sfoslund Feb 4, 2020
d71fa0d
Converting all testing file case senstivity tests to FileUtilities im…
sfoslund Feb 5, 2020
16a9a27
Merge branch 'master' into removeOn
sfoslund Mar 10, 2020
e103559
PR feedback for remove on MatchOnMetadata
sfoslund Mar 16, 2020
e3dbc87
PR feedback for match on metadata
sfoslund Apr 14, 2020
f1c5d97
Merge branch 'master' into removeOn
sfoslund Apr 14, 2020
ea92b7f
MatchOnMetadata PR feedback
sfoslund Apr 17, 2020
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
18 changes: 18 additions & 0 deletions ref/Microsoft.Build/net/Microsoft.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ internal ProjectItemElement() { }
public Microsoft.Build.Construction.ElementLocation KeepDuplicatesLocation { get { throw null; } }
public string KeepMetadata { get { throw null; } set { } }
public Microsoft.Build.Construction.ElementLocation KeepMetadataLocation { get { throw null; } }
public string MatchOnMetadata { get { throw null; } set { } }
public Microsoft.Build.Construction.ElementLocation MatchOnMetadataLocation { get { throw null; } }
public string MatchOnMetadataOptions { get { throw null; } set { } }
public Microsoft.Build.Construction.ElementLocation MatchOnMetadataOptionsLocation { get { throw null; } }
public System.Collections.Generic.ICollection<Microsoft.Build.Construction.ProjectMetadataElement> Metadata { get { throw null; } }
public string Remove { get { throw null; } set { } }
public Microsoft.Build.Construction.ElementLocation RemoveLocation { get { throw null; } }
Expand Down Expand Up @@ -504,6 +508,16 @@ public GlobResult(Microsoft.Build.Construction.ProjectItemElement itemElement, S
public Microsoft.Build.Globbing.IMSBuildGlob MsBuildGlob { get { throw null; } set { } }
public System.Collections.Generic.IEnumerable<string> Removes { get { throw null; } set { } }
}
public static partial class MatchOnMetadataConstants
{
public const Microsoft.Build.Evaluation.MatchOnMetadataOptions MatchOnMetadataOptionsDefaultValue = Microsoft.Build.Evaluation.MatchOnMetadataOptions.CaseSensitive;
}
public enum MatchOnMetadataOptions
{
CaseInsensitive = 1,
CaseSensitive = 0,
PathLike = 2,
}
[System.FlagsAttribute]
public enum NewProjectFileOptions
{
Expand Down Expand Up @@ -1196,6 +1210,10 @@ internal ProjectItemGroupTaskItemInstance() { }
public string KeepMetadata { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation KeepMetadataLocation { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation Location { get { throw null; } }
public string MatchOnMetadata { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation MatchOnMetadataLocation { get { throw null; } }
public string MatchOnMetadataOptions { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation MatchOnMetadataOptionsLocation { get { throw null; } }
public System.Collections.Generic.ICollection<Microsoft.Build.Execution.ProjectItemGroupTaskMetadataInstance> Metadata { get { throw null; } }
public string Remove { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation RemoveLocation { get { throw null; } }
Expand Down
18 changes: 18 additions & 0 deletions ref/Microsoft.Build/netstandard/Microsoft.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ internal ProjectItemElement() { }
public Microsoft.Build.Construction.ElementLocation KeepDuplicatesLocation { get { throw null; } }
public string KeepMetadata { get { throw null; } set { } }
public Microsoft.Build.Construction.ElementLocation KeepMetadataLocation { get { throw null; } }
public string MatchOnMetadata { get { throw null; } set { } }
public Microsoft.Build.Construction.ElementLocation MatchOnMetadataLocation { get { throw null; } }
public string MatchOnMetadataOptions { get { throw null; } set { } }
public Microsoft.Build.Construction.ElementLocation MatchOnMetadataOptionsLocation { get { throw null; } }
public System.Collections.Generic.ICollection<Microsoft.Build.Construction.ProjectMetadataElement> Metadata { get { throw null; } }
public string Remove { get { throw null; } set { } }
public Microsoft.Build.Construction.ElementLocation RemoveLocation { get { throw null; } }
Expand Down Expand Up @@ -504,6 +508,16 @@ public GlobResult(Microsoft.Build.Construction.ProjectItemElement itemElement, S
public Microsoft.Build.Globbing.IMSBuildGlob MsBuildGlob { get { throw null; } set { } }
public System.Collections.Generic.IEnumerable<string> Removes { get { throw null; } set { } }
}
public static partial class MatchOnMetadataConstants
{
public const Microsoft.Build.Evaluation.MatchOnMetadataOptions MatchOnMetadataOptionsDefaultValue = Microsoft.Build.Evaluation.MatchOnMetadataOptions.CaseSensitive;
}
public enum MatchOnMetadataOptions
{
CaseInsensitive = 1,
CaseSensitive = 0,
PathLike = 2,
}
[System.FlagsAttribute]
public enum NewProjectFileOptions
{
Expand Down Expand Up @@ -1190,6 +1204,10 @@ internal ProjectItemGroupTaskItemInstance() { }
public string KeepMetadata { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation KeepMetadataLocation { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation Location { get { throw null; } }
public string MatchOnMetadata { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation MatchOnMetadataLocation { get { throw null; } }
public string MatchOnMetadataOptions { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation MatchOnMetadataOptionsLocation { get { throw null; } }
public System.Collections.Generic.ICollection<Microsoft.Build.Execution.ProjectItemGroupTaskMetadataInstance> Metadata { get { throw null; } }
public string Remove { get { throw null; } }
public Microsoft.Build.Construction.ElementLocation RemoveLocation { get { throw null; } }
Expand Down
Loading