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

[Feature Request]: Add JoinItems task #8791

Open
tmat opened this issue May 22, 2023 · 2 comments
Open

[Feature Request]: Add JoinItems task #8791

tmat opened this issue May 22, 2023 · 2 comments
Labels
backlog Feature Request gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you triaged

Comments

@tmat
Copy link
Member

tmat commented May 22, 2023

Summary

Add JoinItems task that's currently defined in .NET SDK to msbuild as an officially supported task.

Background and Motivation

Joining items is generally useful operation that should be provided by msbuild.

Proposed Feature

The current implementation as provided in .NET SDK, maybe add extra parameters to customize the join (inner join vs left/right outer join).

Alternative Designs

No response

@tmat tmat added Feature Request needs-triage Have yet to determine what bucket this goes in. labels May 22, 2023
@AR-May AR-May added gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you and removed needs-triage Have yet to determine what bucket this goes in. labels May 23, 2023
@AR-May
Copy link
Member

AR-May commented May 23, 2023

Team triage: we want to gather feedback on this proposal.

@AR-May AR-May added the backlog label May 23, 2023
@jrdodds
Copy link
Contributor

jrdodds commented May 23, 2023

For any task that will be a 'public' task, the following questions should probably have answers.

  • Is the task providing something that is not otherwise available?
  • Is the task general-purpose?

A task is not needed to perform many types of joins with Item collections.

For me, this raises the question - why does this task exist? What was the purpose and motivation for creating the JoinItems task originally? I hope that it is not the case that a task was written instead of understanding how to join in MSBuild.

If the functionality of JoinItems is redundant, that doesn't necessarily break the case for adding the task. Performance and/or simplicity have value.

The FormatUrl task is not a general purpose task. I'm guessing FormatUrl was created for a specific internal need. In its current form, it should not have been exposed as a 'public' task. That can't be undone at this point. (The lack of a true general-purpose task for URIs is part of why I proposed #8613.) But the situation of FormatUrl should not be repeated.

From my own quick review, JoinItems seems general-purpose and would not create an issue like FormatUrl.

Independently I have noodled with creating a similar task wrapping IEnumerable<ITaskItem>.Join() and IEnumerable<ITaskItem>Group.Join(). I can share details and code if there is interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Feature Request gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you triaged
Projects
None yet
Development

No branches or pull requests

4 participants