This fixes an issue with the api comparison since the api comparison fails if
it detects unexpected modified files. Putting the temporary files in
APIDIFF_DIR makes sure the api comparison doesn't see those files as
unexpectedly modified.
Fixes https://github.com/xamarin/maccore/issues/1522.
Fixes this when running on tvOS using dylibs:
> [FAIL] Introspection.CheckSymbols : dlsym() not found mono_native_initialize()
Now:
* If on iOS, we'll always have the `mono_native_initialize` symbol, because the symbol is used in P/Invoke in a user assembly (the test assembly itself), and mtouch will make the AOT-compiled code use dlsym for P/Invokes in user assemblies (and when using dlsym we can't (native) strip away the symbol).
* If on watchOS or tvOS, we'll have the symbol when we're loading `mono_native_initialize` from a dylib. If loading `mono_native_initialize` from a static library, we can (native) strip away the symbol because mtouch will make the AOT-compiled P/Invoke use a static reference to the native symbol, and thus the `mono_native_initialize` symbol will not be present in the executable.
The mono bump added some new tests that fail on device + release
configurations. This is a known issue by mono and they'll fix it in the
next version but will not be backported to 2018-10.
We don't necessarily have an entry assembly (when running tests from within
the IDE), nor is the entry assembly the one that names the tool (when running
tests from outside the IDE).
* Don't call Environment.Exit in case of errors. That's just rude.
* Make ErrorHelper's static state thread-static. This makes it possible to run
multiple generators simultaneously, each in its own thread. While this is
not the best solution (the best would be to not have static state at all),
but the best solution would require many more code changes (every line that
shows an error/warning would have to be modified).
* Make it possible to clear ErrorHelper's static state. This makes it possible
to run multiple generators sequentially in the same process.
* Make ErrorHelper.Show re-throw errors (but not warnings) unless it's the
top-level catch handler. Otherwise errors won't necessarily cause Main to
return 1.
Fixes this NRE:
error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.ArgumentNullException: Value cannot be null.
Parameter name: collection
at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x00003] in <a104f9cbbafd4348bcc580acb0a3f8a8>:0
at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <a104f9cbbafd4348bcc580acb0a3f8a8>:0
at Xamarin.Bundler.Application.BuildApp () [0x00040] in /work/maccore/master/xamarin-macios/tools/mtouch/Application.cs:1541
at Xamarin.Bundler.Application.BuildNative () [0x0001f] in /work/maccore/master/xamarin-macios/tools/mtouch/Application.cs:903
at Xamarin.Bundler.Application+<>c.<BuildAll>b__148_2 (Xamarin.Bundler.Application v) [0x00000] in /work/maccore/master/xamarin-macios/tools/mtouch/Application.cs:840
at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x0001e] in <a104f9cbbafd4348bcc580acb0a3f8a8>:0
at Xamarin.Bundler.Application.BuildAll () [0x00076] in /work/maccore/master/xamarin-macios/tools/mtouch/Application.cs:840
at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x004a1] in /work/maccore/master/xamarin-macios/tools/mtouch/mtouch.cs:1369
at Xamarin.Bundler.Driver.Main (System.String[] args) [0x00015] in /work/maccore/master/xamarin-macios/tools/mtouch/mtouch.cs:877
* NSDataDetector
* Add constructor found in header. No idea where the commented-out
constructor came from, it's not in the header, so I removed it.
* Add overloads that take NSTextCheckingType in addition to
NSTextCheckingTypes. Apple's API take NSTextCheckingTypes, but all the
documentation and samples say that you're supposed to pass one or more
or'ed NSTextCheckingType values, so support that as well without casting
between enums.
* NSRegularExpression
* GetMatches had the wrong return type, so add a GetMatches2 that does it
right. Also add a test to make sure it's really right.
* Bind 'regularExpressionWithPattern:options:error:' with a static method.
There's a corresponding constructor, but constructors returning out
NSError parameters isn't the nicest API (when the NSError is important),
so add the static method as well.
* Add a missing [NullAllowed] on FindFirstMatch's return value.
* NSRegularExpressionOptions
* Add missing enum value.
Fixes https://github.com/xamarin/xamarin-macios/issues/5881.