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

34 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 2652f49694
Bump MSBuild.StructuredLogger to v2.2.100 (#19503)
Also store the version globally to avoid having to update so many places
in future bumps.
2023-11-28 15:15:29 +01:00
Rolf Bjarne Kvinge ad7996ee7b
Add the .NET TFM as a constant to the generated SdkVersions.cs from our Makefile variables. (#19401)
This way we can avoid hardcoding the TFM in a few more places.
2023-11-08 13:36:50 +01:00
Rolf Bjarne Kvinge 6df0d4ae6c
Bump MSBuild.StructuredLogger to latest release. (#18701) 2023-08-29 13:26:42 +02:00
Rolf Bjarne Kvinge f678a5feab
[tools] Use current .NET to build nnyeah (+ tests). (#18806) 2023-08-25 07:40:24 +02:00
Rolf Bjarne Kvinge 72a7f88b94
[tests] Improve assertion when a .NET test fails executing 'dotnet'. (#18700)
Improve assertion when a .NET test fails executing 'dotnet' by including
more information (any errors in particular) in the assert message.
2023-08-14 11:57:21 +02:00
Rolf Bjarne Kvinge afb6505f8c
[tests] Bump Microsoft.NET.Test.Sdk version to latest stable. (#17462)
The older version of Microsoft.NET.Test.Sdk depends on an older version of
Newtonsoft.Json, which triggers automated security warnings.

Ref: https://devdiv.visualstudio.com/DevDiv/_componentGovernance/113130/alert/7090885?typeId=12169115
2023-02-07 14:52:45 +01:00
Rolf Bjarne Kvinge ce895603a5
[autoformat] Add the rest of tools. (#16801) 2022-11-17 17:18:34 -05:00
Steve Hawley d4e827ce20
[nnyeah] Added code to look up the legacy platform dll instead of requiring it. (#15631)
* Added code to look up the legacy platform dll instead of requiring it.
2022-08-05 10:21:52 -04:00
Steve Hawley 8983e56be0
fix incorrect attribute (#15549) 2022-07-20 12:11:28 -04:00
Steve Hawley 0731d6d8bd
limit to one reference to Microsoft.iOS (#15477) 2022-07-14 10:27:24 -04:00
Steve Hawley ee03980483
removed constructor size limit (#15459) 2022-07-11 17:00:40 -04:00
Steve Hawley 8965dde9a0
[nnyeah] Fix more ctor/handle mapping (#15324)
* Fix more ctor/handle mapping

* Make sure the mapping happens
2022-06-23 14:24:28 -04:00
Rolf Bjarne Kvinge 3be1d9d760
Use unix-style line endings in project files. (#15303)
This also removes the BOM in a few project files.

This is a whitespace-only change, as can be seen here: https://github.com/xamarin/xamarin-macios/pull/15303/files?w=1
2022-06-21 17:22:58 +02:00
Steve Hawley e1c334564e
[nnyeah] Added correct mapping for NSObject.Handle fixing #15261 (#15270)
* Added correct mapping for NSObject.Handle

* removed dead code
2022-06-15 14:17:13 -04:00
Steve Hawley 18f18f9b76
[nnyeah] ensure that outside invocations of IntPtr constructors will work correctly (#15246)
* ensure that outside invocations of IntPtr constructors will work correctly

* Remove E0017 and ignore such constructors instead of hard erroring, they exist in real life
2022-06-14 11:22:20 -04:00
Steve Hawley 3e12f0550e
[nnyeah] add code to handle get_ClassHandle calls. Fixes #15218 (#15225)
* add code to handle get_ClassHandle calls.

* tweak on the unit test
2022-06-09 11:48:15 -04:00
Chris Hamons 3ab94ebfb3
[nnyeah] Convert IntPtr newobj calls to first convert to NativeHandle (#15220)
- This change rewrite the IL instruction stream of newobj calls into NSObject derived ctors to convert the IntPtr to a NativeHandle via the implicit ctor
- Integration tests will come later as we execute a subset of the nugets we convert.
- Also fix a minor issue in showing E0016 as it was missing an argument in the error string.

- Fixes https://github.com/xamarin/xamarin-macios/issues/15133
2022-06-08 14:33:26 -05:00
Steve Hawley a78f058507
tests now pass (#15207) 2022-06-07 12:04:54 -04:00
Steve Hawley e303d4bc9a
Test now passes (#15193) 2022-06-03 10:31:04 -04:00
Steve Hawley 989f9ea1db
[nnyeah] Report on work done on ctors (#15191)
* Report on work done

* whitespace, !
2022-06-02 15:36:33 -04: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
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
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
Chris Hamons 873cc1ea96
[nnyeah] Integration tests run against dotnet tool from nupkg (#15051) 2022-05-18 09:23:49 -05:00
Chris Hamons 2aae39d8de
[nnyeah] Optionally run integration test nnyeah in-process (#15049) 2022-05-17 16:27:19 -05: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
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
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
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
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
Steve Hawley 5631ca5c8e
[nnyeah] Start testing (#14913)
Added code to:

compile a string to a platform library
collect the output of the compilation process
check for errors
Added a single unit test of the smoke test variety.
2022-05-09 09:42:34 -04:00