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

macOS port of the upgrade-assistant #1409

Merged
merged 35 commits into from
Mar 3, 2023
Merged

macOS port of the upgrade-assistant #1409

merged 35 commits into from
Mar 3, 2023

Conversation

jstedfast
Copy link
Member

@jstedfast jstedfast commented Jan 26, 2023

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

For PRs which target a specific extension within UA, changes won't be approved by a member of the dotnet-upgrade-assistant-admin group until a member of the code owners of the extension has approved, when required.

Description

This set of code-changes gets the upgrade-assistant tool working on macOS, with the main goal of supporting Xamarin.Forms -> MAUI migration.

Addresses #550
Addresses #1076

@jstedfast jstedfast force-pushed the dev/jestedfa/macos-port branch 4 times, most recently from ed2787f to a8a100a Compare February 6, 2023 18:01
@jstedfast jstedfast force-pushed the dev/jestedfa/macos-port branch 2 times, most recently from 3e9ad38 to 0a8edf3 Compare February 6, 2023 18:50
@jstedfast jstedfast force-pushed the dev/jestedfa/macos-port branch from 3443056 to 0f15bc5 Compare February 14, 2023 23:01
@jstedfast jstedfast marked this pull request as ready for review February 14, 2023 23:01
@jstedfast jstedfast requested review from a team as code owners February 14, 2023 23:01
@jstedfast jstedfast force-pushed the dev/jestedfa/macos-port branch from 787c53e to 56e01b5 Compare February 17, 2023 19:31
jstedfast added 25 commits March 2, 2023 16:51
Needed to canonicalize the EvaluatedInclude paths before comparing them.
The upgrade-assistant uses dotnet's MSBuild while older Xamarin.iOS/Mac/Android/etc
projects used Mono's XBuild (an MSBuild clone).

Unfortunately, there's no way to specify that dotnet's MSBuild should look in both
/usr/local/share/dotnet/sdk/{version} directory *and* in the
/Library/Frameworks/Mono.framework/External/xbuild directories for the
$(MSBuildExtensionsPath) imports.

In order to be able to load Xamarin.* projects, we need to create a temp dir that
includes *both* the standard targets/props files *and* the Xamarin props/targets files
and the only way to do that seems to be to create a temp directory full of symlinks.
Instead of using projectPath.Split('/').Last() and then result.Substring(),
just get the start/end indexes of the substring we want and only do 1
Substring() operation.
…g whether or not to use sudo dotnet commands
These probably don't make sense to try to migrate on macOS.
…symlinks

Surface these exceptions to the user.
Use a different approach to avoid exceptions trying to create a
symlink that already exists.
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.

3 participants