Skip to content

[release/6.0.1xx-preview7] Update dependencies from dotnet/installer #6097

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

dotnet-maestro[bot]
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Jul 19, 2021

This pull request updates the following dependencies

Coherency Updates

The following updates ensure that dependencies with a CoherentParentDependency
attribute were produced in a build used as input to the parent dependency's build.
See Dependency Description Format

  • Coherency Updates:
    • Microsoft.NET.ILLink.Tasks: from 6.0.100-preview.6.21322.1 to 6.0.100-preview.6.21365.1 (parent: Microsoft.Dotnet.Sdk.Internal)
    • Microsoft.NETCore.App.Ref: from 6.0.0-preview.7.21326.8 to 6.0.0-preview.7.21369.8 (parent: Microsoft.Dotnet.Sdk.Internal)

From https://github.com/dotnet/installer

  • Subscription: 95703ce6-24e6-46ee-08a4-08d948adff43
  • Build: 20210719.21
  • Date Produced: 7/20/2021 6:59 AM
  • Commit: d553cd737ef78d11cbf56cd4ef273ce3026ee14e
  • Branch: refs/heads/release/6.0.1xx-preview7

Steve Pfister and others added 5 commits July 2, 2021 10:37
…210719.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.7.21327.2 -> To Version 6.0.100-preview.7.21369.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref
 From Version 6.0.100-preview.6.21322.1 -> To Version 6.0.100-preview.6.21365.1 (parent: Microsoft.Dotnet.Sdk.Internal
dotnet-maestro bot and others added 2 commits July 19, 2021 15:27
…210719.5

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.7.21327.2 -> To Version 6.0.100-preview.7.21369.5

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref
 From Version 6.0.100-preview.6.21322.1 -> To Version 6.0.100-preview.6.21365.1 (parent: Microsoft.Dotnet.Sdk.Internal
I'm seeing failures on CI such as:

    C:\a\_work\2\s\build-tools\xaprepare\xaprepare\package-download.proj : warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed to run. Inconsistency in workload manifest 'microsoft.net.workload.mono.toolchain': missing dependency 'Microsoft.NET.Workload.Emscripten'
    C:\Users\cloudtest\android-toolchain\dotnet\sdk\6.0.100-preview.7.21369.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props(14,3): warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed to run. Inconsistency in workload manifest 'microsoft.net.workload.mono.toolchain': missing dependency 'Microsoft.NET.Workload.Emscripten'
    C:\Users\cloudtest\android-toolchain\dotnet\sdk\6.0.100-preview.7.21369.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props(14,38): error MSB4236: The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found. [C:\a\_work\2\s\build-tools\xaprepare\xaprepare\package-download.proj]
    Error: dotnet restore C:\a\_work\2\s\build-tools\xaprepare\xaprepare\package-download.proj failed.
    Step Xamarin.Android.Prepare.Step_InstallDotNetPreview failed
    System.InvalidOperationException: Step Xamarin.Android.Prepare.Step_InstallDotNetPreview failed
        at Xamarin.Android.Prepare.Scenario.<Run>d__26.MoveNext() in C:\a\_work\2\s\build-tools\xaprepare\xaprepare\Application\Scenario.cs:line 50
        --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        at Xamarin.Android.Prepare.Context.<Execute>d__210.MoveNext() in C:\a\_work\2\s\build-tools\xaprepare\xaprepare\Application\Context.cs:line 827
        --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
        at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        at Xamarin.Android.Prepare.App.<Run>d__3.MoveNext() in C:\a\_work\2\s\build-tools\xaprepare\xaprepare\Main.cs:line 171

I saw the same thing locally, and noticed this folder was out of date:

    ~/android-toolchain/dotnet/sdk-manifests/6.0.100/microsoft.net.workload.mono.toolchain

If we have an outdated `WorkloadManifest.json` or
`WorkloadManifest.targets`, the build can get in a state where this
step can't succeed.

I manually deleted this folder to solve the problem:

    ~/android-toolchain/dotnet/

Going forward, let's make the `Prepare` step do this every time. This
should simplify our .NET 6 provisioning & upgrade process.
@dotnet-maestro dotnet-maestro bot requested a review from grendello as a code owner July 19, 2021 15:33
…o darc-release/6.0.1xx-preview7-31fefe12-06c3-45a5-90b6-27e71336c01e
jonathanpeppers and others added 13 commits July 19, 2021 15:57
Builds were failing with:

    error NETSDK1031: It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set SelfContained to false.

This seemed to be caused by reordering such as:

dotnet/sdk#18639

In the past, we weren't actually overwriting `$(SelfContained)` *at
all*, and with these changes we now are. I set this value in the days
of .NET 5.

We should just remove where we set `$(SelfContained)` and let the
dotnet/sdk manage this value.
Changes: dotnet/java-interop@a5ed891...4fb7c14

We need "[build] set $(DisableImplicitNamespaceImports) by default".
…210719.21

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.7.21327.2 -> To Version 6.0.100-preview.7.21369.21

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref
 From Version 6.0.100-preview.6.21322.1 -> To Version 6.0.100-preview.6.21365.1 (parent: Microsoft.Dotnet.Sdk.Internal
We don't need to assert for the presence of this file anyway.
* Use `$(TargetFramework)` and `monoandroid10` checks, so they will continue to work in a future .NET 7.
* Fixed mixed tabs/spaces  in `AndroidMessageHandler`
* Removed `goto done` where it could simply be `return proxy`.
Context: https://github.com/xamarin/xamarin-android/blob/0b9395a7786ef36a17c2bfd6dd2f00dd3e65301c/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidClientHandlerTests.cs#L360-L377
Context: https://github.com/dotnet/runtime/blob/ccfe21882e4a2206ce49cd5b32d3eb3cab3e530f/src/libraries/Common/src/System/Net/Http/HttpHandlerDefaults.cs

Some tests that check 301 redirects were failing with:

    System.Net.Http.HttpRequestException : net_http_message_not_success_statuscode, 301, Moved Permanently
        at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() in System.Net.Http.dll:token 0x6000298+0x39
        at Xamarin.Android.NetTests.AndroidClientHandlerTests.Redirect_Without_Protocol_Works() in Mono.Android.NET-Tests.dll:token 0x600002e+0x7b
        at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo ) in System.Private.CoreLib.dll:token 0x600281b+0x6a

We originally were inheriting some default values from
`AndroidClientHandler`. Now that we have `AndroidMessageHandler` in
.NET 6, we need to specify these defaults ourselves.
* MaxAutomaticRedirections should throw if <= 0
* UseCookies defaults to true
* CookieContainer creates a new instance on first call
* Catch TargetInvocationException, see: dotnet/runtime#56089
* Catch PlatformNotSupportedException for ClientCertificateOptions
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking this will be green now.

@jonpryor
Copy link
Contributor

Commit message:

Bump to dotnet/installer/release/6.0.1xx-preview7@808795cc 6.0.100-preview.7.21369.5 (#6097)

Fixes: https://github.com/xamarin/java.interop/issues/854

Changes: https://github.com/dotnet/installer/compare/e8b3b6bea1e37086869ba9aeafe65caa298537e7...808795cca8cfaa143ef556cac0dc40d15d2dc186

    % git diff --shortstat e8b3b6be...808795cc
     102 files changed, 2218 insertions(+), 2674 deletions(-)

Changes: https://github.com/mono/linker/compare/a07cab7b71a1321a9e68571c0b6095144a177b4e...9ecf5bd2809f93d98c1dbea640790ca5a88d35ec

    % git diff --shortstat a07cab7b...9ecf5bd2
     81 files changed, 2122 insertions(+), 246 deletions(-)


Changes: https://github.com/dotnet/runtime/compare/02f70d0b903422282cd7ba8037de6b66ea0b7a2d...8d3afa3a4a42021be024ffa4a1dee77e35d33911

    % git diff --shortstat 02f70d0b...8d3afa3a
     2518 files changed, 122843 insertions(+), 33676 deletions(-)

Changes: https://github.com/xamarin/java.interop/compare/a5ed8919fb2ec894cb8144e51ae7c29b4811ee2a...4fb7c147f8c6eb9bf94d9bfb8305c7d2a7a9fb33

  * xamarin/java.interop@4fb7c147: [build] set $(DisableImplicitNamespaceImports) by default (#859)
  * xamarin/java.interop@855ecfa3: [generator] Don't generate unexpected NRT types like `void?` (#856)
  * xamarin/java.interop@4a02bc32: Revert "[Xamarin.Android.Tools.Bytecode] hide nested types (#827)" (#855)
  * xamarin/java.interop@95c9b79d: [generator] Avoid 'error (…):' construct in diagnostic messages (#851)
  * xamarin/java.interop@7c4f7db0: [build] Bump to Mono with MSBuild 16.10 (#848)
  * xamarin/java.interop@0227cdae: [generator] Gracefully handle BindingGeneratorException. (#845)
  * xamarin/java.interop@ce1750fd: Add SECURITY.md (#846)

Context: https://github.com/dotnet/runtime/pull/55384
Context: https://github.com/dotnet/sdk/pull/18639

Updates:

  * Microsoft.Dotnet.Sdk.Internal: from 6.0.100-preview.7.21327.2 to 6.0.100-preview.7.21369.5
  * Microsoft.NET.ILLink.Tasks: from 6.0.100-preview.6.21322.1 to 6.0.100-preview.6.21365.1
  * Microsoft.NETCore.App.Ref: from 6.0.0-preview.7.21326.8 to 6.0.0-preview.7.21368.2

dotnet/runtime#55384 broke how .NET 6 interacts with
`AndroidClientHandler`.  Fix this by introducing a new
`Xamarin.Android.Net.AndroidMessageHandler` type for use on .NET 6,
and update the .NET 6 `AndroidClientHandler` to delegate to
`AndroidMessageHandler`.

`AndroidMessageHandler` doesn't exist on Legacy.

Update `.apkdesc` files:

  * `BuildReleaseArm64SimpleDotNet` is ~37KB smaller
  * `BuildReleaseArm64XFormsDotNet` is ~62KB larger.

Update `tests/api-compatibility/api-compat-exclude-attributes.txt`
so that `T:System.Runtime.CompilerServices.CompilerGeneratedAttribute`
is ignored.  `[CompilerGeneratedAttribute]` is emitted as part of
C# 3 "auto-props":

	public T Property { get; set; }

Converting this into a "real" property:

	T value;
	public T Property {
	    get => value;
	    set => this.value = value;
	}

results in the `_CheckApiCompatibility` target complaining about an
API break.  We don't care; ignore `[CompilerGeneratedAttribute]`.

Remove `$(SelfContained)` property: early on in .NET 5 (yes 5)
development, the Xamarin.Android SDK needed to specify
`$(SelfContained)` by default in order to produce `.apk` files.

After we became a proper workload, setting the value became
unnecessary.  It also didn't actually do anything because
dotnet/sdk overwrote the value.

Starting in dotnet/sdk#18639,
`Microsoft.NET.RuntimeIdentifierInference.targets` is now being
imported *after* a workload, which meant that dotnet/sdk no longer
overwrote our `$(SelfContained)` value, which broke things:

	error NETSDK1031: It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set SelfContained to false.

We can simply remove `$(SelfContained)` now, and rely on
dotnet/sdk to set this value.

Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>

@jonpryor jonpryor merged commit b10fe09 into release/6.0.1xx-preview7 Jul 21, 2021
@jonpryor jonpryor deleted the darc-release/6.0.1xx-preview7-31fefe12-06c3-45a5-90b6-27e71336c01e branch July 21, 2021 21:35
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants