Skip to content

Make target items paths crossplatform#8277

Merged
JanKrivanek merged 2 commits intodotnet:mainfrom
JanKrivanek:proto/item-include-paths-fix
Jan 4, 2023
Merged

Make target items paths crossplatform#8277
JanKrivanek merged 2 commits intodotnet:mainfrom
JanKrivanek:proto/item-include-paths-fix

Conversation

@JanKrivanek
Copy link
Member

@JanKrivanek JanKrivanek commented Jan 3, 2023

Fixes #8188

Context

Items Exclusion filtering for items defined within targets is not using same filtering logic (https://github.com/dotnet/msbuild/blob/main/src/Build/BackEnd/Components/RequestBuilder/IntrinsicTasks/ItemGroupIntrinsicTask.cs#L483-L486) as items defined outside of targets (https://github.com/dotnet/msbuild/blob/main/src/Build/Evaluation/LazyItemEvaluator.IncludeOperation.cs#L89-L93). There is a discrepancy in cross-platform paths mix-matchingh.

Changes Made

Rather targeted isolated change the build time exclusion evaluation (for items defined within targets) is comparing on normalized paths.
It's a question whether we rather do not want to try to extract and unify the items expansion logic - that might however be a large spanning change with notrivial regression risk.

Testing

Targetted unit test added ilustrating the issue.

@JanKrivanek JanKrivanek self-assigned this Jan 4, 2023
@JanKrivanek JanKrivanek marked this pull request as ready for review January 4, 2023 07:02
@JanKrivanek JanKrivanek merged commit 762ae6c into dotnet:main Jan 4, 2023
@JanKrivanek JanKrivanek deleted the proto/item-include-paths-fix branch January 4, 2023 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include Exclude doesn't seem to work Xplat when path separator is / (forward slash)

3 participants