* Update to mono 2017-04 branch
* Patch from Zoltan to fix build error with CppSharp.CppParser.dll
* Include new linker files in Makefile, based on mareks commit
* [msbuild] Fix running bgen for Xamarin.Mac.
bgen must be executed with the system mono, not bmac-mobile-mono, and without
the MONO_PATH variable set.
* System.Data tests should act as if they are running on mobile profile
* Add --runtime=mobile to mono flags in Modern
* Move runtime launcher options up
* System.Data tests should use Mobile profile (mac fix)
* Bump 2017-04 to pick up AOT and assembly resolution fixes
* Build fixes for netstandard.dll and System.Drawing.Primitives.dll
The new handling went in with https://github.com/mono/mono/pull/4501.
I also noticed that WatchOS was missing a target for System.Drawing.Primitives.dll, so I added that.
* Add netstandard.dll to 2.1/Facades and System.Drawing.Primitives.dll to WatchOS
* Fix 2.1/Facades/netstandard.dll build
* Fix the netstandard targets
* Bump mono to latest 2017-04 commit
* [xharness] Fix adding defines to csproj by correctly detecting existing defines.
* Bump mono to latest 2017-04 commit
* [mtouch] Update csproj with new files.
* [mtouch] Improve reporting for MarkExceptions from the linker.
* Bump mono to latest 2017-04 commit
* Bump mono to pick up latest 2017-04 branch commit (Fixes#55436)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55436
* Add a missing Makefile dependency
* Chris Hamons patch to apply --runtime=mobile as necessary at AOT time
(It is currently being applied for some configurations at runtime only)
* Bump system mono
* Bump mono for assembly loader changes
* Bump system mono
* Update assemblies list as some where moved to facades
6ca5ec442bc38e4d9220
* Bump mono to latest 2017-04 commit
* Add another new facade
* Bump mono to tip of 2017-04.
* Bump mono to tip of 2017-04.
* [tests][mtouch] Adjust tests to cope with fewer assemblies being included in linked apps. Fixes#56307 and #56308.
System.dll is now completely linked away unless the app actually uses any
System.dll API.
This is the change that caused this to change: 4960d5d2a2
Previously the following types would always be kept by the linker:
```
$ monodis --typedef System.dll
Typedef Table
1: (null) (flist=1, mlist=1, flags=0x0, extends=0x0)
2: ObjCRuntime.INativeObject (flist=1, mlist=1, flags=0xa0, extends=0x0)
3: Mono.Net.CFObject (flist=1, mlist=2, flags=0x100000, extends=0x5)
4: Mono.Net.CFArray (flist=4, mlist=19, flags=0x100, extends=0xc)
5: Mono.Net.CFNumber (flist=5, mlist=32, flags=0x100100, extends=0xc)
6: Mono.Net.CFRange (flist=5, mlist=41, flags=0x100108, extends=0x25)
7: Mono.Net.CFString (flist=7, mlist=42, flags=0x100100, extends=0xc)
8: Mono.Net.CFData (flist=8, mlist=53, flags=0x100100, extends=0xc)
9: Mono.Net.CFDictionary (flist=8, mlist=63, flags=0x0, extends=0xc)
10: Mono.Net.CFMutableDictionary (flist=10, mlist=75, flags=0x100100, extends=0x24)
11: Mono.Net.CFUrl (flist=10, mlist=80, flags=0x100100, extends=0xc)
12: Mono.Net.CFRunLoop (flist=10, mlist=83, flags=0x100100, extends=0xc)
13: Mono.Net.CFBoolean (flist=10, mlist=94, flags=0x100, extends=0x5)
14: Mono.AppleTls.SecCertificate (flist=13, mlist=106, flags=0x100100, extends=0x5)
15: Mono.AppleTls.SecIdentity (flist=14, mlist=122, flags=0x100, extends=0x5)
16: Mono.AppleTls.SecIdentity/ImportOptions (flist=19, mlist=134, flags=0x100105, extends=0x5)
17: Mono.AppleTls.SecKey (flist=19, mlist=134, flags=0x100100, extends=0x5)
18: Mono.AppleTls.SecStatusCode (flist=21, mlist=141, flags=0x100, extends=0x69)
19: Mono.AppleTls.SecTrustResult (flist=395, mlist=141, flags=0x100, extends=0x69)
20: Mono.AppleTls.SecImportExport (flist=404, mlist=141, flags=0x100100, extends=0x5)
21: Mono.AppleTls.SecImportExport/<>c (flist=404, mlist=144, flags=0x102103, extends=0x5)
22: Mono.AppleTls.SecPolicy (flist=406, mlist=147, flags=0x100100, extends=0x5)
23: Mono.AppleTls.SecTrust (flist=407, mlist=154, flags=0x100100, extends=0x5)
24: System.Security.Cryptography.OidGroup (flist=408, mlist=174, flags=0x101, extends=0x69)
25: System.Security.Cryptography.Oid (flist=420, mlist=174, flags=0x100101, extends=0x5)
26: System.Security.Cryptography.CAPI (flist=423, mlist=176, flags=0x100180, extends=0x5)
27: System.Security.Cryptography.AsnEncodedData (flist=423, mlist=178, flags=0x100101, extends=0x5)
28: System.Security.Cryptography.X509Certificates.X509Utils (flist=424, mlist=179, flags=0x100100, extends=0x5)
29: System.Security.Cryptography.X509Certificates.PublicKey (flist=424, mlist=181, flags=0x100101, extends=0x5)
30: System.Security.Cryptography.X509Certificates.X509Certificate2 (flist=429, mlist=188, flags=0x102101, extends=0x51)
31: System.Security.Cryptography.X509Certificates.X509Certificate2Impl (flist=431, mlist=204, flags=0x100080, extends=0x55)
32: System.Security.Cryptography.X509Certificates.X509CertificateCollection (flist=431, mlist=209, flags=0x102101, extends=0x6d)
33: System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator (flist=431, mlist=212, flags=0x100102, extends=0x5)
34: System.Security.Cryptography.X509Certificates.X509Helper2 (flist=432, mlist=217, flags=0x100180, extends=0x5)
35: <PrivateImplementationDetails> (flist=432, mlist=218, flags=0x100, extends=0x5)
36: <PrivateImplementationDetails>/__StaticArrayInitTypeSize=9 (flist=433, mlist=219, flags=0x113, extends=0x25)
```
Some of the above types from System.dll implemented ObjCRuntime.INativeObject
(from System.dll), which our linker detected as implementing
ObjCRuntime.INativeObject (from Xamarin.iOS.dll), so these types were treated
as custom NSObject subclasses, and the MarkNSObjects linker step would mark
them (which would in turn cause all the other types in the list to be marked).
With that change, these types now implement ObjCRuntimeInternal.INativeObject,
and the linker does not treat them as custom NSObject subclasses anymore.
I think the new behavior is correct: these types do not actually inherit from
the real NSObject/INativeObject, so the linker should not treat them as such.
This may run into different bugs because the linker might now remove more
stuff than before, but that would be a different issue.
This means that the fix is to modify these tests accordingly.
https://bugzilla.xamarin.com/show_bug.cgi?id=56307https://bugzilla.xamarin.com/show_bug.cgi?id=56308
* Bump mono to latest.
* Fix merge conflict that was missed
* [mtouch] Renumber new error which clashes with an existing error number in master.
commit migueldeicaza/MonoTouch.Dialog@c2c64825ba
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date: Wed May 10 11:09:16 2017 +0200
Fix tvOS compiler warning.
Fix never assigned warning by conditionally remove all usages and the
definition of the variable (instead of just some usages):
> MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs(47,15): warning CS0649: Field 'DialogViewController.searchBar' is never assigned to, and will always have its default value null
[iOS]BCL test failed with Assertion failures error: * Assertion at /Users/builder/data/lanes/4691/6bea7a5b/source/xamarin-macios/external/mono/mono/mini/aot-runtime.c:2924, condition `!async' not met and condition `unwind_options == MONO_UNWIND_NONE' not
https://bugzilla.xamarin.com/show_bug.cgi?id=54658
First: only run `EnsureSdkPath` if `EnsureAppleSdkRoot` passed.
Both are based on similar install checks, `SdkIsInstalled` (used for `SdkIsInstalled`) is empty
if `IsInstalled` (used by `EnsureAppleSdkRoot`) is false.
This avoid having 2 error messages when only 1 at a time is needed.
Second: improved `EnsureAppleSdkRoot` error message mentioning the wrong Xcode developer path (which triggered the error)
as well as the exact way to fix it.
commit e0baa814b0cacfece4c615255c67c4300db4a8b1
Author: Zoltan Varga <vargaz@gmail.com>
Date: Thu Jan 5 19:44:42 2017 -0500
[aot] Avoid a crash in the aot compiler if a delegate doesn't have a BeginInvoke ()/EndInvoke () method. Fixes#51206.
https://bugzilla.xamarin.com/show_bug.cgi?id=51206
* [msbuild] Added a PropertyListEditor task which works like PlistBuddy
This is a convenience Task for customers and isn't currently used
by the core MSBuild targets.
* [msbuild] The PropertyListEditor task does not need a SessionId property
* [msbuild] Added support for non-container root plist elements
* [msbuild] Catch & log exceptions loading plist document
* [Jenkins] Make test to write output as an xml file so that it can be parsed by the jenkins bot.
* Point to the correct Touvh.Unit repo.
* Use the available property to determine if we are being ran in Jenkins.
* Log where are test results stored.
* Add @MonkeyWrench: prefix.
* Ensure that we do set the build env in jenkins/run-tests.sh
* Do not mix Wrench with Jenkins. The reports in jenkins can be Xml, in Wrench we prefer the old style.
* Ensure that the main node of the unit tests does contain the target, that will improve the tests results reporting.
* Revert "Fix binding project LinkWithAttributes generation to prevent rebuilds" (#1018)
* Added xslt to be used to keep the old Test Reports until we move to only Jenkins reports.
* Add an extra log for the xslt transformation.
* Point to the correcto dir in jenkins.
* Deal with the xslt once we have finished rather than in a batch.
* Remove noise.
* Readd case removed in rebase.
* Fix indentation.
* Skip lock keychain.
Use the 'unique' argument to MobileProvisionIndex's lookup methods
to only get back the most recent versions of each provisioning
profile so that we don't accidentally pick an older version.
The recent BTLS changes causes trouble for both XI and XM,
which should be fixed with this bump:
commit mono/mono@78619b1580
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date: Tue Oct 25 18:44:33 2016 +0200
[System] Don't build managed BTLS code on monotouch
After 2fb07d6c6d5b3915ef4665391febbb7b8be09fb5 BTLS can be used as a shared lib,
but this caused an issue in some monotouch tools which grepped the P/Invokes for `__Internal`
since these icalls wouldn't resolve on monotouch since BTLS is disabled there.
Instead, we now completely leave out building the managed parts of BTLS when
BTLS is not enabled.
(cherry picked from commit db21455da9d74354b75accafc4e8e3c21466f048)
This bump also includes the fix for #45847:
commit mono/mono@c023b2b30a
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date: Mon Oct 24 19:50:16 2016 +0200
[System] Remove any CFNetwork usage from the watchOS profile. Fixes#45847.
The MacProxy class uses CFNetwork, but since CFNetwork is not a public
framework on watchOS, we can't use it.
So remove MacProxy completely (it only contains internal classes), and throw
PlatformNotSupportedException in any API that used it (the managed networking
stack is not supported on watchOS anyway, so this should be safe).
https://bugzilla.xamarin.com/show_bug.cgi?id=45847https://bugzilla.xamarin.com/show_bug.cgi?id=45902https://bugzilla.xamarin.com/show_bug.cgi?id=45847
commit mono/mono@c023b2b30a
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date: Mon Oct 24 19:50:16 2016 +0200
[System] Remove any CFNetwork usage from the watchOS profile. Fixes#45847.
The MacProxy class uses CFNetwork, but since CFNetwork is not a public
framework on watchOS, we can't use it.
So remove MacProxy completely (it only contains internal classes), and throw
PlatformNotSupportedException in any API that used it (the managed networking
stack is not supported on watchOS anyway, so this should be safe).
https://bugzilla.xamarin.com/show_bug.cgi?id=45847
commit mono/mono@fb01e0742c
Merge: 960ae16 3090df7
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date: Wed Oct 5 13:50:49 2016 +0200
Merge pull request #3708 from rolfbjarne/linker-mark-nested-types-4.8.0
[linker] We need to mark nested types even if the declaring type isn't marked.
commit c5b34ef43985f253ebf9db87b66633cb3530e788
Author: Martin Baulig <martin.baulig@xamarin.com>
Date: Sat Oct 1 21:29:32 2016 +0200
[System]: ChainValidationHelper: ignore port number when validating a certificate's host name.
(cherry picked from commit 4d28eb4b889d4f317675998f906cd9ca47440566)
(cherry picked from commit 7c88bf755ec19ecd7e6db578de329567ee41b8d0)
This fixes the certificate validation bug here:
https://bugzilla.xamarin.com/show_bug.cgi?id=44708
* Added rewritten NSUrlSessionHandler that handles memory better
This is a rewrite of the ModernHttpClient version of NSUrlSessionHandler, it has better handling for memory that provides a more consistant memory footprint. It accomplishes this by using NSInputStream for requests, and reading and disposing directly from NSData instead of transitioning the NSData to a byte[] array.
* Try to fix build of PR #31
* [foundation] Restore compatibility with the new NSUrlSessionHandler
Mostly my comments in PR #174
* Add support for redirection [1]
* Add support for credentials [1]
* Add support for caching [2]
* Remove 2nd dictionary lookup in GetHeaderSeparator
* Avoid extraneous cast for credentialsToUse
PR 177 [3] adds tests that ensure no commits can remove, or change
default values, for handlers.
[1] breaking changes (feature, not API)
[2] breaking change (API removal)
[3] https://github.com/xamarin/xamarin-macios/pull/177
* [foundation] Restore compatibility with the new NSUrlSessionHandler
Mostly my comments in PR #174
* Add support for redirection [1]
* Add support for credentials [1]
* Add support for caching [2]
* Remove 2nd dictionary lookup in GetHeaderSeparator
* Avoid extraneous cast for credentialsToUse
PR 177 [3] adds tests that ensure no commits can remove, or change
default values, for handlers.
[1] breaking changes (feature, not API)
[2] breaking change (API removal)
[3] https://github.com/xamarin/xamarin-macios/pull/177
* Try to fix build of PR #31
* prevent DEADLOCK in UI code
* Added ConfigureAwait(false) to Task.Delay to prevent DEADLOCK when the stream is being awaited on the UI thread
* added a few more ConfigureAwait(false) statments that were missed on first pass
* Fix some small style issues.
* Set the default value of AllowAutoRedirect to true.
* Bump Mono to mono-4.8.0-branch commit 9437553e545f57443ccc33fe4129cbb6ac94f832.
* Rename MobileCertificateHelper -> AppleCertificateHelper.
All the non-Apple-specific functionality now lives in System.dll's
MobileTlsContext, so it can be shared with BTLS.
* Remove old src/Security/Tls sources which have been moved into System.dll
a couple of weeks ago.
Bump Mono to pickup the BCL part of the fix
commit 7ec55bdbe668b917dddab9996ddda372bcc9a561
Author: Martin Baulig <martin.baulig@xamarin.com>
Date: Fri Sep 23 17:42:05 2016 +0200
[AppleTls]: Flush the write queue before finishing the handshake.
It is possible for SSLHandshake() to return SslStatus.Success while we're still
having a pending write (AsyncOperationStatus.WantWrite).
This is because our managed write callback must never return 'WouldBlock', so
SSLHandshake() things that all data have been sent while we still have them in
our write queue.
When this happens, we currently flush the write queue then call SSLHandshake()
again via AsyncOperationStatus.WantWrite -> AsyncOperationStatus.Continue.
This returns SslStatus.Protocol on iOS 10.
(cherry picked from commit 2cc1b887c1c6e86b6844116c8010bac3305c84f9)
* mono revision at fc99fc4313e7afd75a4605a48b47e7d1273aefe4
* watch-mono revision is more recent to include the BCL adjustments
for types not available on that platform
* Update two linksdk test cases that won't work _normally_ for watchOS
It was missing a few recent commits which broke the build with:
[8:45:24] make[5]: *** No rule to make target `/Users/builder/data/lanes/3426/8568b0c2/source/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/mono/4.5/System.Numerics.Vectors.dll'. Stop.
Bump Mono to pickup the BCL part of the fix (from temporary PR'ed branch)
commit 7ec55bdbe668b917dddab9996ddda372bcc9a561
Author: Martin Baulig <martin.baulig@xamarin.com>
Date: Fri Sep 23 17:42:05 2016 +0200
[AppleTls]: Flush the write queue before finishing the handshake.
It is possible for SSLHandshake() to return SslStatus.Success while we're still
having a pending write (AsyncOperationStatus.WantWrite).
This is because our managed write callback must never return 'WouldBlock', so
SSLHandshake() things that all data have been sent while we still have them in
our write queue.
When this happens, we currently flush the write queue then call SSLHandshake()
again via AsyncOperationStatus.WantWrite -> AsyncOperationStatus.Continue.
This returns SslStatus.Protocol on iOS 10.
(cherry picked from commit 2cc1b887c1c6e86b6844116c8010bac3305c84f9)
Bump Mono to pickup the BCL part of the fix.
commit 2a3e4002ead94aae6796c7eb7af9a850398beb51
Author: Martin Baulig <martin.baulig@xamarin.com>
Date: Fri Sep 23 17:42:05 2016 +0200
[AppleTls]: Flush the write queue before finishing the handshake.
It is possible for SSLHandshake() to return SslStatus.Success while we're still
having a pending write (AsyncOperationStatus.WantWrite).
This is because our managed write callback must never return 'WouldBlock', so
SSLHandshake() things that all data have been sent while we still have them in
our write queue.
When this happens, we currently flush the write queue then call SSLHandshake()
again via AsyncOperationStatus.WantWrite -> AsyncOperationStatus.Continue.
This returns SslStatus.Protocol on iOS 10.
(cherry picked from commit 2cc1b887c1c6e86b6844116c8010bac3305c84f9)
commit mono/mono@2acdc49ff6
Author: Zoltan Varga <vargaz@gmail.com>
Date: Fri Sep 9 03:14:12 2016 +0200
[llvm] Disable llvm again for methods with large basic blocks in non-llvm-only mode, the workaround doesn't seem to work. Fixes#42395.
This is a backport of PR #810.
http://bugzilla.xamarin.com/show_bug.cgi?id=42395
The watchOS device has limited networking support; in particular
it does not allow inbound/output network connections using 'bind'
(kernel-level sandbox restrictions).
This means that we can't use BSD sockets to connect to the debugger
in the IDE on the desktop. Instead we create an http tunnel that
knows how to convert socket send/recv data into http requests on
both sides.
https://bugzilla.xamarin.com/show_bug.cgi?id=41554
* [msbuild] Move detection of network configuration to a separate task.
* [msbuild] Set NSAllowArbitraryLoads when debugging watchOS apps.
The only way to have reliable http connections from the watchOS 2 device
to the mac is to set NSAllowArbitraryLoads.
See also: https://forums.developer.apple.com/thread/6205
* Bump [watch-]mono to master to get fix for #43658.
https://bugzilla.xamarin.com/show_bug.cgi?id=43658
* [mtouch/mmp] Fix build after breaking cecil update in mono.
Also use mono's cecil instead of our own cecil submodule for mtouch.
* Bump [watch-]mono to get compilation fixes after cecil bump in mono.
* Remove cecil submodule, we only use the one in mono now.
* [C8] Bump to latest Mono 4.6.0 commit
Brings in the netstandard updates from https://github.com/mono/mono/pull/3394
We also had to add a new assembly System.IdentityModel.dll to the mobile profiles while doing that work.
* Add System.IdentityModel to Sdk assemblies
Fixes the following mtouch test failure:
```
Xamarin.Linker.SdkTest.iOS_Classic : BCL
Expected:
But was: < "System.IdentityModel" >
at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x47bec88 + 0x00047> in :0
at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x47bec58 + 0x0001f> in :0
at Xamarin.Linker.SdkTest.BCL (System.String path) <0x47bccf0 + 0x003f3> in :0
at Xamarin.Linker.SdkTest.iOS_Classic () <0x47bcc50 + 0x0001b> in :0
```
Brings in the netstandard updates from https://github.com/mono/mono/pull/3394
We also had to add a new assembly System.IdentityModel.dll to the mobile profiles while doing that work.
* Bump mono and watch-mono
* [mmp] Preserve TransparentProxy::StoreRemoteField
This is needed to prevent a mono assert when xamarin-macios is built
with mono master after mono/mono@6b8e96c
* Restore the mono_jit_thread_attach signature to how it's in
the latest stable.
* Don't use the new attach/detach methods when using the dynamic
mono runtime, since the methods aren't available in any released
version of mono. Also XM doesn't support coop yet, so it's not
needed.
* And finally don't use the new attach/detach methods for anything
that isn't building using mono/master (iow only watchOS). This
should be changed once the rest of the products starts using
mono/master again.
commit mono/mono@e4d33f70d4
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date: Wed May 18 14:21:23 2016 +0200
[System] Throw PlatformNotSupportedException if NetworkInformation.NetworkChange is used on watchOS. (#3010)
NetworkInformation.NetworkChange requires the SystemConfiguration framework,
which isn't available on watchOS.
And add the new file to the build.
commit spouliot/Touch.Unit@ffe2a6dcff
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date: Wed May 25 18:11:59 2016 +0200
Add a HttpTextWriter that can send logs over http.
There is no public API to create raw sockets with watchOS, so
we can't use Tcp directly, thus the need for using Http.
This gives us all the recent AppleTls fixes.
commit 9c18adad5b816f297b8c5b20e60088843697abab
Author: Martin Baulig <martin.baulig@xamarin.com>
Date: Mon May 16 14:43:05 2016 -0400
[corlib]: Update X509Helper.Apple.cs.
It's based on our work, with a few extra commits. That should reduce a
bit the checkout time and ensure more consistent results.
Also bump Touch.Unit since that requires a small API change.
[linker] Method decorated with System.Runtime.Serialization.*Attribute must be marked, Fixes#40574
Some serialization attributes are unlikely to have direct reference,
from IL, but will be needed at runtime to correctly serialize (or
deserialize) objects.
* OnDeserializedAttribute
* OnDeserializingAttribute
* OnSerializedAttribute
* OnSerializingAttribute
This, along with aad627c5e8ddf15397c87fa2d3e18b54f929c927, fixed bug
40574. The later part will have new unit tests in XI.
references:
https://bugzilla.xamarin.com/show_bug.cgi?id=40574