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

78 Коммитов

Автор SHA1 Сообщение Дата
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
Steve Hawley d8dfd37cc6
[nnyeah] IConvertible ancient history (#14945)
This was old code that hung around from before we discovered that we can't fully handle `IConvertible`
2022-05-09 14:23:22 -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
Manuel de la Pena 43c2270b9d
[Nnyeah] Ensure that we have all the needed xamarin-macios dlls when using make. (#14910)
We need to be able to embed the dlls as a resource to compare the diff
assemblies. To do so we are going to ensure that we have called make in
the root dir so that the needed deps are present. This change is not yet
in the csproj, that will be a diff commit.



Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
2022-05-06 18:41:11 -04:00
Chris Hamons a9cab8f1c1
[nnyeah] Add dotnet tool support (#14914)
- Stores legacy XI/XM and NET6 XI/XM inside nuget (unused for now)

% dotnet nnyeah
  -h, -?, --help
  -i, --input=VALUE
  -o, --output=VALUE
  -v, --verbose
  -f, --force-overwrite
  -s, --suppress-warnings

% mv nupkg/nnyeah.0.1.0.nupkg nupkg/nnyeah.0.1.0.zip
% unzip nupkg/nnyeah.0.1.0.zip
Archive:  nupkg/nnyeah.0.1.0.zip
..
  inflating: content/legacy/Xamarin.iOS.dll
  inflating: content/legacy/Xamarin.Mac.dll
  inflating: content/net6/Microsoft.iOS.dll
  inflating: content/net6/Microsoft.macOS.dll
..



Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Update PackagePath for net libs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-05-06 13:55:27 -04:00
Chris Hamons 2eb220caae
[nnyeah] Bump to NET6 (#14901)
- .NET5 on my mac has inconsistent debugging due to lack of support for apple's arm arch
- The tool is going to run against NET6, so why built it on NET5
2022-05-06 11:36:45 -05:00
Chris Hamons 2ec9649663
[nnyeah] Beginnings of an integration test framework (#14898) 2022-05-06 08:54:12 -05:00
Chris Hamons a8964905a8
[nnyeah] Fix race on error message output (#14900)
- Errors were written with Write and then Exit which at least in VSCode would exit before the write flushed to the console
- WriteLine seems better behaved
- See https://github.com/dotnet/sdk/issues/5928#issuecomment-215895840
2022-05-05 11:53:03 -05:00
Steve Hawley 2f7289fe1e
[nnyeah] Add usage of module mapping (#14885)
* Remove existing attributes

* Attribute Conversion

* Map old types and members to new ones

* minor changes.

* cut down on toString calls.
2022-05-04 16:01:40 -04:00
Steve Hawley 1c7d63f393
[nnyeah] Move to generating map on the fly (#14868)
Remove the XML serialization and now make the map into a form that will work much better for actually modifying the assemblies
2022-05-03 09:40:51 -04:00
Steve Hawley 1aa3e4d17b
[nnyeah] Assembly comparator (#14836)
This adds code to compare a .NET 5 version of Xamarin.macOS to Microsoft.macOS or Xamarin.iOS to Microsoft.iOS and outputs a huge xml file with incompatible translations or maps from one to the other.
2022-05-02 10:59:40 -04:00
Manuel de la Pena f2d9d317ec
[Nnyeah] Set nullability enabled by default. (#14858) 2022-04-30 10:11:30 -04:00
TJ Lambert 1d4daf2b4a
[Localization] Add the resx file for localization and move errors and warnings (#14703)
* Add the resx file for localization and move error and warning strings

* Change NStrings.resx -> Errors.resx

* using the new namespace

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-04-12 09:36:54 -05:00
Steve Hawley a2624f6515
[nnyeah] Namespace change (#14710)
`nnyeah` -> `Microsoft.MaciOS.Nnyeah`
2022-04-08 14:52:02 -04:00
Steve Hawley df395f2cff
[nnyeah] Nfloat fields (#14696)
Transform nfloat field references to getters on NFloat
2022-04-07 15:41:31 -04:00
Steve Hawley e0eed38ce1
[nnyeah] Nfloat type substitution (#14675)
This code substitutes NFloat for nfloat.
2022-04-07 09:42:18 -04:00
Steve Hawley 900ed88249
[nnyeah] Array copy (#14630)
Add support for ArrayCopy
2022-04-04 15:04:04 -04:00
Steve Hawley 891610b533
[nnyeah] Warn on IConvertible (#14586)
set up warnings on IConvertible calls
2022-03-31 09:36:43 -04:00
Steve Hawley 41b076cc0e
Lets do options (#14540)
* Remove existing attributes

* Attribute Conversion

* let's add some options and put in feedback

* don't need this check anymore

* Don't copy paste code without reading, Steve

* fallout from no more nulls

* catch exception from options parsing, check for file existence, fix white space

* whitespace

* add --force-overwrite

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-03-30 14:48:08 -04:00
Rolf Bjarne Kvinge becdade8d2
[nnyeah] Fix path to nnyeah.dll. (#14554)
This makes rebuilds detect that the dll has already been built.
2022-03-29 15:34:06 -04:00
Rolf Bjarne Kvinge ee302b17c3
Revert "[nnyeah] Fix makefile to use msbuild. (#14533)" (#14546)
This reverts commit 073165fef6.

Fixes this build error:

/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1232,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/Users/rolf/work/maccore/dotnet/xamarin-macios/tools/nnyeah/nnyeah/nnyeah.csproj]
gmake[2]: *** [Makefile:9: bin/Debug/net5.0/nnyeah.dll] Error 1
2022-03-29 15:45:09 +02:00
Manuel de la Pena 073165fef6
[nnyeah] Fix makefile to use msbuild. (#14533) 2022-03-28 16:54:56 -04:00
Steve Hawley 6487ec485e
Lets do warnings (#14510)
* Remove existing attributes

* Attribute Conversion

* Added some events

* init only properties and uint

* propagation error
2022-03-28 16:06:54 -04:00
Manuel de la Pena 3f698c47d9
[nnyeah] Add tool to be made via makefiles. (#14513)
Adding the needed Makefile and the dir to the parent one so that the
tool is also built in the CI.


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-03-28 11:52:59 -04:00
Manuel de la Pena af00cc664b
[nnyeah] Update usage to dotnet. (#14514) 2022-03-28 11:52:04 -04:00
Steve Hawley d47dc8d63c
Nnyeah (#14426)
* Remove existing attributes

* Attribute Conversion

* First cut of code for review.

* Clean up csproj

* nullable enable and cleanup nullability. Compiles with no errors or warnings.

* typo

* Remove nullables with cleaner code, reworked things with Try...pattern.

* last couple '== null' changes
2022-03-18 15:54:15 -04:00