-
Notifications
You must be signed in to change notification settings - Fork 63
Remove Visual Studio macOS checks #318
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
cb3d487
to
7c963f9
Compare
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 doesn't look right to me. It looks like you're removing the message that we need to keep it because of VS For Mac (if the SDKs are of a high-enough version) but still make it an implicit requirement for uninstalling and even extends that requirement to Windows, which is not desirable. We also don't really care about VS for Mac anymore.
src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs
Show resolved
Hide resolved
78a2018
to
c4963b4
Compare
@@ -147,7 +148,7 @@ private void CheckAllowed(IEnumerable<Bundle> allBundles, IEnumerable<Bundle> un | |||
{ | |||
uninstallableBundles.Should().Contain(sdkBundles[i]); | |||
} | |||
else | |||
else if (!RuntimeInfo.RunningOnOSX) |
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.
In the new behavior, all SDK versions should be uninstallable on Mac
@@ -37,7 +37,7 @@ internal void ListCommandFilteringIsCorrectOnWindows(string bundleType, string o | |||
} | |||
|
|||
[MacOsOnlyTheory] | |||
[InlineData("sdk", "", new string[] { "3.1.0" }, new string[] { "3.0.0", "3.0.0-preview", "1.0.0", "3.0.1", "3.0.2", "3.0.2-preview1", "3.0.2-preview2", "2.1.1", "1.0.1" })] | |||
[InlineData("sdk", "", new string[] {}, new string[] { "3.0.0", "3.0.0-preview", "1.0.0", "3.0.1", "3.0.2", "3.0.2-preview1", "3.0.2-preview2", "2.1.1", "1.0.1", "3.1.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.
"3.1.0"
included in expectedUninstallable
as all sdks should be uninstallable on Mac
@@ -339,14 +339,11 @@ The versions that can be uninstalled with this tool are: | |||
</value> | |||
</data> | |||
<data name="UninstallNoOptionDescriptionMac" xml:space="preserve"> | |||
<value>Remove specified .NET Core SDKs or Runtimes. By default, this tool does not uninstall versions that might be needed for Visual Studio for Mac or SDKs. Read the documentation for the .NET Core Uninstall Tool at https://aka.ms/dotnet-core-uninstall-docs.</value> | |||
<value>Remove specified .NET Core SDKs or Runtimes. By default, this tool does not uninstall versions that might be needed for SDKs. Read the documentation for the .NET Core Uninstall Tool at https://aka.ms/dotnet-core-uninstall-docs.</value> |
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 know you didn't write this part, but 'by default, this tool does not uninstall versions that might be needed for SDKs'? That doesn't make sense to me...VS?
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 it referred to not uninstalling runtime versions that might be needed for VS, and hence by sdks
src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs
Show resolved
Hide resolved
{ | ||
if (RuntimeInfo.RunningOnWindows) | ||
{ | ||
return ApplyWindowsVersionDivisions(bundles); | ||
} | ||
else | ||
{ | ||
return ApplyMacVersionDivisions(bundles); | ||
return ApplyMacVersionDivisions(bundles, macOSPreserveVSSdks); |
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 the first divided bundles important? I'd expected to just condition having this call at all on macOSPreserveVSSdks
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. From what I understand, while the sdks are all uninstallable now, runtimes should still be checked to avoid uninstalling a runtime associated to an sdk
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.
If you uninstall an SDK, why do you need the runtime associated with that SDK?
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 thought it more like the other way around, when people attempt to uninstall a runtime associated with an sdk
(i.e., all SDKs should be uninstallable, but not all runtimes)
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.
If it's ok to uninstall an SDK, we shouldn't be keeping a runtime that we only need for the uninstalled SDK...that doesn't make sense to me. And an SDK can typically run on a later runtime, just not typically an earlier runtime.
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.
So then you mean it should not compare runtimes and sdks when uninstalling either?
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.
So like let's say you have SDKs sa, sb, sc, and sd installed right now, and you have runtime ra, rb, and rc. sa depends on ra, sb on rb, and both sc and sd depend on rc. If you're planning to uninstall sa and sc and keep sb and sd, then you should uninstall ra because no SDK that isn't being uninstalled requires it. You can't uninstall rb because you aren't uninstalling sb, and you can't install rc because sd requires it even though you're uninstalling sc. Is that clearer?
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, thanks. So in essence, when uninstalling an sdk, it should also remove unused runtimes, right?
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.
Yeah, for mac I think that's right.
Windows get a little more confusing because we don't really look for VS instances properly, so we (conservatively) didn't uninstall runtimes VS might need. We used to do the same for mac, but since VS for mac isn't really a thing anymore, we don't have to.
0cbbca2
to
a51fa77
Compare
@@ -136,6 +136,10 @@ internal static class CommandLineConfigs | |||
RuntimeInfo.RunningOnWindows ? LocalizableStrings.ForceOptionDescriptionWindows | |||
: LocalizableStrings.ForceOptionDescriptionMac); | |||
|
|||
public static readonly Option MacOSPreserveVSSdksOption = new Option( |
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.
SDKs only or runtimes?
{ | ||
if (RuntimeInfo.RunningOnWindows) | ||
{ | ||
return ApplyWindowsVersionDivisions(bundles); | ||
} | ||
else | ||
{ | ||
return ApplyMacVersionDivisions(bundles); | ||
return ApplyMacVersionDivisions(bundles, macOSPreserveVSSdks); |
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.
If it's ok to uninstall an SDK, we shouldn't be keeping a runtime that we only need for the uninstalled SDK...that doesn't make sense to me. And an SDK can typically run on a later runtime, just not typically an earlier runtime.
0b2aed7
to
fa416de
Compare
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.
Thanks for your work on this! I think it does what I'd expect now 🙂
commit 2011e55 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Thu Apr 3 10:02:00 2025 -0700 Windows: Remove version from .msi (#384) commit cfc4641 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Thu Apr 3 10:01:48 2025 -0700 Mac: Add rid to tar.gz artifacts (#383) commit 6f834e0 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Mon Mar 31 17:08:40 2025 -0700 CI check signatures (#382) * Fix signing on Windows and macOS * Added signing verification steps to CI commit 7ea9cf1 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat Mar 29 10:55:39 2025 -0700 [main] Update dependencies from dotnet/arcade (#375) commit edff54c Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Thu Mar 27 10:53:37 2025 -0700 Update options (#380) * dry-run: Add option --preserve-vs-for-mac-sdks * Do not hide --version * Add version description string commit b4be6e6 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Mon Mar 24 15:37:22 2025 -0700 Update help text (#376) Update help text --------- Co-authored-by: Noah Gilson <OTAKUPENGUINOP@GMAIL.COM> commit 9fba2f3 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Mon Mar 24 13:28:21 2025 -0700 Windows: Detect arm64 correctly (#370) commit 289b92f Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Thu Mar 20 11:06:51 2025 -0700 Update ci workflow (#372) commit 13d1cf7 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Wed Mar 19 14:35:24 2025 -0700 macOS: Fix corrupted binary (#346) Add entitlements.plist commit 4da3500 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed Mar 19 13:50:00 2025 -0700 Update dependencies from https://github.com/dotnet/arcade build 20250314.6 (#343) Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25157.1 -> To Version 10.0.0-beta.25164.6 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> commit 882aff1 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Fri Mar 14 13:42:02 2025 -0700 Require enter on user input (#340) commit 24bea7d Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu Mar 13 08:51:54 2025 -0700 Update dependencies from https://github.com/dotnet/arcade build 20250307.1 (#336) Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25126.4 -> To Version 10.0.0-beta.25157.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> commit e72b91f Author: Marc Paine <marcpop@microsoft.com> Date: Thu Mar 13 08:51:43 2025 -0700 Update to AwesomeAssertions (#337) * Update to AwesomeAssertions Update the addreportable call * Remove unused using directive commit 03c8952 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Wed Mar 5 12:18:25 2025 -0600 Remove Visual Studio macOS checks (#318) * Remove checks for VSfM * Add --preserve-mac-vs-sdks flag * Update tests commit b648857 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Tue Mar 4 16:55:10 2025 -0600 Update CLI options and help text (#335) * Add target argument * Add TARGET argument * Add not for list by now * Update LocalizableStrings * Update --all description * Remove target from options (?) * Restore xlf translation * Show bundle types in <TARGET> argument * Update help link format * Restore CommandLine Arguments * Add --arm64 option * Fix archSelection.HasFlag commit 9823503 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon Mar 3 11:36:05 2025 -0800 [main] Update dependencies from dotnet/arcade (#327) * Update dependencies from https://github.com/dotnet/arcade build 20250206.4 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25080.7 -> To Version 10.0.0-beta.25106.4 * Update dependencies from https://github.com/dotnet/arcade build 20250213.2 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25080.7 -> To Version 10.0.0-beta.25113.2 * Update dependencies from https://github.com/dotnet/arcade build 20250220.6 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25080.7 -> To Version 10.0.0-beta.25120.6 * Update dependencies from https://github.com/dotnet/arcade build 20250225.2 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25080.7 -> To Version 10.0.0-beta.25125.2 * Update dependencies from https://github.com/dotnet/arcade build 20250226.4 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.25080.7 -> To Version 10.0.0-beta.25126.4 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> commit ea26b97 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Mon Mar 3 12:31:19 2025 -0600 Remove System.Reflection.Metadata (#334) commit 275578e Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Mon Mar 3 11:41:07 2025 -0600 Remove Microsoft.Win32.Registry package (#333) commit 2ac5028 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Fri Feb 28 13:14:49 2025 -0600 Small refactorings (#331) commit 2393ca9 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Tue Feb 25 16:51:31 2025 -0600 Hide .xlf files in PRs (#330) commit 62b46a0 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Tue Feb 25 13:58:14 2025 -0600 Fix Windows Signing (#329) Add CreateLightCommandPackageDrop to generate wixpack.zip and sign commit 06d1e0e Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Tue Feb 18 12:33:11 2025 -0600 Sign macOS build (#323) * Sign on Mac * Fix typo on ArtifactName * Add TeamName variable * Add certificatename to binary * Update binary path * Update build command to include signing * Typos * Globb files to sign * Add proper certificate * Add proper certificate * MacDeveloperHarden * Add files separately * Change flags * Update certificate name * Update build parameters * Update cert name commit 85f5414 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Mon Feb 10 09:01:45 2025 -0800 Remove unused signing target Add files to ItemsToSign Sign .msi file too Update `ItemsToSign` Update certificate name UseDotNetCertificate Add .msi certificatename commit 8c89301 Author: MerlinBot <MerlinBot> Date: Fri Feb 7 21:44:29 2025 +0000 This pull request includes baselines **with an expiration date of 180 days from now** automatically generated for your 1ES PT-based pipelines. Complete this pull request as soon as possible to make sure that your pipeline becomes compliant. Longer delays in completing this PR can trigger additional emails or S360 alerts in the future. 1ES PT Auto-baselining feature helps capture existing violations in your repo and ensures to break your pipeline only for newly introduced SDL violations after baselining. Running SDL tools in break mode is required for your pipeline to be compliant. Go to https://aka.ms/1espt-autobaselining for more details. **Please do not Abandon this PR.** Please reach out to 1ES PT for support. More details: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/support commit 6a94223 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed Feb 5 14:33:46 2025 -0800 [main] Update dependencies from dotnet/arcade (#316) * Update dependencies from https://github.com/dotnet/arcade build 20241222.1 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.24504.4 -> To Version 10.0.0-beta.24622.1 * Update dependencies from https://github.com/dotnet/arcade build 20241226.1 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.24504.4 -> To Version 10.0.0-beta.24626.1 * Update dependencies from https://github.com/dotnet/arcade build 20250103.3 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.24504.4 -> To Version 10.0.0-beta.25053.3 * Update dependencies from https://github.com/dotnet/arcade build 20250106.1 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.24504.4 -> To Version 10.0.0-beta.25056.1 * Update dependencies from https://github.com/dotnet/arcade build 20250111.1 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.24504.4 -> To Version 10.0.0-beta.25061.1 * Update dependencies from https://github.com/dotnet/arcade build 20250117.3 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.24504.4 -> To Version 10.0.0-beta.25067.3 * Update dependencies from https://github.com/dotnet/arcade build 20250126.1 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.24504.4 -> To Version 10.0.0-beta.25076.1 * Update dependencies from https://github.com/dotnet/arcade build 20250130.7 Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.24504.4 -> To Version 10.0.0-beta.25080.7 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> commit 0cc67a3 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Mon Feb 3 17:51:20 2025 -0600 Refactor macOS build pipeline (#325) Use matrix strategy to avoid repeating code commit 11995ad Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Fri Jan 31 11:43:31 2025 -0600 macOS: Support building on Apple Silicon (#322) Update solution file, project file and ci/cd to support building for osx-arm64 commit aa40644 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Wed Jan 29 17:54:52 2025 -0600 GetBundleVersion: Parse versions correctly to avoid duplicates or incomplete versions (#324) commit 288db58 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Mon Jan 27 15:08:07 2025 -0600 Identify macOS runtimes correctly (#321) commit 802fef7 Author: Eduardo Villalpando Mello <eduardov@microsoft.com> Date: Fri Jan 24 18:40:01 2025 -0600 macOS: Show correct arm64 architecture (#320)
Addresses #311
Visual Studio for Mac entered End Of Life support on 9.0.000. Hence, it should not show the text for VS in future versions.
Default behavior is kept when using the
--preserve-mac-vs-sdks
flag