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

[build] Fix the Legacy Xamarin.Android build #9255

Merged
merged 2 commits into from
Aug 29, 2024

Commits on Aug 28, 2024

  1. [build] Fix the Legacy Xamarin.Android build

    Fixes: #9253
    Fixes: #9048
    
    Multiple reports that `make prepare` now errors out:
    
    	% make prepare
    	…
    	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    	Downloading Mono archive
    	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    	Checking if all runtime files are present
    	  • some files are missing, download and extraction required
    	Downloading Mono archive from https://xamjenkinsartifact.azureedge.net/mono-sdks/android-debug-Darwin-d9a6e8710b37cd7f16cf52eff4f772556e57cc41.7z
    	Failed to obtain Mono archive size. HTTP status code: BadRequest (400). Mono runtimes will be rebuilt
    	Downloading Mono archive from https://xamjenkinsartifact.azureedge.net/mono-sdks/android-debug-Darwin-d9a6e8710b37cd7f16cf52eff4f772556e57cc41.7z
    	Failed to obtain Mono archive size. HTTP status code: BadRequest (400). Mono runtimes will be rebuilt
    	Downloading Mono archive from https://xamjenkinsartifact.azureedge.net/mono-sdks/android-debug-Darwin-d9a6e8710b37cd7f16cf52eff4f772556e57cc41.7z
    	Failed to obtain Mono archive size. HTTP status code: BadRequest (400). Mono runtimes will be rebuilt
    	Mono archive not present
    
    	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    	Installing Mono runtimes
    	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    	Step Xamarin.Android.Prepare.Step_InstallMonoRuntimes failed: Unable to build mono runtimes from sources.
    	System.InvalidOperationException: Step Xamarin.Android.Prepare.Step_InstallMonoRuntimes failed: Unable to build mono runtimes from sources.
    	 ---> System.NotImplementedException: Unable to build mono runtimes from sources.
    	   at Xamarin.Android.Prepare.Step_InstallMonoRuntimes.Execute(Context context) in /Users/wangyk/Projects/Practice/xamarin-android/build-tools/xaprepare/xaprepare/Steps/Step_InstallMonoRuntimes.cs:line 34
    	   at Xamarin.Android.Prepare.Step.Run(Context context) in /Users/wangyk/Projects/Practice/xamarin-android/build-tools/xaprepare/xaprepare/Application/Step.cs:line 42
    	   at Xamarin.Android.Prepare.Scenario.Run(Context context, Log log) in /Users/wangyk/Projects/Practice/xamarin-android/build-tools/xaprepare/xaprepare/Application/Scenario.cs:line 37
    	   --- End of inner exception stack trace ---
    	   at Xamarin.Android.Prepare.Scenario.Run(Context context, Log log) in /Users/wangyk/Projects/Practice/xamarin-android/build-tools/xaprepare/xaprepare/Application/Scenario.cs:line 48
    	   at Xamarin.Android.Prepare.Context.Execute() in /Users/wangyk/Projects/Practice/xamarin-android/build-tools/xaprepare/xaprepare/Application/Context.cs:line 845
    	   at Xamarin.Android.Prepare.App.Run(String[] args) in /Users/wangyk/Projects/Practice/xamarin-android/build-tools/xaprepare/xaprepare/Main.cs:line 174
    
    This happens because the URL
    <https://xamjenkinsartifact.azureedge.net>
    no longer exists (for various sundry internal reasons), and was
    replaced by <https://download.mono-project.com>.
    
    Update `$(MonoDarwinPackageUrl)` to use the new URL.
    
    Update `Configurables.Urls.MonoArchive_BaseUri` to use the new URL.
    
    Additionally, the new URL only contains *release* artifacts.  Update
    `Configurables.Defaults.MonoSdksConfiguration` to always be `release`
    so that the appropriate archive and extracted directories are used.
    jonpryor committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    265be09 View commit details
    Browse the repository at this point in the history
  2. Fix HTTP redirect tests.

    GitHub redirects xamarin/xamarin-android to dotnet/android, causing
    e.g. `AndroidHandlerTestBase.Redirect_Without_Protocol_Works()` to
    fail.  Update the expected URLs so they pass as expected.
    jonpryor committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    255fda5 View commit details
    Browse the repository at this point in the history