-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Change default workload set use to 'true' #45936
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
Conversation
@@ -40,6 +40,8 @@ public override string ToString() | |||
{ | |||
return JsonSerializer.Serialize<InstallStateContents>(this, s_options); | |||
} | |||
|
|||
public bool ShouldUseWorkloadSets() => UseWorkloadSets ?? true; |
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.
excellent idea - nitpick though - should use workload sets
be hidden in some way so that we don't use it accidentally in the codebase, instead always going through your new helper?
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.
Unfortunately, JsonSerializer doesn't serialize private properties without a good bit of extra work:
https://stackoverflow.com/questions/61869393/get-net-core-jsonserializer-to-serialize-private-members
Good idea, though 🙂
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.
crazier idea - maybe add the [EditorBrowsable(EditorBrowsableState.Never)]
attribute to UseWorkloadSets
to hide it from completion? I love this little hack: https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.editorbrowsableattribute?view=net-9.0
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.
Never heard of that, but that should be doable!
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.
Did you get a chance to try this out?
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.
Ah, forgot to. Now I'm split because I think it's a positive change, but I'm pretty reluctant to retrigger tests when they're passing for a once...
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.
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.
Wait, I'm probably stupid? That seems like an editor bug; it should be available on net10.0
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.
After a bit more poking around, I suspect this just doesn't work properly in my IDE, so I'll push the change. If it fails, I can revert it.
@@ -37,7 +37,8 @@ public void GivenNoWorkloadsAreInstalledListIsEmpty() | |||
command.Execute(); | |||
|
|||
// Expected number of lines for table headers | |||
_reporter.Lines.Count.Should().Be(6); | |||
// Expecting a workload set adds two lines |
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.
This comment was helpful, thanks :)
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 like this approach for turning it on; this was well designed! It looks good to me, though I think we should announce when we make workload sets on by default. I dont think we've been very public about workload sets or probably most people dont know what they are.
Is there an announcement page for this or a breaking change doc we're going to have?
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
Starting this as a draft because I can almost guarantee that some test will fail.