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

3344 Коммитов

Автор SHA1 Сообщение Дата
Jeffrey Stedfast 8d8a071a29 [msbuild] Improved logic for obtaining local IP addresses for WiFi debug (#2835)
* [msbuild] Improved logic for obtaining local IP addresses for WiFi debug

* If we can't resolve the local host, connect to microsoft.com and use LocalEndPoint

* Use UDP instead of TCP to avoid network latency
2017-10-05 14:00:44 +02:00
Rolf Bjarne Kvinge 0b199a7080 [tests] Exclude tests whose category is !BITCODE when running on watchOS/Release. Partially fixes #59947. (#2839)
Exclude tests whose category is !BITCODE when running on watchOS/Release. This
also requires a minor update to xharness to add a BITCODE conditional
compilation flag to generated watchOS/Release projects configurations.

This partially fixes #59947 (the fix will be complete once we bump to mono/2017-08).

https://bugzilla.xamarin.com/show_bug.cgi?id=59947
2017-10-05 13:41:04 +02:00
Jeffrey Stedfast ebea0f76a8 [msbuild] Properly subclass GetPropertyListValueTaskBase (#2793) 2017-10-04 20:08:54 +02:00
Alexander Köplinger eb35aaaa38 Cleanup disabled Mono profiles for configure (#2836)
profile2, profile4 and profile4_5 were removed a long time ago, there's only profile4_x nowadays.
2017-10-04 07:21:17 +02:00
Rolf Bjarne Kvinge d264709b8d Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline. (#2822)
* Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline.

Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as
the trampoline, so that it's safer for normal users (crashes due to incorrect
usage are rare and random, and as such they're also hard to track down).

Additionally introduce a BlockLiteral.SetupBlockUnsafe method, that still has
the old behavior, so that we can use it in our own (reviewed) code.

* [ObjCRuntime] Add some validation to BlockLiteral.SetupBlock.

* Use BlockLiteral.SetupBlockUnsafe instead of .SetupBlock

Use SetupBlockUnsafe in our own code, because we know our own code is using it
correctly (by passing a trampoline stored in a static field, so that the GC
doesn't free it).

* [tests] Fix xammac tests build.
2017-10-03 18:59:10 +02:00
Chris Hamons aca0e2ed2e Fix a number of introspection test failures on 10.13 (#2815) 2017-10-02 16:55:23 -05:00
Rolf Bjarne Kvinge 43f84f6ca7 [xharness] Improve device selection, taking wireless devices into account. (#2827)
* [xharness] Don't list unusable devices.

* [xharness] Show the list of candidate devices in the html report.

* [xharness] Prioritize devices depending on the interface speed.
2017-10-02 17:37:19 +02:00
Rolf Bjarne Kvinge ea3f9736e1 [xharness] Don't freak out if we find a device we can't categorize. (#2824)
It's most likely just an untrusted device (in which case DeviceClass will be
an empty string).
2017-10-02 17:37:00 +02:00
Rolf Bjarne Kvinge f23bd79eff [xharness] Timestamp install logs. (#2825)
* [xharness] Simplify code a bit.

Logs are TextWriters by themselves, so no need to get a StreamWriter to pass
to API that takes TextWriter, when we can just pass the log instance itself.

This makes it possible to timestamp external process output (because
Log.Timestamp is honored instead of bypassed).

* [xharness] Timestamp install logs.

So that we get exact numbers of how long it takes to install on watch (and if
the watch installation stalls, or just times out because it takes too long).
2017-10-02 17:36:41 +02:00
Rolf Bjarne Kvinge 38a680aba6 Bump maccore to get support for wireless devices in mlaunch, and publicize it. (#2826)
commit xamarin/maccore@a02bf81604
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Mon Oct 2 14:32:13 2017 +0200

    Bump maciostools to get support for wireless devices in mlaunch.

    commit xamarin/maciostools@1d6be938cb
    Merge: 0d6932b 854cbc0
    Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
    Date:   Mon Oct 2 07:44:19 2017 +0200

        Merge pull request #91 from rolfbjarne/mlaunch-wireless-devices

        [mlaunch] Add support for wireless devices.
2017-10-02 17:26:47 +02:00
Rolf Bjarne Kvinge 622af84e72 [xharness] Always wait for processes to exit, even if they're killed. Fixes #57846. (#2823)
Always wait for processes to exit, even if they're killed.

Also make absolutely sure that we can safely handle any exception when getting
the ExitCode, no matter what.

https://bugzilla.xamarin.com/show_bug.cgi?id=57846
2017-10-02 12:06:57 +02:00
Rolf Bjarne Kvinge 700480180f Fix solutions & projects as VSfM wants them. (#2821) 2017-10-02 11:57:50 +02:00
Chris Hamons c3d8555217 Move MT0091 to common code so Xamarin.Mac can benefit from the more f… (#2780)
- https://bugzilla.xamarin.com/show_bug.cgi?id=59186
2017-09-29 12:45:53 -05:00
Rolf Bjarne Kvinge 5cc46dee6f [UIKit] Store delegates in static members so that the GC doesn't free them prematurely. (#2820)
Split off from PR #[2383](https://github.com/xamarin/xamarin-macios/pull/2383)

https://github.com/xamarin/xamarin-macios/pull/2383
2017-09-29 17:25:02 +02:00
Rolf Bjarne Kvinge f660667990 [registrar] Store the attribute type separately for availability attributes saved for the registrar. (#2807)
The registrar requires the availability attributes to work properly, which is
non-trivial when the linker is being used, because the linker runs before the
registrar, and will remove availability attributes.

For this reason we store the availability attributes separately when the
linker removes them so that the registrar can still find them, but
unfortunately it's not enough to store the CustomAttribute instance, because
it may end up crippled: if the attribute type itself is removed by the linker,
then it's not possible to get the attribute type from the CustomAttribute
instance, because 'attribute.Constructor.DeclaringType' returns null (the
linker sets the declaring type of the constructor to null).

Solution: store the attribute type separately; now we use a Tuple of
CustomAttribute and TypeReference.

Fixes this ugly exception:

    System.NullReferenceException: Object reference not set to an instance of an object
      at XamCore.Registrar.Registrar.RegisterAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00146] in /work/maccore/master/xamarin-macios/src/ObjCRuntime/Registrar.cs:2316
      at XamCore.Registrar.StaticRegistrar.Generate (System.Collections.Generic.IEnumerable`1[T] assemblies, System.String header_path, System.String source_path) [0x00035] in /work/maccore/master/xamarin-macios/tools/common/StaticRegistrar.cs:4197
      at Xamarin.Bundler.RunRegistrarTask.Execute () [0x00001] in /work/maccore/master/xamarin-macios/tools/mtouch/BuildTasks.mtouch.cs:154
2017-09-29 17:19:08 +02:00
Rolf Bjarne Kvinge 05484c915f [registrar] Don't verify the SDK for protocol members, and fix the SDK check for other cases. Fixes #59617. (#2790)
* [registrar] Remove useless interface.

* [registrar] Don't store LinkContext in the static registrar when in can be fetched from the Target. Partially fixes #59617.

This avoids a problem where our code would store null because LinkContext
wasn't created yet when the static registrar instance was created.

This fixes the missing error from bug #59617.

https://bugzilla.xamarin.com/show_bug.cgi?id=59617

* [registrar] Don't verify the SDK for protocol members. Partially fixes #59617.

It's not needed, because protocol members don't end up in the registrar output
anyway (and would thus not prevent the registrar code from compiling).

Classes that implement any protocol members would still run into the SDK
check, so this should not prevent real problematic code from being reported
either.

https://bugzilla.xamarin.com/show_bug.cgi?id=59617

* [tests][mtouch] Fix tests after registrar changes.
2017-09-28 17:35:21 +02:00
Rolf Bjarne Kvinge eeb6256834 [mtouch] Show MT0123 if the executable assembly does not reference the product assembly. Fixes #59798. (#2801)
It does not make sense to create Xamarin.iOS projects that don't reference
Xamarin.iOS.dll, so make this an explicit error.

This fixes a NullReferenceException which could (when building for device, or
when not using simlauncher) occur, and instead shows the MT0123 error.

> MTOUCH : error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
> System.NullReferenceException: Object reference not set to an instance of an object
>   at Xamarin.Bundler.Target.GatherFrameworks () [0x00065] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/common/Target.cs:122
>   at Xamarin.Bundler.Target.ProcessAssemblies () [0x000c2] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Target.cs:802
>   at Xamarin.Bundler.Application.ProcessAssemblies () [0x0002f] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:1407
>   at Xamarin.Bundler.Application.BuildManaged () [0x00001] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:831
>   at Xamarin.Bundler.Application+<>c.<BuildAll>b__134_1 (Xamarin.Bundler.Application v) [0x00000] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:779
>   at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <48b95f3df5804531818f80e28ec60191>:0
>   at Xamarin.Bundler.Application.BuildAll () [0x00050] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:779
>   at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00481] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/mtouch.cs:1420
>   at Xamarin.Bundler.Driver.Main (System.String[] args) [0x0000f] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/mtouch.cs:945

https://bugzilla.xamarin.com/show_bug.cgi?id=59798
2017-09-28 17:31:55 +02:00
Alexander Köplinger f7e079cde3 Bump min Mono version to 5.4.0.201 (#2797)
The previous one was a pretty old 5.4 build by now.
2017-09-27 22:20:27 -04:00
Sam Schwarz 098011f67d Update run-tests to use file. (#2789) 2017-09-27 19:31:19 +02:00
Rolf Bjarne Kvinge 8319b67fd3 [src] Fix directory dependence for build/tvos/reference/OpenTK-1.0.dll.config. Fixes #59432. (#2787)
Otherwise copying OpenTK-1.0.dll.config to its target destination would fail
because the target directory didn't exist:

> make[2]: *** [build/tvos/reference/OpenTK-1.0.dll.config] Error 1

https://bugzilla.xamarin.com/show_bug.cgi?id=59432
2017-09-27 18:44:42 +02:00
Rolf Bjarne Kvinge d0bb1c5d0c [tests] Recover BindAs test that got lost in merges. (#2786) 2017-09-27 14:05:54 +02:00
Sebastien Pouliot a61590967f [linker] Use correct namespace for async debugging helpers. Fixes #59015 (#2782)
Replace https://github.com/xamarin/xamarin-macios/pull/2704
It's almost identical but it adds unit tests so this does not regress.

The issue was already reported in [1] but the fix [2] was incorrect
and that was also missed when the bug was verified by QA [3].

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=55037
[2] https://github.com/xamarin/xamarin-macios/pull/2004
[3] https://bugzilla.xamarin.com/show_bug.cgi?id=55037#c10
2017-09-27 07:50:01 -04:00
Rolf Bjarne Kvinge a867c4fa3b [mmp/mtouch] Don't link with frameworks not available in the current SDK. Fixes #59636. (#2777)
We already have this logic for frameworks we detect according to the namespace
of the used types, but not for frameworks we detect from P/Invokes.

Fix this by using the same framework exclusion logic for frameworks detected
from P/Invokes: don't link with frameworks not available in the current SDK.

https://bugzilla.xamarin.com/show_bug.cgi?id=59636
2017-09-27 11:40:28 +02:00
Rolf Bjarne Kvinge ee91b95c19 [tests] Unset XCODE_DEVELOPER_DIR_PATH when building mac binding projects. (#2776)
Unset XCODE_DEVELOPER_DIR_PATH when building mac binding projects, so that
when building from VSfM when the Xcode in VSfM differs from the system Xcode
(according to xcode-select) the Xcode command-line tools don't end up confused
and fail in strange ways.
2017-09-27 10:48:51 +02:00
Rolf Bjarne Kvinge 8798cea04f [docs] Fix doc formatting. (#2778)
Remove duplicated MT4171/MT4172 documentation, and fix some formatting to be proper markdown.
2017-09-27 10:47:13 +02:00
Rolf Bjarne Kvinge 50148e7c51 Merge pull request #2288 from rolfbjarne/bindas-registrar-support
[registrar] Add support for the BindAs attribute.
2017-09-26 15:39:46 +02:00
Rolf Bjarne Kvinge 40d9cb9bf1 Merge remote-tracking branch 'origin/master' into bindas-registrar-support 2017-09-26 10:58:35 +02:00
Chris Hamons 8100830d83 Add NSApplicationLaunchUserNotificationKey in more obvious location
- https://bugzilla.xamarin.com/show_bug.cgi?id=58243
2017-09-25 16:09:02 -05:00
Jon Goldberger f87c911017 Moved #if !XAMCORE conditional 2017-09-25 09:49:09 -10:00
Jon Goldberger 7b90d75638 Add #if !XAMCORE conditional around old binding 2017-09-25 09:46:39 -10:00
Jon Goldberger cf5604ae53 Remove #if !XAMCORE conditional 2017-09-25 09:41:20 -10:00
Jon Goldberger 1a8b172758 Fix bug 58243 new PR
This replaces PR #2765
2017-09-25 09:34:50 -10:00
Rolf Bjarne Kvinge cd542a0845 [generator] Remove non-IKVM code. (#2769) 2017-09-25 14:37:51 -04:00
Rolf Bjarne Kvinge 254aa87d3c [generator] Improve BI1049 to include the type name + member name of the broken definition, instead of just the member name. (#2768) 2017-09-25 14:37:24 -04:00
Timothy Risi 65daac9573 [macOS] Fix new xtro failures introduced by the xcode9 branch (#2741) 2017-09-25 09:50:44 -08:00
Rolf Bjarne Kvinge 90d0d978d9 Bump maccore to get fix for #59667. (#2770)
https://bugzilla.xamarin.com/show_bug.cgi?id=59667
2017-09-25 19:15:10 +02:00
Rolf Bjarne Kvinge 017c98aa77 [docs] Document how to add support for new BindAs types. 2017-09-25 16:38:21 +02:00
Chris Hamons 7c676d663b [macos] Release mode AOT should delete dSYM files (#2760)
- https://bugzilla.xamarin.com/show_bug.cgi?id=59647
- There is no reasonable knob on the AOT process to not generate dSYM so delete after processing (these specific files are spawned only by/during AOT)
- AppStore complains if you ship bundles with dSYM fils present
- Fix mmp unit test stand alone execution (make run in tools/mmp uses different (faster) build system than full mmp tests)
2017-09-25 09:34:48 -05:00
Chris Hamons 0442739c4f Fix CFMessagePort crash when returning data from callback (#2764)
- The system releases returned CFData, which caused over release crashes
- https://bugzilla.xamarin.com/show_bug.cgi?id=51263
- Was checked w\ instruments after fix for leaks (none found).
2017-09-25 09:22:25 -05:00
Rolf Bjarne Kvinge 7d0be430c9 [apidiff] Use MSBuild. (#2759) 2017-09-25 16:18:19 +02:00
Alex Soto d2415cae1f [CoreAnimation] CATextLayer.Alignment* strings should be CATextLayerAlignment enum / type. Fixes bug 59537 (#2723)
https://bugzilla.xamarin.com/show_bug.cgi?id=59537

Removes constants from `CATextLayer` (only for XAMCORE_4_0) and creates
two smart enums `CATextLayerTruncationMode` and `CATextLayerAlignmentMode`.
Also this introduces two new strong properties into CATextLayer class,
`TextTruncationMode` and `TextAlignmentMode` that takes the new enums
respectively, these new properties are meant to replace their
string counterparts `TruncationMode` and `AlignmentMode`.
2017-09-25 10:12:53 -04:00
Rolf Bjarne Kvinge 884ab8fe48 [linker] Filter smart enum conversion to enums, and downgrade warnings to log messages.
Only apply smart enum conversion to enums, and downgrade related warnings to log messages.

This avoids spurious warnings like this:

> warning MT4124: Invalid BindAsAttribute found on 'Bindings.Test.ObjCRegistrarTest.GetBooleanArray': could not find the smart extension type System.BooleanExtensions. Please file a bug report at https://bugzilla.xamarin.com

when the BindAs attribute is valid, but just not about a smart enum in the first place.
2017-09-25 16:06:54 +02:00
Rolf Bjarne Kvinge 748273e2ae [linker] Teach 'provider to string' logic about method return types.
Prevents these little gems:

> warning MT4124: Invalid BindAsAttribute found on 'Mono.Cecil.MethodReturnType': could not find the smart extension type ...
2017-09-25 16:06:54 +02:00
Rolf Bjarne Kvinge 147d5963c6 [registrar] Don't store stuff in instance variables before knowing if the stuff is correct. 2017-09-25 16:06:54 +02:00
Rolf Bjarne Kvinge b38c114fbe Add support for NSDirectionalEdgeInsets NSValues to the BindAs attribute. 2017-09-25 16:06:50 +02:00
Rolf Bjarne Kvinge 517c90ad01 [tests] Make more tests Xcode-version-aware. 2017-09-25 16:06:39 +02:00
Rolf Bjarne Kvinge e08490eccd [runtime] Ask clang to be quiet about using new API for our conversion methods. 2017-09-25 13:20:32 +02:00
Rolf Bjarne Kvinge 613e84ac47 Merge remote-tracking branch 'origin/master' into HEAD 2017-09-25 13:20:30 +02:00
Timothy Risi de8ad17723 [macOS][AOT] Remove 'experimental', indicate hybrid is only for 'all' (#2742)
--aot[=VALUE]          Specify assemblies that should be AOT compiled
                               - none - No AOT (default)
                               - all - Every assembly in MonoBundle
                               - core - Xamarin.Mac, System, mscorlib
                               - sdk - Xamarin.Mac.dll and BCL assemblies
                               - |hybrid after option enables hybrid AOT which
                               allows IL stripping but is slower (only valid
                               for 'all')
                                - Individual files can be included for AOT via +
                               FileName.dll and excluded via -FileName.dll

                               Examples:
                                 --aot:all,-MyAssembly.dll
                                 --aot:core|hybrid,+MyOtherAssembly.dll,-
                               mscorlib.dll
2017-09-22 10:13:33 -08:00
Chris Hamons 7112b3b7f6 [macos] Add objc_msgSends to un-break classic API (#2757)
- https://bugzilla.xamarin.com/show_bug.cgi?id=59673
2017-09-22 13:07:27 -05:00