We often (e.g. previews, service releases) update the API diff during
a release cycle. The current code generated a new GUID every time, which
is not what correct since it's the same document.
This uses an MD5 digest of the filename as the source of the GUID so
it will remain constant once created (and updated).
* Share much more marshalling code between the dynamic and static registrar
(by refactoring code into separate functions used by both).
* Fix an issue with multiple out/ref parameters in the dynamic registrar.
* Throw an error instead of silently ignoring out/ref parameter types we don't
completely understand in the dynamic registrar.
* Fix returning Class/SEL out/ref parameters in the static registrar.
* Fix returning NSString out/ref parameters in the dynamic registrar.
* Add/fix support for out/ref arrays everywhere.
* Fix support for the various supported out/ref parameter types in the
generator.
* Add lots of tests.
Fixes https://github.com/xamarin/xamarin-macios/issues/5171.
* [builds] Add support for using cached downloads of the mono archives from ~/Library/Caches.
* [apidiff] Add support for using cached downloads of apidiff bundle from ~/Library/Caches.
* [builds] Move the facade check targets down in the Makefile.
Move the facade check targets below the declaration of their prerequisite
variables (*_BCL_TARGETS), since otherwise the prerequisite variable will be
empty when the facade check targets are read by make, they end up with no
prerequisites at all, and the targets fail.
* [builds] Make the tools build use mono's packaged logic instead of our own.
Make the 'tools64' build use mono's packaged build logic instead of our own.
This is the first step to consuming the BCL from the mono archive.
Also completely refactor the 'tools64' build by removing everything we don't
need and renaming it to 'bcl' (since that's more representative of what it
does).
* [apidiff] Unzip downloaded files into a temporary subdirectory.
Before we unzip, we remove the target directory. This is a bad idea if the
target directory is also used for other things: in particular it breaks
parallel make if some other target tries to write to the temporary directory.
Instead unzip downloaded files into a subdirectory exclusively used by those
unzipped files, which means we can remove at will before unzipping.
* [apidiff] Use mono-api-[info|html].exe from the mono archive.
Some code now need to be initialized a few lines earlier... otherwise we
end up with an error like:
```
/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/bin/mmp --version
error MM0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1[T].get_Value () [0x0000d] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Nullable.cs:48
at Xamarin.Bundler.Driver.get_TargetFramework () [0x00001] in /Users/poupou/git/xamarin/xamarin-macios/tools/common/Driver.cs:198
at Xamarin.Bundler.Application.get_Platform () [0x00001] in /Users/poupou/git/xamarin/xamarin-macios/tools/common/Application.cs:62
at Xamarin.Bundler.RuntimeOptions.ParseHttpMessageHandler (Xamarin.Bundler.Application app, System.String value) [0x0002f] in /Users/poupou/git/xamarin/xamarin-macios/src/ObjCRuntime/RuntimeOptions.cs:43
at Xamarin.Bundler.RuntimeOptions.Create (Xamarin.Bundler.Application app, System.String http_message_handler, System.String tls_provider) [0x00007] in /Users/poupou/git/xamarin/xamarin-macios/src/ObjCRuntime/RuntimeOptions.cs:34
at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00a78] in /Users/poupou/git/xamarin/xamarin-macios/tools/mmp/driver.cs:377
at Xamarin.Bundler.Driver.Main (System.String[] args) [0x00015] in /Users/poupou/git/xamarin/xamarin-macios/tools/mmp/driver.cs:211
```
* [runtime] Add an inner exception parameter to Runtime.CreateProductException.
This allows us to simplify code by using inner (and outer) exceptions as
a means to provide information instead of passing extra information
around in order to create decent exceptions.
One example is how we pass the selector and method name to the method
that converts from a native id to a managed NSObject instance: passing
this information is not necessary anymore if we can use two exceptions,
one for the failure to convert from an id to a NSObject instance,
wrapped in a second that tells which method/selector call ran into this
conversion problem.
* [runtime] Throw better exceptions when the dynamic registrar can't marshal something.
* [runtime] Throw a better exception when something goes wrong when trying to marshal a return value.
* [runtime] Use inner exceptions to convey failure information instead of trying to create a single exception with all we know.
* Fix merge problem.
* [registrar] Make a copy of the static registrar for Xamarin.Mac/Classic.
Make a copy of the static registrar for Xamarin.Mac/Classic, one which is
compatible with the binary artifacts we ship for Xamarin.Mac/Classic
(libxammac, XamMac.dll).
This way the static registrar can evolve in the future, without breaking
Xamarin.Mac/Classic.
* [runtime] Make a copy of the runtime headers too.
* Update comment.
* [mmp] Delay creating a Target instance until we know if we're a Classic or Unified app.
Otherwise the wrong static registrar might be created.
* [tests] Add sample tester.
Add a unit project that looks for iOS/macOS/tvOS sample projects in several
repositories, and builds them all.
* [tests][sampletester] Remove known issue which has now been fixed.
* [tests] Only run sample tests on CI in Azure Devops.
* Remove the possibility of automatically running the sample tests with
xharness (so the sample tests won't run on PR bots or internal bots when the
'run-all-tests' label is added). It's still possible to run the sample tests
manually from the xharness web UI.
* Automatically trigger the sample test run in Azure Devops if the
'run-sample-tests' label is applied to a PR (and that PR is executed on
internal Jenkins).
* Fix typo.
* Fix path.
* Verbose output to track down scheduling failure.
* Bump maccore to get improved debug spew.
Diff: f527c9c526..f89d74b165
* [tests][sampletester] Fix build for TodoWCF.
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 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
- A long while ago, this hack was added to mmp:
// Shutup the warning until we decide on bug: 36478
if (shortendName.ToLowerInvariant () == "intl" && IsUnifiedFullXamMacFramework)
- This breaks use cases were we explicitly ask for that file, so let's
fix that for now until we can fix the root cause for real
It's needed at runtime since it changes exception handling behavior.
The "link sdk" Linker_RuntimeWrappedException() test relies on it,
but this never showed up there since "link sdk" doesn't link the main assembly.
Existing binding binaries won't have the `[Preserve]` attribute on
the `Handler` field and, with the new optimization, would not work
properly.
This tweak make sure that older, already linker-safe, bindings will
remain this way (safe) in this (and future) versions of both iOS and
macOS SDK.
According to Rolf it's fine to always add since the native linker will
figure out if it's really needed and so customers don't need to do
anything when using -all_load.
Mono started using System.IO.File from CoreFX and it has a different
behavior for File.Copy() when the target is a directory:
It just puts the file into the directory instead of raising an exception.
In order to fix the MT1015 test we just check ourselves whether the target
is a directory.