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

2783 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 6a60c251b4
[CI] Disable the CI trigger explicitly. (#15172) 2022-06-01 11:56:14 -04:00
Manuel de la Pena d68141113b
[CI] Fix if statements that's flipped. (#15165) 2022-06-01 11:25:59 -04:00
VS MobileTools Engineering Service 2 74380ebcd2
Localized file check-in by OneLocBuild Task: Build definition ID 14411: Build ID 6217070 (#15150) 2022-05-31 11:42:02 -05:00
Chris Hamons c17fd25583
[nnyeah] Map NSObject ctors with IntPtr to NativeHandle (#15134)
* [nnyeah] Remove NNYEAH_IN_PROCESS on IntegrationExamples.cs as it was cursed due to global caching in nuget tool install

* [nnyeah] Simplify test API

* [nnyeah] Map NSObject ctors with IntPtr to NativeHandle

- Fixes https://github.com/xamarin/xamarin-macios/issues/15120

This required a significant amount of refactoring:
- To resolve the base type of objects, we need to invoke cecil's Resolve
    - Resolve requires all assemblies to be loaded in memory, whcih requires a custom resolver to find them all
    - Note: This requires customer assemblies to include all non-platform dependencies to be next to the input
- This extra state prompted a refactor of Program.cs to create a tool 'AssemblyConverter' with instance variables to reduce param passing
- The ctor mapping logic is isolated to ConstructorTransforms to reduce the growth of Reworker.cs and make limited unit testing possible
- Turns out the flat removal of the platform assembly from the import list was wrong, as it caused all platform references, such as NSObject to
  be resolved from System.Runtime, which is wrong. So replace in place with the new platform assembly instead.
2022-05-31 10:40:56 -04:00
Manuel de la Pena 86fe13e17f
[CI] Split the pipeline in two, one for CI and a second one for PRs. (#15110) 2022-05-31 09:24:51 -04:00
Steve Hawley 6676f816f2
added missing test invocations (#15132) 2022-05-27 10:59:40 -04:00
Mauro Agnoletti 342fb340c8
Fix bundle.zip structure in 'Sign bundle.zip' step (#15135)
The files of the bundle.zip are being re-zipped inside a 'bundle' folder after signing, which is wrong since everything else is expecting the files directly inside the zip file without parent folders (as we were doing before)
2022-05-27 13:31:53 +02:00
Rolf Bjarne Kvinge 91b4d15a31
[devops] Fix the post-build pipeline after dependent pipeline rename. (#15129) 2022-05-27 10:03:34 +02:00
Steve Hawley f16c1bb993
implicit operator tests (#15128)
Added more tests for implicit operators.
2022-05-26 15:09:21 -04:00
Steve Hawley 2397b51a79
bitwise operator tests (#15123) 2022-05-26 09:56:04 -04:00
Steve Hawley 6826fb8665
[nnyeah] added tests for boolean operators (#15109)
* added tests for boolean operators

* updated ignore message
2022-05-25 09:59:24 -04:00
Rolf Bjarne Kvinge e3a03d2804
Remove the Visual Studio dependency. (#15102)
Remove our dependency on Visual Studio. Use the 'dotnet-t4' tool instead of
invoking the t4 tool embedded in Visual Studio.

Fixes this build error after installing VS Mac 2022:

> Cannot open assembly '/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.TextTemplating/TextTransform.exe': No such file or directory.
2022-05-25 08:26:51 +02:00
Steve Hawley 5946727d08
[nnyeah] Arithmetic tests (#15097)
* Added tests for arithmetic and basic casting
* trying to rebase off main to clean up the PR and future PRs
2022-05-23 15:47:54 -04:00
Rolf Bjarne Kvinge 02838f2c29
[tools] Fix nullability for the Execution.Environment field. (#15084)
The values for environment variables can be null (to remove said environment
variable).

Fixes this warning:

    tests/dotnet/UnitTests/TestBaseClass.cs(294,100): warning CS8620: Argument of type 'Dictionary<string, string?>' cannot be used for parameter 'environment' of type 'Dictionary<string, string>' in 'Task<Execution> Execution.RunWithStringBuildersAsync(string filename, IList<string> arguments, Dictionary<string, string>? environment = null, StringBuilder? standardOutput = null, StringBuilder? standardError = null, TextWriter? log = null, string? workingDirectory = null, TimeSpan? timeout = null, CancellationToken? cancellationToken = null)' due to differences in the nullability of reference types.
2022-05-23 17:36:06 +02:00
Sandy Armstrong 6632f88769
Provisionator's XcodeSelect now configures Xamarin Settings.plist (#15079) 2022-05-23 17:35:27 +02:00
Chris Hamons 7e8bd5cac4
[nnyeah] Centralize error handling (#15064)
- Due to https://github.com/microsoft/vstest/issues/3658 it is not possible to test code that exits the process on error
- Create a base class for nnyeah exceptions that we want to explicitly report (and not crash), ConversionException
- Move Main to Main2 and wrap it in a try/catch for this exception
2022-05-23 10:32:54 -05:00
Rolf Bjarne Kvinge 0c08e725f3
[devops] Publish builds from the net7.0 branch. (#15091) 2022-05-23 16:18:19 +02:00
Steve Hawley d2e0a364d6
[nnyeah] Lets nfloat (#15088)
Reactivated the nfloat tests.
2022-05-23 09:46:19 -04:00
Steve Hawley 94e40c8b11
[nnyeah] fix issues compiling against nnyeah touched libraries (#15082)
fix issues compiling against nnyeah touched libraries
2022-05-20 15:31:18 -04:00
Chris Hamons 03c3b3003a
[nnyeah] Add rest of top nuget examples to integration suite (#15058) 2022-05-20 05:48:29 -05:00
Chris Hamons add714ffb7
[nnyeah] Add unit test showing most common nuget failure (#15065)
- 'Error while attempting to map member System.IntPtr Foundation.NSObject::get_Handle() in old assembly'
- Also fix a strange directory name created by Cache.CreateTemporaryDirectory being called from async test method
2022-05-20 05:48:02 -05:00
TJ Lambert 1477c9bd51
[Localization] Use force-with-lease (#15054)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-05-18 15:18:34 -05:00
Steve Hawley 6d072fbc46
[nnyeah] Import Type and Member references (#15052)
import methods and types when referencing them
2022-05-18 16:18:04 -04:00
Chris Hamons 873cc1ea96
[nnyeah] Integration tests run against dotnet tool from nupkg (#15051) 2022-05-18 09:23:49 -05:00
Rolf Bjarne Kvinge 3bbaaf42cf
[devops] Compute DOTNET_TFM instead of hardcoding 'net6.0.' (#15005) 2022-05-18 13:33:08 +02:00
Rolf Bjarne Kvinge 4c2ddcf349
[dotnet-linker] Bump default trampoline count when using the interpreter on x64 in .NET. Fixes #14887. (#15025)
Fixes https://github.com/xamarin/xamarin-macios/issues/14887.
2022-05-18 11:27:28 +02:00
Rolf Bjarne Kvinge 5c08c5a689
[Runtime] Provide better diagnostics if we fail to invoke a method in CoreCLR. (#15043)
A stack trace like this isn't all that helpful:

    *** Terminating app due to uncaught exception 'System.Reflection.TargetException', reason: 'Object does not match target type. (System.Reflection.TargetException)
    at System.Reflection.RuntimeConstructorInfo.CheckConsistency(Object target)
    at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at ObjCRuntime.Runtime.InvokeMethod(MethodBase method, Object instance, IntPtr native_parameters) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.CoreCLR.cs:line 655
    at ObjCRuntime.Runtime.InvokeMethod(MonoObject* methodobj, MonoObject* instanceobj, IntPtr native_parameters) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.CoreCLR.cs:line 552
    at ObjCRuntime.Runtime.bridge_runtime_invoke_method(MonoObject* method, MonoObject* instance, IntPtr parameters, IntPtr& exception_gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/runtime/Delegates.generated.cs:line 1210

with this change we'll be told exactly which function we failed to call.
2022-05-18 11:09:10 +02:00
Chris Hamons 2aae39d8de
[nnyeah] Optionally run integration test nnyeah in-process (#15049) 2022-05-17 16:27:19 -05:00
Steve Hawley 3207ba2707
[nnyeah] Refactor module usage (#15048)
Clean up usage of modules in the app.
the var 'module' gets used all over the place. I'm going to refactor to fix up usage of imports and this will make things much easier to track.

In addition, there are a number of types that get used from module.TypeSystem.SomeType which I put into locals just to tidy up.
2022-05-17 16:35:14 -04:00
Chris Hamons f33ddd906d
[nnyeah] Convert integration test to nunit from Makefile (#15040)
- Also refactor test layout a bit to split unit from integration
- Integration should long term invoke the nuget installed, unit never will.
2022-05-17 09:24:35 -05:00
Rolf Bjarne Kvinge e7d367758a
[devops] Fix tests according to recent changes. (#15045) 2022-05-17 14:23:03 +02:00
Rolf Bjarne Kvinge 45b5379d43
[devops] Reword api diff GitHub text a bit and add index entry. (#15019) 2022-05-16 21:37:21 +02:00
VS MobileTools Engineering Service 2 61ef886513
Localized file check-in by OneLocBuild Task: Build definition ID 14411: Build ID 6156518 (#15034) 2022-05-16 15:01:18 -04:00
Steve Hawley 746cf884c0
[nnyeah] Fix for handling nfloat (#15021)
nfloat needed a proper reference to System.Runtime.InteropServices.
2022-05-16 11:53:33 -04:00
Chris Hamons 5249316b8a
[Nnyeah] nuget execution (#15017)
- Add a stupidly simple "download a nuget and test it" target
- Fix a few targets that should have had :: instead of : (I believe)

I tried to create a fancy define block to param this instead of hard coding, but I ran into the limits of my makefile example. Bike shedding an example would be appreciated, else we can go with this for now.
2022-05-16 09:23:13 -05:00
Rolf Bjarne Kvinge 82482edc70
[cecil-tests] Improve these tests a bit. (#14994) 2022-05-13 20:50:02 +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
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 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 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
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
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 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 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