-
Notifications
You must be signed in to change notification settings - Fork 354
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
Add support for .NET workload sets #14083
Conversation
src/Microsoft.DotNet.Build.Tasks.Workloads/src/Msi/WorkloadPackMsi.wix.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Noah Gilson <OTAKUPENGUINOP@GMAIL.COM>
...osoft.DotNet.Build.Tasks.Workloads.Tests/Microsoft.DotNet.Build.Tasks.Workloads.Tests.csproj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might not know the full context of how these changes operate, but the code looked really clean to me. Big thumbs up from me. 👍
string platform = kvp.Key; | ||
|
||
// The key is the paths to the packages included in the pack group, sorted in alphabetical order | ||
string uniquePackGroupKey = string.Join("\r\n", kvp.Value.Select(p => p.PackagePath).OrderBy(p => p)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You can use Environment.NewLine
instead of hard-coded "\r\n"
.
swixProjectItem.SetMetadata(Metadata.PackageType, DefaultValues.PackageTypeMsiPack); | ||
swixProjectItem.SetMetadata(Metadata.IsPreview, "false"); | ||
ITaskItem swixProjectItem = new TaskItem(swixProj); | ||
swixProjectItem.SetMetadata(Metadata.SdkFeatureBand, $"{sdkFeatureBand}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is $"{sdkFeatureBand}"
basically being used as sdkFeatureBand.ToString()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, I'm embracing interpolation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bold AND the brave only embrace interpolation so... fearlessly. 😜 I wonder if the IL ends up any different. I just hadn't seen someone use string interpolation for single-values before.
src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiTemplate/WorkloadSetProduct.wxs
Outdated
Show resolved
Hide resolved
Co-authored-by: Michael Yanni <MiYanni@microsoft.com>
...osoft.DotNet.Build.Tasks.Workloads.Tests/Microsoft.DotNet.Build.Tasks.Workloads.Tests.csproj
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have more questions than really anything else... I don't understand this all too well, but it seems reasonable given the knowledge I do have. If there is someone out there with this domain knowledge, it'd be best to have their review too.
src/Microsoft.DotNet.Build.Tasks.Workloads/src/Msi/WorkloadSetMsi.wix.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Workloads/src/Msi/WorkloadSetMsi.wix.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Workloads/src/Msi/WorkloadSetMsi.wix.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkload.wix.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkload.wix.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkload.wix.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/SwixPackageTests.cs
Outdated
Show resolved
Hide resolved
/// <summary> | ||
/// Set of NuGet packages containing workload sets. | ||
/// </summary> | ||
public ITaskItem[] WorkloadSetPackageFiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we ever expect there to be more than one of these packages passed to the task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not, but if we ever needed it, we won't need an Arcade update.
src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkloadSet.wix.cs
Outdated
Show resolved
Hide resolved
} | ||
|
||
Msis = msiItems.ToArray(); | ||
SwixProjects = swixProjectItems.ToArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for the baseline workload sets, which will be created in the installer repo, we will want to create the MSIs, but we won't insert the authoring into Visual Studio. Will we be able to filter out the VS authoring appropriately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Right now the tasks generate the projects for those, but it's up to the repo to decided whether or not it wants to build those projects. Here's an example where the runtime builds the swix projects: https://github.com/dotnet/runtime/blob/ccc475ed5646abe71ef596702d06e78e34981736/src/workloads/workloads.csproj#L179
Alternatively we could add a parameter that controls generating the swixprojects.
src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiTemplate/WorkloadSetProduct.wxs
Outdated
Show resolved
Hide resolved
Any other feedback or are we good to merge? |
Good to merge as far as I'm concerned |
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/arcade/actions/runs/6592101683 |
@joeloff backporting to release/8.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Add support for .NET workload sets
Applying: Cleanup formatting
Applying: Format cleanup
Applying: PR Feedback
Applying: PR feedback
Applying: Fix iOS package version
error: sha1 information is lacking or useless (eng/Versions.props).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0006 Fix iOS package version
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@joeloff an error occurred while backporting to release/8.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
Description
Add support for generating workload set MSIs from a workload set NuGet package as described here.
Changes include