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>
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.
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>
- .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
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.
* 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>
* 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>
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
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>
* 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