Граф коммитов

13577 Коммитов

Автор SHA1 Сообщение Дата
dotnet-maestro[bot] 9a46a8b46d
[main] Update dependencies from dotnet/runtime (#14983)
* Update dependencies from https://github.com/dotnet/runtime build 20220510.4

Microsoft.NETCore.App.Ref
 From Version 6.0.6 -> To Version 6.0.6

* Update dependencies from https://github.com/dotnet/runtime build 20220513.1

Microsoft.NETCore.App.Ref
 From Version 6.0.6 -> To Version 6.0.6

* Update dependencies from https://github.com/dotnet/runtime build 20220513.11

Microsoft.NETCore.App.Ref
 From Version 6.0.6 -> To Version 6.0.6

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-05-16 11:29:51 +02:00
dotnet-maestro[bot] fb57211f6f
[main] Update dependencies from dotnet/installer (#15033)
Update dependencies from https://github.com/dotnet/installer build 20220513.15

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.301-rtm.22261.3 -> To Version 6.0.301-rtm.22263.15

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-05-16 11:28:24 +02:00
Rolf Bjarne Kvinge 82482edc70
[cecil-tests] Improve these tests a bit. (#14994) 2022-05-13 20:50:02 +02:00
Rolf Bjarne Kvinge 8b9cd60dc6
[dotnet] Update localized json files. (#15024)
This is just changing line endings, ignoring whitespace shows no changes.
2022-05-13 20:49:51 +02:00
Rolf Bjarne Kvinge 009bd4ac01
[apidiff] Simplify code a bit to use templates and iterate over the selected platforms. (#15006) 2022-05-13 20:44:15 +02:00
Rolf Bjarne Kvinge 0caa8166c3
[apidiff] Remove detection of empty diffs for cases we know that will never happen. (#15007)
There will always be an API diff between:

* legacy Xamarin.*.dll assemblies and .NET Microsoft.*.dll assemblies.
* Microsoft.iOS.dll and Microsoft.MacCatalyst.dll

so don't bother with logic to detect empty diffs, just assume they will never be empty.
2022-05-13 20:43:39 +02:00
Manuel de la Pena 0ec49ff31a
[CI] Reset the submodules for the API diff. (#14997)
When we do the checkout of head, we must make sure that the submodules are the correct ones.
2022-05-13 13:07:45 -04:00
Steve Hawley 4b5581553c
[nnyeah] Get nint types (#15016)
Fixed issue with treating nint et al as TypeDefinitions instead of TypeReferences
Fixed issue where an old assembly reference is left hanging around
2022-05-13 09:51:56 -04:00
dotnet-maestro[bot] 4800775b4d
[main] Update dependencies from dotnet/installer (#14966)
* Update dependencies from https://github.com/dotnet/installer build 20220510.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.301-rtm.22254.17 -> To Version 6.0.301-rtm.22260.1

* Update dependencies from https://github.com/dotnet/installer build 20220510.12

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.301-rtm.22254.17 -> To Version 6.0.301-rtm.22260.12

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref
 From Version 6.0.200-1.22178.2 -> To Version 6.0.200-1.22219.3 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20220511.3

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.301-rtm.22254.17 -> To Version 6.0.301-rtm.22261.3

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.AspNetCore.App.Ref
 From Version 6.0.200-1.22178.2 -> To Version 6.0.200-1.22219.3 (parent: Microsoft.Dotnet.Sdk.Internal

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-05-13 09:29:18 +02:00
Rolf Bjarne Kvinge fe6a06dbca
[msbuild] Improve error reporting when an external tool fails to print some of stderr. (#14993)
Improve error reporting when an external tool fails to print some of stderr (up to 1024 characters).

Before:

    error : clang exited with code 1

After:

    error : clang exited with code 1:
    error : [...]/xamarin-macios/tests/dotnet/MyInterpretedApp/iOS/obj/Debug/net6.0-ios/iossimulator-x64/linker-cache/main.x86_64.mm:58:25: error: use of undeclared identifier 'MONO_AOT_MODE_INTERP_ONLY'; did you mean 'MONO_AOT_MODE_INTERP'?
    error :         mono_jit_set_aot_mode (MONO_AOT_MODE_INTERP_ONLY);
    error :                                ^~~~~~~~~~~~~~~~~~~~~~~~~
    error :                                MONO_AOT_MODE_INTERP
    error : [...]/xamarin-macios/builds/downloads/dotnet-sdk-6.0.301-rtm.22254.17-osx-x64/packs/Microsoft.iOS.Runtime.iossimulator-x64/15.4.16-ci.x64-interpreter-only/runtimes/iossimulator-x64/native/xamarin/mono-runtime.h:452:2: note: 'MONO_AOT_MODE_INTERP' declared here
    error :         MONO_AOT_MODE_INTERP,
    error :         ^
2022-05-13 09:14:10 +02:00
Rolf Bjarne Kvinge ea2e7bdaaf
Update the issue template. (#15004)
Point to a new document in the wiki explaining how to get version information
and build logs.

The wiki allows us to have longer explanations with screenshots, and it also
explains how to get a binary build log.
2022-05-13 09:10:24 +02:00
Rolf Bjarne Kvinge d819b06550
[devops] Authenticate requests to GitHub. (#15009)
This way we don't run into rate limits as easily.
2022-05-13 09:10:01 +02:00
Rolf Bjarne Kvinge e661dfc58c
[devops] Remove the logic for SkipPublicJenkins, it's never set anymore. (#15012) 2022-05-13 09:09:34 +02:00
Rolf Bjarne Kvinge 735d4f7c55
Bump api references to the latest stable (d17-2). (#15010) 2022-05-13 09:05:14 +02:00
Rolf Bjarne Kvinge b05687f7aa
[compare-commits] We don't use XmlDocSync anymore, so remove workaround for NuGet.config. (#15011) 2022-05-13 09:04:47 +02:00
Rolf Bjarne Kvinge 706663845d
[tests] Adjust a few tests to try network requests multiple times. (#14943)
* A few tests seem to be failing rather consistently with network errors.
  Rewrite these tests to try multiple urls before failing (we'll be assuming
  that if one of the urls succeed, the other failures were network related).

* Rename the LinkAnyTest.WebClientTest to LinkAnyTest.WebClientTest_Http to
  follow it's original intent, and make it test http instead of https.

* Remove unnecessary assertion from SSL_IP_5706. This is tested in plenty of other places.
2022-05-13 08:50:28 +02:00
Rolf Bjarne Kvinge d6454fee81
[devops] Don't ignore api-diff failures, but show then as non-fatal warnings instead. (#15013) 2022-05-13 08:47:21 +02:00
Steve Hawley 1da4351f95
[nnyeah] Check dependencies in output (#14987)
- change visibility of methods in Program.cs to make it unit-testable
- infrastructure to find the Microsoft platform dlls
- tests to ensure that Xamarin and Microsoft dlls are where we expect
- a (failing) test that shows that dependency is not being removed
2022-05-12 14:45:56 -04:00
VS MobileTools Engineering Service 2 7d9dad24fc
Localized file check-in by OneLocBuild Task: Build definition ID 14411: Build ID 6124703 (#14931)
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-05-12 12:25:41 -05:00
TJ Lambert 6ff23b9393
[videosubscriberaccount] Add nullability to (generated and manual) bindings (#14948)
* Add nullability

* throw better exceptions

* use is null

* use a variable

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-05-12 12:24:24 -05:00
Manuel de la Pena d89dfec8fb
[CI] Sign the contents of the bundle.zip to be used in xma. (#14970) 2022-05-12 13:24:01 -04:00
TJ Lambert a27fbdc19f
[twitter] Add nullability to (generated and manual) bindings (#14929)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2022-05-12 12:19:50 -05:00
TJ Lambert 6993eff5bf
[usernotification] Add nullability to (generated and manual) bindings (#14941)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-05-12 12:15:13 -05:00
TJ Lambert fcf1a19631
[security] Add nullability to (generated and manual) bindings (#14884)
* Add nullability

* throw better null exceptions

* use is null and is not null AND fix spacing

* Rolfs suggestions and redo spacing

* missed a few spaces

* Found one more elusive space

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-05-12 12:11:15 -05:00
Rolf Bjarne Kvinge 911cdf3c23
[AppKit] Add NSView.AddToolTip overloads that take NSObjects as owners. Fixes #14996. (#15000)
Fixes https://github.com/xamarin/xamarin-macios/issues/14996.
2022-05-12 18:12:25 +02:00
Rolf Bjarne Kvinge 718c72f57e
[ObjCRuntime] Improve the debug logging in the Runtime.CoreCLR.cs file. (#14920)
* Fix an issue where we could run into infinite recursion (and stack overflow)
  when printing method arguments.
* Simplify the output a bit.
2022-05-12 18:05:05 +02:00
Rolf Bjarne Kvinge a6c92d9a25
[tests] Ignore the new MnistTester test on the bots. (#15002)
Bots seems to break more often after this change, so let's see if this improves matters.

This is what happens with the bots:

    We stopped hearing from agent [...]. Verify the agent machine is running and has a healthy network connection. Anything that terminates an agent process, starves it for CPU, or blocks its network access can cause this error. For more information, see: https://go.microsoft.com/fwlink/?linkid=846610
2022-05-12 16:07:04 +02:00
Rolf Bjarne Kvinge f1d4967540
[actions] Fix changelog logic when there's no existing changelog comment. (#15003) 2022-05-12 16:05:34 +02:00
Rolf Bjarne Kvinge 06041ab37f
[xharness/devops] Enable .NET tests by default. (#14998)
Which alo means there's no need to select them if .NET is enabled.
2022-05-12 14:58:24 +02:00
Rolf Bjarne Kvinge 447e637ac0
[xharness] Fix logic to include the .NET xtro tests. (#14991)
Both 'IncludeXtro' and 'IncludeDotNet' must be set to run the .NET xtro tests
(which means they're ignored if either is false).
2022-05-12 08:20:06 +02:00
Rolf Bjarne Kvinge 774b3d7380
[devops] A PR API diff with changes isn't an error. (#14992)
It's only an error if it has breaking changes (which is handled elsewhere).
2022-05-12 08:19:35 +02:00
Rolf Bjarne Kvinge f7c89d1106
[make] Add better error message when the required Xcode isn't installed. (#14995)
Before:

    $ make whatever
    Print: Entry, ":ProductBuildVersion", Does Not Exist

After:

    $ make whatever
    The required Xcode (13.3) is not installed in /Applications/Xcode_13.3.0.app/Contents/Developer
2022-05-12 08:18:43 +02:00
Rolf Bjarne Kvinge adb56501da
[apidiff] Switch to getting mono-api-[info|html] from rolfbjarne/api-tools. (#14965)
Switch to getting mono-api-[info|html] from a newly created repository we
control and where we can easily fix issues, since mono/mono isn't getting many
fixes anymore. In the past I know I've been reluctant to look at these tools,
just because of the hassle of setting things up to debug, and then the
paperwork to get the fixes in mono/mono, and then backported to the branch
where we need them.

This repo has a few other benefits:

* The tools are built using normal projects, which means they're easy to debug
  in an IDE (mono/mono's code has generated project files, which used in-tree versions
  of the BCL, and it got quite complex quite fast).
* One fewer dependency on the mono archive, so we're getting closed to be able
  to drop it completely when we drop support for legacy Xamarin.
* #13669 is already fixed there.
* It contains a few other misc fixes.

Fixes https://github.com/xamarin/xamarin-macios/issues/13669.
2022-05-11 22:01:39 +02:00
Manuel de la Pena 80f4844bc4
[CI] Ensure we do not leave processes once we are done. (#14988) 2022-05-11 15:46:47 -04:00
Rolf Bjarne Kvinge b56184b60d
[actions] Add GitHub action to compute the changelog for maestro bumps. (#14984)
And add that changelog as a comment to the PR. If there already is a comment
with a changelog, then update that comment instead.
2022-05-11 21:41:12 +02:00
Chris Hamons cec44107a5
[nnyeah] Add executable integration test (#14977)
- Test is currently semi-manual and uses Alert to popup results
- Covers nint/nuint/nfloat with method/prop/field/event
- Execution currently doesn't execute events yet.
- Test fails due to reference issue reported to Steve
- Currently not hooked up to any automated tests
2022-05-11 12:02:06 -05:00
Manuel de la Pena 01459aece0
[CI] Bump timeout. (#14982)
Until we parallize the tests we need to bump the timeout since we are
getting timeout issues in some bots, for example: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6134329&view=logs&j=673140f8-3abe-5ac0-6769-091785cf5576&t=27d47212-35cf-595c-16ff-96a3671a2d41
2022-05-11 12:13:56 -04:00
Rolf Bjarne Kvinge 92eda7f353
[dotnet] Add support for selecting whether to create P/Invoke wrappers or not. Fixes #4940. (#14961)
* This is a potential mitigation for slower transition to native code when
  exception marshalling is enabled (#14812).
* A minor modification was required in the linker, to make sure any modified
  assemblies are saved.

Fixes https://github.com/xamarin/xamarin-macios/issues/4940.
2022-05-11 16:42:01 +02:00
Rolf Bjarne Kvinge c4f3d65b68
[devops] Compute better base for comparing API diff. (#14963)
Previously we'd compare the tip of the PR branch with the commit before merge commit into the target branch created by GitHub.

This doesn't work in the following scenario:

    main  gh  pr
    
       |  G1 |          (merge commit created by GitHub)
       | / \ |
       |/   \|
       M2    |
       |     P2
       |    /|
       |   / |
       |  /  |
       | /   |
       |/    |
       M1    |
       |     |
       |     P1
       |    /
       |   /
       |  /
       | /
       |/

We'd end up comparing P2 with M2, which is not what we want, because M2 could
have API changes that would show up as missing in P2.

It's actually even worse than that, because we could be in the following
scenario:

    main  gh  pr
    
       |  G2 |          (merge commit created by GitHub when api diff started)
       | / \ |
       |/   \|
       M3    |
       |     P3
       |     |
       |  G1 |          (merge commit created by GitHub when build started)
       | / \ |
       |/   \|
       M2    |
       |     P2
       |    /|
       |   / |
       |  /  |
       | /   |
       |/    |
       M1    |
       |     |
       |     P1
       |    /
       |   /
       |  /
       | /
       |/

And we still want to P2 with M2, but we'd compare P2 with M3.

We want to compare P2 with M1 instead. This is done by asking git for the
merge-base between P2 and M2.
2022-05-11 16:40:40 +02:00
Manuel de la Pena 22ba05bed5
[Xharness] Enable nullable in the BuildProject class and clean code a little. (#14897) 2022-05-11 07:25:48 -04:00
Manuel de la Pena 642b03b09b
[Tools] Enable nullability on Cache.cs. (#14947) 2022-05-11 07:23:37 -04:00
Manuel de la Pena f66fba9c8d
[Tools] Enable nullability in StringUtils.cs (#14944) 2022-05-11 07:08:57 -04:00
Chris Hamons 086469f70b
[nnyeah] Fix method hashing of generic matching non-generic due to Cecil limitation. (#14962)
This gets iOS integration tests passing

From what I can tell we are failing due to:

    public static new PHLivePhotoViewAppearance GetAppearance (UITraitCollection traits) {
    public static new PHLivePhotoViewAppearance GetAppearance<T> (UITraitCollection traits) where T: PHLivePhotoView {

having the same hash, as the generic constraints are not printed.

To solve this we take on a small (250ish) dependency on code from MonoMod.Common (MIT licensed). They have code which creates stable hash keys that include generic information.
2022-05-10 16:09:46 -05:00
Rolf Bjarne Kvinge f2bcedd441
[msbuild/dotnet] Add support for passing --aot arguments to the AOT compiler. (#14936)
Pick up --aot arguments in MtouchExtraArgs and pass them to the AOT compiler
when building a .NET project. This makes it possible to work around #14887 by
manually increasing the number of trampolines.

Ref: https://github.com/xamarin/xamarin-macios/issues/14887
2022-05-10 16:25:19 +02:00
Chris Hamons e6d4878fa5
[Nnyeah] Improve error messages for missing required arguments (#14949) 2022-05-10 09:07:05 -05:00
Chris Hamons 569aef64b7
[nnyeah] Refactor reworker to a 1-pass initialization (#14957)
Reworker previous to this PR was very Lazy is it's init process. In
many ways this was beneficial, but was tricky to get right and made
nullability attributes a nightmare to add. It also included multiple "null objects"
that would show errors only at the end of a conversion when writing the file.

I replaced it with a single-pass init system, where the module is read
and all required attributes are fetched before processing begins.

Two requirements to consider:
- We don't want to ModuleDefinition.ReadModule to be repeated
- We don't want to fetch all of the attributes if reworking is not
necessary, but need the ModuleDefination to know that

A static factory method `CreateReworker` only returns a reworker
if work is required. This way, there is never a half-loaded state
to consider.

Other:
- Renamed some fields to match standard coding convention
- Also update integration makefile to include new required args

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-05-10 09:06:29 -05:00
Steve Hawley 6afe259e08
[nnyeah] Module information extensions (#14956)
Added code to find what (if any) Xamarin platform we depend on.
Tests as per usual.
The code is not called from main (yet).
2022-05-10 09:51:52 -04:00
Manuel de la Pena 2e8d0d8473
[Tools] Enable nullability on Execution.cs (#14954) 2022-05-10 09:23:54 -04:00
Rolf Bjarne Kvinge 1be1d746d6
[apidiff] Fix comparison of assemblies with different names. (#14964)
When we compare assemblies with different names (such as Xamarin.iOS vs
Microsoft.iOS, or Microsoft.iOS vs Microsoft.MacCatalyst), we need to adjust
one the xml definitions to match the other with regards to the assembly name.
2022-05-10 14:22:30 +02:00
Manuel de la Pena fb77743c21
[CI] Perform the classic sign-notarize of each pkg in parallel. (#14932)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-05-10 07:21:40 -04:00