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

1573 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge a495077533
[xcode11] Stop building/shipping 32-bit Xamarin.Mac bits. Partial fix for #6300. (#6393)
This includes:

* 32-bit version of Xamarin.Mac.dll and OpenTK.dll
* XamMac.dll and XamMac.CFNetwork.dll
* 32-bit versions of the runtime libraries (libxammac.a and friends).
* 32-bit version of the partial static library for Xamarin.Mac.
* Classic support in the generator.

We still ship a few Classic files so that Visual Studio for Mac continue to detect that Xamarin.Mac is installed (otherwise VSfM won't open Classic projects, which makes it impossible to use the migration wizard).

This makes our build slightly faster.

Partial fix for #6300.
2019-07-15 10:19:24 -07:00
monojenkins 1682210613 [master] [tests] Don't use unsupported characters in matrix names for yml scripts. Fixes xamarin/maccore#1831. (#6571)
* [tests] Don't use unsupported characters in matrix names for yml scripts. Fixes xamarin/maccore#1831.

Matrix names must be alphanumeric (+underscore), and recently Azure DevOps
stopped working correctly if that wasn't the case (unfortunately without a
good error message though, so it took a while to figure it out).

Fixes https://github.com/xamarin/maccore/issues/1831.

* [jenkins] Fix lookup of environment variables from matrix jobs.
2019-07-12 05:30:57 -07:00
Rolf Bjarne Kvinge 97bd041abc
[tests] Don't use unsupported characters in matrix names for yml scripts. Fixes xamarin/maccore#1831. (#6531)
* [tests] Don't use unsupported characters in matrix names for yml scripts. Fixes xamarin/maccore#1831.

Matrix names must be alphanumeric (+underscore), and recently Azure DevOps
stopped working correctly if that wasn't the case (unfortunately without a
good error message though, so it took a while to figure it out).

Fixes https://github.com/xamarin/maccore/issues/1831.

* [jenkins] Fix lookup of environment variables from matrix jobs.
2019-07-12 01:40:57 -07:00
Manuel de la Pena 7e96b317e8
[CoreMedia] Add support for CoreMedia on Xcode 11 beta 3. (#6513) 2019-07-11 20:14:58 +02:00
Rolf Bjarne Kvinge 8eb23eed0f
[xcode11][tests] Provision dotnet for the sample tests. Fixes xamarin/maccore#1811. (#6473) (#6488)
* [sampletester] Use dotnet v2.2.1XX if available. (#6185)

Works around https://github.com/NuGet/Home/issues/7956.

* [tests] Provision dotnet for the sample tests. Fixes xamarin/maccore#1811. (#6473)

Also synchronize configuration file creation to not run into threading issues.

Fixes https://github.com/xamarin/maccore/issues/1811.
2019-07-11 01:49:42 -07:00
Rolf Bjarne Kvinge 469287ed41
[mtouch] Work around regression in dyld. Fixes #6422. (#6545)
It seems dyld doesn't like an rpath without a trailing slash for '@executable_path'.

Fixes https://github.com/xamarin/xamarin-macios/issues/6422.
2019-07-10 05:06:27 -07:00
monojenkins a7f4c7011e [registar] Search the entire interface hierarchy for protocols. Fixes #6493. (#6524)
When we're searching for metadata for marshalling blocks, we must search the
entire interface hierarchy for protocols that implement optional members.

Fixes https://github.com/xamarin/xamarin-macios/issues/6493.
2019-07-09 06:50:55 -07:00
Rolf Bjarne Kvinge f80e6b4032
[sampletester] Provision Xcode when it's not already available. Fixes #6326. (#6498)
Add a separate provisioning script to install Xcode if it's not already installed on the bot.

For some unknown reason it needs to be a separate script, otherwise the provisionator will complain it doesn't know the required GitHub token to download Xcode.

Fixes https://github.com/xamarin/xamarin-macios/issues/6326.
2019-07-09 06:45:20 -07:00
TJ Lambert d0b332c0c3 [LinkPresentation] Add Xcode 11 Beta 1 & Beta 2 bindings (#6437)
* adding LinkPresentation - does not pass intro

* adding pull request message to linkpresentation.cs

* passes tests

* removed comments

* removed watch

* fixing whitespace changes
2019-07-08 16:24:53 -04:00
Rolf Bjarne Kvinge 0ceced29a9
[registar] Search the entire interface hierarchy for protocols. Fixes #6493. (#6514)
When we're searching for metadata for marshalling blocks, we must search the
entire interface hierarchy for protocols that implement optional members.

Fixes https://github.com/xamarin/xamarin-macios/issues/6493.
2019-07-08 08:41:55 -07:00
Rolf Bjarne Kvinge 50f74bd916
[tests] Provision dotnet for the sample tests. Fixes xamarin/maccore#1811. (#6473)
Also synchronize configuration file creation to not run into threading issues.

Fixes https://github.com/xamarin/maccore/issues/1811.
2019-07-03 12:41:33 +02:00
Sebastien Pouliot 71a657d2c5
Bump for Xcode 11 beta 3 (#6480) 2019-07-02 23:34:24 -04:00
Manuel de la Pena fa78fb38d0
[BackgroundTasks] Add new Framework for Xcode 11 beta 1. (#6438) 2019-07-02 15:54:21 +02:00
TJ Lambert 065ad880d3 [Speech] Add Xcode 11 Beta 1 & Beta 2 bindings (#6440)
* adding Speech

* Style changes and fixed copyright

* fixing requested changes

* adding spacing to make less red in diff

* adding [DisableDefaultCtor] to SFSpeechRecognitionResult and SFTranscription

* Update src/speech.cs

Co-Authored-By: Alex Soto <alex@alexsoto.me>

* Update src/speech.cs

Co-Authored-By: Alex Soto <alex@alexsoto.me>

* Update src/speech.cs

Co-Authored-By: Alex Soto <alex@alexsoto.me>
2019-07-01 19:42:49 -04:00
Jonathan Peppers a51e9f8e88
[xibuild] support for SDK-style projects & Xamarin.Forms test (#6461)
Context: 4ecedac733/src/Shared/BuildEnvironmentHelper.cs (L567-L586)
Context: 1d71d99837/tools/xabuild

When using `xibuild` to build an SDK-style project:

    tools/xibuild/xibuild -- msbuild/tests/MyXamarinFormsApp/MyXamarinFormsAppNS/MyXamarinFormsAppNS.csproj /restore

It was failing with:

    Resolving SDK 'Microsoft.NET.Sdk'...
    Project "msbuild/tests/MyXamarinFormsApp/MyXamarinFormsApp.csproj" is building "msbuild/tests/MyXamarinFormsApp/MyXamarinFormsAppNS/MyXamarinFormsAppNS.csproj" (GetTargetFrameworks target(s)):
    Building with tools version "Current".
    msbuild/tests/MyXamarinFormsApp/MyXamarinFormsAppNS/MyXamarinFormsAppNS.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.

Looking at this code, it looks pretty familiar -- it came from xabuild!

xibuild was currently setting `MSBuildSDKsPath` via a config file:

    <msbuildToolsets default="Current">
      <toolset toolsVersion="Current">
        <property name="MSBuildSDKsPath" value="/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/Current/bin/Sdks" />

Reviewing the source code for MSBuild, they don't even look for this
value via MSBuild properties... They just look for Visual Studio
directories and a `MSBuildSDKsPath` environment variable. We don't have
to use this in Xamarin.Android, because we do things a different way.
There was craziness involved to get both Windows & Mac working.

For this to work on Mac, we can just set `MSBuildSDKsPath` when
starting the new MSBuild process.

I cleaned up how `MSBUILD_EXE_PATH` is set so both of these variables
are just set via `ProcessStartInfo.EnvironmentVariables`.

Now I can fully build a Xamarin.Forms project that references a
netstandard library with `xibuild`:

    $ tools/xibuild/xibuild -- msbuild/tests/MyXamarinFormsApp/MyXamarinFormsApp.csproj /restore
    ...
    Build succeeded.
        0 Warning(s)
        0 Error(s)
    Time Elapsed 00:00:15.83

~~ New Tests ~~

I went ahead and added a new Xamarin.Forms project to test and verify
that it builds. It is the Blank Forms app template from latest VS4Mac.

With the changes to `xibuild`, I was able to build with the in-process
MSBuild APIs.
2019-07-01 12:20:32 -05:00
TJ Lambert 903c3eec31 [PencilKit] Add Xcode 11 Beta 1 & Beta 2 bindings (#6415)
* Adding PencilKit to the src

* forgot the mac constants

* adding PencilKit and fixed whitespace

* removing whitespace

* removed mac capabilities and added ignore for PencilKit.todo

* removed newline

* added the iOS-PencilKit.ignore file

* removed pencilkit.todo

* adding DesignatedDefaultCtor
2019-06-27 09:18:58 -04:00
Sebastien Pouliot 644cf70370
[pushkit] Update for Xcode 11 beta 1 (#6432)
No change in beta 2

This enable PushKit on watchOS and macOS.

Availability macros suggest this is available on tvOS 13 but the
headers are not in the tvOS SDK (at least in beta 2)
2019-06-27 05:19:42 -07:00
Sebastien Pouliot dbe0d21282
[coremotion] Update for Xcode 11 beta 1 (#6419)
No change in beta 2

This enable some API in macOS. Headers are now present and some types are
marked as unavailable on macOS - but, sadly, nothing got marked as new
for 10.15 :|
2019-06-26 18:44:33 -07:00
Sebastien Pouliot 53c6b6d74e
[authenticationservices] Update for Xcode 11 beta 1 and 2 (#6408)
Also enable the framework for macOS, watchOS and tvOS
2019-06-26 05:27:29 -07:00
TJ Lambert 6ad81d8e63 [IncomingCallNotifications] Add Xcode 11 Beta 1 & Beta 2 bindings (#6374)
* adding IncomingCallNotifications

* adding IncomingCallNotifications

* added comments about INSCopying:copy issue

* INSCopying -> NSCopying

* passing intro and extro and added IgnoreAsync and skip iOSApiCtorInitTest

* removed newlines

* additional newline

* making recommended changes after breaking branch

* removed todo files
2019-06-24 14:42:45 -04:00
tj-devel709 2781658938 [SoundAnalysis] Add Xcode 11 Beta 1 & Beta 2 bindings (#6351)
* adding Sound Analysis

* set up error domain and added CMTimeRange for all platforms except watch

* removed whitespaces

* removed more whitespaces

* edited framework files and constants. Changed header names and added todo files

* Apply feedback

* fixing head and skipping functions with class issues

* fixing spacing-tab issues
2019-06-21 10:05:27 -04:00
Rolf Bjarne Kvinge e9ce1e222a
Merge pull request #6381 from rolfbjarne/xcode11-bump-mono-d16-2
[xcode11] Merge d16-2. Fixes #6325.
2019-06-20 19:08:10 +02:00
Rolf Bjarne Kvinge 0cd58ff199 [xharness] Add helper methods to get/set deployment target in plist for macOS. 2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge 523349bf69 Merge remote-tracking branch 'origin/d16-2' into xcode11-bump-mono-d16-2 2019-06-20 10:27:04 +02:00
Rolf Bjarne Kvinge 14cac96c90
[d16-2] Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279) (#6361)
* Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279)

* Bump VSMac to 8.1.0.2742 to fix msbuild issues

This is required to get the support for the msbuild `ToolsVersion`
change from `15.0` to `Current`.

* [tests][msbuild] Fix Binding resources test with updated msbuild

Test failure with updated msbuild and vsmac 8.1:

```
Xamarin.iOS.Tasks.NativeReferencesNoEmbedding("iPhone").ShouldNotUnnecessarilyRebuildBindingProject(True)
     Binding project build did not create package?
  Expected: True
  But was:  False

at Xamarin.iOS.Tasks.NativeReferencesNoEmbedding.ShouldNotUnnecessarilyRebuildBindingProject (System.Boolean framework) [0x000a0] in <74b8f7d8a53e40109916d305bb4d7403>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo cul
ture) [0x0006a] in <0519fa732e8845b6a809ce9180f541db>:0
```

The test builds the project multiple times. Before the 3rd build, the project
file's timestamp is updated and expects that the binding package will be
rebuilt. But it is not, because the target `_CreateBindingResourcePackage`
doesn't depend on that project file. So, add that to the target inputs.

* [nuget] Use xibuild to run nuget

Fix errors seen during `nuget restore` for tests:

```
Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xammac_tests/xammac_tests.csproj(213,3): error MSB4024: The imported project file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" could not be loaded. Could not find file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets"
```

* [xibuild] Fix incorrect mscorlib.dll being used (#6068)

* [xibuild] Fix incorrect mscorlib.dll being used

The `GuiUnit_NET_4_5` project, when built with `xibuild` uses the wrong `mscorlib.dll`.

From https://github.com/xamarin/xamarin-macios/issues/5760#issuecomment-472457202 :

```
- mscorlib.dll is being used from mono/4.5 and the other system assemblies are from mono/4.5-api
- GuiNet* project is built with xibuild

What is happening here is:

	xibuild sets[1] `SetToolsetProperty ("TargetFrameworkRootPath", FrameworksDirectory + Path.DirectorySeparatorChar);`
	which points to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks`.
	This causes $(FrameworkPathOverride) to be set[2] to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETFramework/v4.5`,
	but that doesn't have a mscorlib.dll, so it gets reset[3] to /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5/.

	If we don't set TargetFrameworkRoothPath, then we get `FrameworkPathOverride = /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api`,
	causing `_ExplicitReference=/Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api/mscorlib.dll`(correct one) to be used.
```

Fixes https://github.com/xamarin/xamarin-macios/issues/5760

1. https://github.com/xamarin/xamarin-macios/blob/master/tools/xibuild/Main.cs#L209
2. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L79
3. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L84

* Revert "Workaround https://github.com/xamarin/xamarin-macios/issues/5760 in generator csproj"

This reverts commit 9bd927bb7f.

The previous commit for xibuild removes the need for this.

* [xibuild] Handle "incorrectly" cased msbuild property names  (#6202)

msbuild property names are case insensitive. While generating the custom
app.config, in `SetToolsetProperty(..)` we try to update the property if
it already exists. But the name lookup was case sensitive, thus causing
the lookup to fail, resulting in two entries for the same property name
differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`.

Fixed to ignore case.

Fixes https://github.com/mono/mono/issues/14765 .
2019-06-19 17:28:01 +02:00
Rolf Bjarne Kvinge 626a859a46
[xcode11] Fix several issues to make the mtouch tests pass. Fixes #6259. (#6332)
* [tests] Minor refactor to get better Xcode version parsing.

* Rename Configuration.XcodeVersion to XcodeVersionString.
* Add Configuration.XcodeVersion a parsed Version instane of XcodeString.

* [tests] Ignore all 'MT0099: Not linking with WatchKit because Xcode 11 beta 1' warnings in tests.

* [tests] Adjust min OS version tests for Xcode 11b1.

* [tests] Adjust tests for changes in 'nm' output.

* [tests] Adjust tests for name changes in Clang.

* [tests] Adjust tests for changes in ld warning format.

* [msbuild] 'metal' and 'metallib' aren't in PATH anymore, so use xcrun to execute them.

* [msbuild] Fix DevicePlatformBinDir for the Metal and MetalLib targets on iOS.

Also set the SDKROOT variable, otherwise metal and metallib don't work
properly, and revert the previous attempt at a fix (use xcrun).

* [tests] Simplify version parsing code to not version parse anymore.

* [tests] Add FIXME for once Apple fixes the WatchKit disappearance.
2019-06-19 07:20:02 +02:00
Ankit Jain e271d5e18d Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279)
* Bump VSMac to 8.1.0.2742 to fix msbuild issues

This is required to get the support for the msbuild `ToolsVersion`
change from `15.0` to `Current`.

* [tests][msbuild] Fix Binding resources test with updated msbuild

Test failure with updated msbuild and vsmac 8.1:

```
Xamarin.iOS.Tasks.NativeReferencesNoEmbedding("iPhone").ShouldNotUnnecessarilyRebuildBindingProject(True)
     Binding project build did not create package?
  Expected: True
  But was:  False

at Xamarin.iOS.Tasks.NativeReferencesNoEmbedding.ShouldNotUnnecessarilyRebuildBindingProject (System.Boolean framework) [0x000a0] in <74b8f7d8a53e40109916d305bb4d7403>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo cul
ture) [0x0006a] in <0519fa732e8845b6a809ce9180f541db>:0
```

The test builds the project multiple times. Before the 3rd build, the project
file's timestamp is updated and expects that the binding package will be
rebuilt. But it is not, because the target `_CreateBindingResourcePackage`
doesn't depend on that project file. So, add that to the target inputs.

* [nuget] Use xibuild to run nuget

Fix errors seen during `nuget restore` for tests:

```
Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xammac_tests/xammac_tests.csproj(213,3): error MSB4024: The imported project file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" could not be loaded. Could not find file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets"
```
2019-06-19 07:07:26 +02:00
Rolf Bjarne Kvinge a8708357a8
[mtouch] Fix building intents extensions for watchOS. (#6323)
Fixes this build error:

    Xamarin.iOS.Tasks.WatchKit2("iPhoneSimulator").BasicTest: #RunTarget-ErrorCount
        redefinition of 'main'
        Failed to compile the file(s) '/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/msbuild/tests/MyWatchKit2IntentsExtension/obj/iPhoneSimulator/Debug/mtouch-cache/i386/main.m'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
    Expected: 0
    But was: 2

since we no longer generate two main functions.
2019-06-17 14:33:31 +02:00
Rolf Bjarne Kvinge ab8817d000
Merge pull request #6294 from rolfbjarne/xcode11-watchsimulator
Fix building and launching watchOS apps. Fixes #6252.
2019-06-14 16:42:13 +02:00
Rolf Bjarne Kvinge 6e469327fc
Fix simulator provisioning. (#6295)
* We must bump the min simulator versions, since Apple has bumped what they offer.
* Re-enable simulator provisioning.
* Minor output fix to siminstaller to make the output easier to understand.
2019-06-14 16:21:21 +02:00
Rolf Bjarne Kvinge 9b32d682b6 [mtouch] Fix building watch extensions with the watchOS 6.0 SDK.
The watchOS 6.0 SDK renames/moves a few symbols, so some magic is required to
make things work on both watchOS 6.0 and earlier versions.
2019-06-14 02:17:36 +02:00
Sebastien Pouliot 00ba38035f
[devicecheck] Update for xcode 11 beta 1 (#6286)
Added support for macOS 10.15 and for iOS simulator (>= 13)
2019-06-13 20:09:34 -04:00
Manuel de la Pena 6fd9af50eb
[Xharness] Do use the traits provided by the mono sdk. (#6160)
Rather than hardcoding the tests ignored categories and traits, use the
ones that are provided by the mono sdk for each runner.
2019-06-12 23:51:08 +02:00
Sebastien Pouliot e826d1d8a6 Merge xcode11 head 2019-06-12 00:44:31 -04:00
Sebastien Pouliot bbe237cc0f [xcode11][xibuild] Handle "incorrectly" cased msbuild property names
Fixes mono/mono#14765

Manual backport of https://github.com/xamarin/xamarin-macios/pull/6202
2019-06-11 14:51:02 -04:00
Manuel de la Pena b9761d9c9e
[XHarness] Point to the correct directory that has the linker config. (#6208)
The path is poiting to the old dir.

Fixes: https://github.com/xamarin/maccore/issues/1690
2019-06-06 12:51:20 +02:00
Rolf Bjarne Kvinge 67e497abe8 [mtouch] Don't link with WatchKit, it's been removed. 2019-06-05 16:51:33 -07:00
Rolf Bjarne Kvinge 60a5392d35 [mmp/mtouch] Workaround broken frameworks in Xcode 11 beta 1.
* The Photos headers are broken when building in C++ mode.
* The PhotosUI headers include the Photos header, so those don't work either.
* The WatchKit framework just isn't there at all.
2019-06-04 13:45:33 -07:00
Rolf Bjarne Kvinge 9902318a40 [mmp] Use Xcode 9.4 clang to compile 32-bit static registrar code. 2019-06-04 13:45:33 -07:00
Manuel de la Pena a0a23a42d6 Add the missing flags to the native templates. 2019-06-04 18:42:46 +02:00
Ankit Jain 55c4073cb3 [xibuild] Handle "incorrectly" cased msbuild property names (#6202)
msbuild property names are case insensitive. While generating the custom
app.config, in `SetToolsetProperty(..)` we try to update the property if
it already exists. But the name lookup was case sensitive, thus causing
the lookup to fail, resulting in two entries for the same property name
differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`.

Fixed to ignore case.

Fixes https://github.com/mono/mono/issues/14765 .
2019-06-03 20:47:50 -07:00
Manuel de la Pena d8b7580849
[XHarness] Re-enable tvOS tests. (#6174)
After mono fixed issues https://github.com/mono/mono/issues/14497 and
https://github.com/mono/mono/issues/14496 re-enable the ignored tests.

Fixes: https://github.com/xamarin/maccore/issues/1610
Fixes: https://github.com/xamarin/maccore/issues/1611
2019-05-30 19:14:45 +02:00
Rolf Bjarne Kvinge 9c29746825
[xharness] Add TimeoutMultiplier and multiply mscorlib's timeout by 2. (#6172)
mscorlib has many tests and need some extra time, especially on watchOS, so
bump the timeout by 2 (from 15 to 30 minutes).
2019-05-30 08:40:56 -07:00
Rolf Bjarne Kvinge 72d7a8ad9b Merge remote-tracking branch 'origin/master' into binary-artifacts 2019-05-30 07:25:03 +02:00
Rolf Bjarne Kvinge 0029417b31
[apidiff] Create the directory for the stamp file before trying to create files in it. (#6156)
Fixes this:

	[...]
    Updating apidiff references...
    /Applications/Xcode102.app/Contents/Developer/usr/bin/make -C ../../builds download
    Downloading https://xamjenkinsartifact.azureedge.net/mono-sdks/ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip...
    Downloading https://xamjenkinsartifact.azureedge.net/mono-sdks/mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip...
    Downloaded https://xamjenkinsartifact.azureedge.net/mono-sdks/mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip
    Unzipping mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d...
    Unzipped mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.
    Downloaded https://xamjenkinsartifact.azureedge.net/mono-sdks/ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip
    Unzipping ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d...
    Unzipped ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.
    touch: /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/comparison/apidiff/.download-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.stamp: No such file or directory
    make: *** [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/comparison/apidiff/.download-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.stamp] Error 1
    Failed to update apidiff references

from https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/10093/consoleText.
2019-05-29 05:58:38 -07:00
Rolf Bjarne Kvinge b5958e89c4 Merge remote-tracking branch 'origin/master' into binary-artifacts 2019-05-29 08:27:24 +02:00
Manuel de la Pena 0346e71213 [xharness] Remove mono tests built locally in favor of binary archive binaries (#6141)
* [XHarness] Remove the old style mscorlib tests.

Remove the old style test and replace it with the xunit equivalent which
has more tests and is provided by the mono package.

* Only skip the mscorlib tests on watchOS devices with 32b. Run them anywhere else.
2019-05-28 23:25:01 -07:00
Alexander Köplinger b8b79b03cb Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-28 21:43:52 +02:00
Rolf Bjarne Kvinge 1766a8daed Add symlink that points to current mono sdks dir (#6146)
Use that instead of an msbuild variable that won't work in VSMac.

Also bump maccore to get an equivalent fix there.

Diff: 34725fe136..104656b890
2019-05-28 15:01:38 -04:00
Manuel de la Pena f1c7d1e3fd
[Harness] Pass extra arguments to configure the linker for certain tests (#6143)
Some tests need a special linker configuration. Add the extra arguments
so that tests do pass on device.

Fixes: https://github.com/xamarin/maccore/issues/1608
2019-05-28 07:04:42 -07:00
Rolf Bjarne Kvinge 285511b424
[apidiff] Make temporary / stamp paths depend on APIDIFF_DIR. (#6145)
This fixes an issue with the api comparison since the api comparison fails if
it detects unexpected modified files: https://github.com/xamarin/xamarin-macios/pull/6133#issuecomment-496283224.

Putting the temporary files in APIDIFF_DIR makes sure the api comparison
doesn't see those files as unexpectedly modified.
2019-05-28 02:42:57 -07:00
Rolf Bjarne Kvinge 74be8cec31
[xharness] Refactor a bit to simplify code. (#6140)
* [xharness] Refactor a bit to use named types for a few unnamed types with numerous fields.

Anonymous types becomes quite unwieldy the more fields they have.

* [xharness] Remove unnecessary field assignments.
2019-05-27 22:59:08 -07:00
Alexander Köplinger e9e7b835bd Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-28 02:01:28 +02:00
Manuel de la Pena 1d5fe7118e
[XHarness] Ignore a number of assemblies that do not have any tests. (#6132)
Mono did remove all the tests in a number of assemblies on
ios/tvos/watchos. With a recent change, we report test runs with no
tests as a failure (correctly since it will bring up issues with the
runners).

In this case, the tree assemblies have to be ignored because they trully
do not have tests and the runners are doing the right thing.

Fixes: https://github.com/xamarin/maccore/issues/1652
2019-05-27 09:22:00 -07:00
Alexander Köplinger d4f2b02d66 PR feedback, remove unnecessary setting of MONO_IOS_SDK_DESTDIR in csprojs 2019-05-27 18:16:44 +02:00
Alexander Köplinger 8a8427fb7b Fixup azure-pipelines.yml 2019-05-24 20:36:53 +02:00
Alexander Köplinger 8627c4311a Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-24 20:27:09 +02:00
Alexander Köplinger 581d19527b Add symlink that points to current mono sdks dir
Use that instead of an msbuild variable that won't work in VSMac.
2019-05-24 19:44:57 +02:00
Sebastien Pouliot 224593b46d [mmp] Update (not copy-on-change) the output of lipo
We can't assume that the cached `lipo` output is part of the `.app`
since the directory for the later could be different.

E.g. we build two .csproj in out `mmptest` inside the same directory
and they share the same `obj` directory (used for caching) but have
different output directories

```
./obj/Release/mmp-cache/libmono-native.dylib
./bin/Release/UnifiedExample.app/Contents/MonoBundle/libmono-native.dylib
./bin/Release/XM45Example.app/Contents/MonoBundle/libmono-native.dylib
```

Without an update building the XM45 project would not include the
**required** `libmono-native.dylib` library and would crash when
executed.
2019-05-24 11:51:17 -04:00
Manuel de la Pena 9fa35569d1
[XHarness] Re-enable corlbi tests on Mac Full and Modern (#6121)
Tests are readded from the test dll from mono (xunit)

Fixes: https://github.com/xamarin/maccore/issues/1203
2019-05-24 01:29:30 -07:00
Sebastien Pouliot fc5b9e24d4
[mmp] Ignore, by default, frameworks that cause rejection from App Store. Fix #6039 (#6107)
So far this only applies to `QTKit`...

XM will now, by default, avoid natively link with QTKit unless it's
instructed to so explicitly using `--link-prohibited-frameworks`

ref: https://github.com/xamarin/xamarin-macios/issues/6039
2019-05-23 15:59:40 -05:00
Alexander Köplinger 48b3b82410 Merge remote-tracking branch 'upstream/master' into binary-artifacts
# Conflicts:
#	builds/Makefile
#	external/mono
2019-05-22 20:07:18 +02:00
Alexander Köplinger 5020fbc0a0 Add missing dependencies on Make.config
Otherwise things wouldn't get rebuild when Mono is bumped.
2019-05-22 17:44:58 +02:00
Rolf Bjarne Kvinge 4d4215e25c
[apidiff] Fix a few issues with the apidiff when the mono hash or api diff url changes. (#6084)
* [apidiff] Add rule to get mono-api-info.exe and mono-api-html.exe.

This fixes an issue when bumping mono: when bumping mono, the already
downloaded mono archive isn't applicable (because we've changed to the
previous commit, which has the previous mono hash, whose archive hasn't been
downloaded).

So add a rule to get mono-api-info.exe and mono-api-html.exe, by downloading
the current mono archive.

* [apidiff] Change the name of the unzip stamp and download dir to contain the hash.

This way the logic doesn't get confused when the hash changes (or there's an
old unzip stamp in the directory), and things are downloaded again as
expected.

* [apidiff] Make make not delete temporary files.

Things end up confused if temporary files have been removed by make, but our
stamp file that the temporary files are still there is present.

* [apidiff] No need to make everything depend on the bundled zip.

If everything that needs the bundled zip already depends on it.

* [apidiff] Restore original hash before calculating api diff.

This makes it less annoying when the api diff calculation changes, because
with the previous behavior they were impossible to test in a PR, since any
changes wouldn't take effect until after the PR was merged.
2019-05-22 05:41:18 -07:00
Bernhard Urban d26208422c [mtouch] Add support for arm64_32 2019-05-22 08:04:50 +02:00
Alexander Köplinger c842df75cd Provision 7z 2019-05-22 01:15:29 +02:00
Alexander Köplinger 247a6bf551 Switch to mono archive and remove submodule 2019-05-21 22:16:02 +02:00
Rolf Bjarne Kvinge a9372793a7 Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-20 18:45:19 +02:00
Manuel de la Pena 4db4e09e7e
[Xharness] Add support to pass extra arguments to the test bcl apps. (#6082)
Allow to add extra mtouch arguments to the bcl test applications to configure them. This will allow to pass required specific settings that some tests have, for example, for the linker.
2019-05-20 09:35:22 -07:00
Manuel de la Pena 94fe39b118
[XHarness] Do use the test dlls from the mono downloads. (#6055)
This updates the project generation. We cannot yet fully remove the submodule because:

* We are missing the xunit dlls which should be added in the SDK.
* We have not yet remove all the old style tests. Would make the PR huge, better to deal with it in a diff PR.
* The xunit CoreLib tests have issues loading all the tests, needs some extra work and again, the PR is already large.

Fixes: xamarin/maccore#1199
Fixes: xamarin/maccore#1204
Fixes: xamarin/maccore#1209
Fixes: xamarin/maccore#1510
2019-05-19 14:55:14 -07:00
Rolf Bjarne Kvinge 2d34cb259b Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-17 14:53:15 -07:00
Ankit Jain 7dddfb657c [xibuild] Fix incorrect mscorlib.dll being used (#6068)
* [xibuild] Fix incorrect mscorlib.dll being used

The `GuiUnit_NET_4_5` project, when built with `xibuild` uses the wrong `mscorlib.dll`.

From https://github.com/xamarin/xamarin-macios/issues/5760#issuecomment-472457202 :

```
- mscorlib.dll is being used from mono/4.5 and the other system assemblies are from mono/4.5-api
- GuiNet* project is built with xibuild

What is happening here is:

	xibuild sets[1] `SetToolsetProperty ("TargetFrameworkRootPath", FrameworksDirectory + Path.DirectorySeparatorChar);`
	which points to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks`.
	This causes $(FrameworkPathOverride) to be set[2] to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETFramework/v4.5`,
	but that doesn't have a mscorlib.dll, so it gets reset[3] to /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5/.

	If we don't set TargetFrameworkRoothPath, then we get `FrameworkPathOverride = /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api`,
	causing `_ExplicitReference=/Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api/mscorlib.dll`(correct one) to be used.
```

Fixes https://github.com/xamarin/xamarin-macios/issues/5760

1. https://github.com/xamarin/xamarin-macios/blob/master/tools/xibuild/Main.cs#L209
2. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L79
3. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L84

* Revert "Workaround https://github.com/xamarin/xamarin-macios/issues/5760 in generator csproj"

This reverts commit 9bd927bb7f.

The previous commit for xibuild removes the need for this.
2019-05-17 09:12:05 -07:00
Manuel de la Pena a1c19733d8
[XHarness] Ignore corlib on tvOS until mono fixes the test dlls. (#6063)
Test dlls are wrong so we will ignore them until mono fixes them.

Fixes: https://github.com/xamarin/maccore/issues/1611
Mono issue: https://github.com/mono/mono/issues/14497
2019-05-17 08:41:18 -07:00
Rolf Bjarne Kvinge 47beab425d Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-16 15:26:15 -07:00
monojenkins d62978945d [d16-2] [linker] Add the custom attributes removal step as an configurable optimization. Fix #3655 (#6058)
This allows the optimization to be disabled in cases where one, or
many, a custom attribute(s) are required by the application at runtime.

While not ideal disabling this single step is much better than disabling
linking for the whole application.

A better approach is described in https://github.com/xamarin/xamarin-macios/issues/6048
but this configuration optimization makes sense independently of it.

Fix https://github.com/xamarin/xamarin-macios/issues/3655
2019-05-16 16:55:10 -05:00
Sebastien Pouliot 5fbf721957
[mmp] Fix compiler warning (#6064)
```
Tuning.cs(300,8): warning CS0108: 'LoadOptionalReferencesStep.ProcessReferences(AssemblyDefinition)' hides inherited member 'LoadReferencesStep.ProcessReferences(AssemblyDefinition)'. Use the new keyword if hiding was intended. [/Users/poupou/git/master/xamarin-macios/tools/mmp/mmp.csproj]
```

it's not virtual and it's not being called back annyway.
2019-05-16 16:44:08 -05:00
Manuel de la Pena eb64b377bb
[Xharness] Remove the System bcl tests on tvOS (#6062)
Until mono fixes the test dlls, we are ignoring the tests.

Silences: https://github.com/xamarin/maccore/issues/1610
2019-05-16 13:07:38 -07:00
Sebastien Pouliot 2121b703cd
[linker] Add the custom attributes removal step as an configurable optimization. Fix #3655 (#6049)
This allows the optimization to be disabled in cases where one, or
many, a custom attribute(s) are required by the application at runtime.

While not ideal disabling this single step is much better than disabling
linking for the whole application.

A better approach is described in https://github.com/xamarin/xamarin-macios/issues/6048
but this configuration optimization makes sense independently of it.

Fix https://github.com/xamarin/xamarin-macios/issues/3655
2019-05-16 09:16:32 -07:00
Sebastien Pouliot c481aac216
[apidiff] Add q quick'n'dirty script to produce a diff between any two bundle.zip (#6050)
Use for producing API diff for release notes without waiting for a PR,
bots and/or approvals...

Also useful to produce API diff between any versions, not just between
the current revision and a baseline (last stable).
2019-05-15 12:46:38 -05:00
Manuel de la Pena 81d6225eb7
[XHarness] Fix some issues in the BCL test generator. (#5938)
We had issues in the code that adds a type found in an assembly to
ensure that it was not removed by the linker. This resulted in some
assemblies having 0 tests.

Added the needed ignore for the corlib tests and system ones.
2019-05-11 12:03:38 +02:00
Rolf Bjarne Kvinge 557d435844
Fix mlaunch build. (#6038)
An mlaunch fix in master required a code change in xamarin-macios; when
backporting this mlaunch fix to d16-2 the corresponding xamarin-macios fix was
not, causing the build to break.

Fixes this:

    [...]
    Build FAILED.

    "/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.sln" (default target) (1) ->
    "/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.csproj" (default target) (2) ->
    (CoreCompile target) ->
      /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/common/MachO.cs(10,15): error CS0234: The type or namespace name 'Bundler' does not exist in the namespace 'Xamarin' (are you missing an assembly reference?) [/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.csproj]

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:03.63
    make[3]: *** [Xamarin.Hosting/Xamarin.Launcher/bin/Debug/mlaunch.app] Error 1
2019-05-10 15:40:51 +02:00
monojenkins 2d8396d0a0 [mtouch/mmp] Make the mono native mode a Target-specific variable. (#6037)
The arm64_32 slice for watchOS apps will always use the 'unified' mode, while
the armv7k can be both 'unified' and 'compat' depending on the deployment
target, so we need to keep track of this per Target.

This PR does not change anything related to arm64_32, that will come in a
later PR.
2019-05-10 15:40:17 +02:00
Bernhard Urban 9dd2340972 [mtouch] Add support for arm64_32 2019-05-10 08:28:43 +02:00
Rolf Bjarne Kvinge d657c723ee
[mtouch/mmp] Make the mono native mode a Target-specific variable. (#6028)
The arm64_32 slice for watchOS apps will always use the 'unified' mode, while
the armv7k can be both 'unified' and 'compat' depending on the deployment
target, so we need to keep track of this per Target.

This PR does not change anything related to arm64_32, that will come in a
later PR.
2019-05-09 21:36:42 +02:00
Rolf Bjarne Kvinge 6eeb2201a9
[mtouch] Move string null/empty check into CompilerFlags.AddOtherFlag. (#6027) 2019-05-09 18:43:39 +02:00
Rolf Bjarne Kvinge 0887877c97 [mtouch] Fix framework information for MetalKit in the simulator.
MetalKit wasn't available in the simulator until iOS 10.0.
2019-05-09 13:24:47 +02:00
Rolf Bjarne Kvinge f7796e1eee [xharness] Add support for running tests with the earliest possible simulator, and use it for introspection tests. 2019-05-09 13:23:34 +02:00
Rolf Bjarne Kvinge 744ec56156 Merge remote-tracking branch 'origin/master' into xharness-old-simulators5 2019-05-08 15:05:05 +02:00
Rolf Bjarne Kvinge ef0d7a1718
[generator] Show proper errors when failing to compile something. (#6003)
* [mtouch/mmp] Split out the RunCommand[Async] methods to a separate file so that the generator can reuse more easily.

* [generator] Show proper errors when failing to compile something.

* Fix grammar
2019-05-07 13:40:59 +02:00
Rolf Bjarne Kvinge 2f86feae7d [mtouch] Fix framework information for MetalKit in the simulator.
MetalKit wasn't available in the simulator until iOS 10.0.
2019-05-06 17:01:17 +02:00
Rolf Bjarne Kvinge e48955268f [xharness] Add support for running tests with the earliest possible simulator, and use it for introspection tests. 2019-05-06 17:00:33 +02:00
Rolf Bjarne Kvinge a36019c83c
[mtouch/mmp] Remove dead code. (#5997) 2019-05-06 14:40:31 +02:00
Rolf Bjarne Kvinge 682f54da87
[linker] Mark protocol interfaces when using the dynamic registrar. (#5988)
* [linker] Mark protocol interfaces when using the dynamic registrar.

Fixes this monotouch-test failure when using the dynamic registrar and the
linker at the same time:

    [FAIL] RegistrarTest.TestProtocolRegistration :   UIApplicationDelegate/17669
      Expected: True
      But was:  False

* [tests] Adjust test after linker change.

All Xamarin.iOS apps will now link with QuickLook when using the dynamic
registrar, because NSUrl implements a QuickLook protocol:
fcac64ad6e/src/foundation.cs (L5445).

Adjust LinkAll_Frameworks accordingly, and add a new test that verifies that
the old behavior (not linking with QuickLook when linking all assemblies) is
still correct.
2019-05-06 13:21:02 +02:00
Rolf Bjarne Kvinge fcac64ad6e
[apidiff] Use mono-api-[info|html].exe from the mono archive. (#5990) 2019-05-06 07:31:03 +02:00
Rolf Bjarne Kvinge 7b390683d2
Merge pull request #5966 from monojenkins/backport-pr-5963-to-d16-2
[d16-2] Fix/improve marshalling of out/ref parameters, arrays, Classes and Selectors. Fixes #5171.
2019-05-06 07:27:56 +02:00
Rolf Bjarne Kvinge 19cb5ad76d
[mlaunch] Fix clean target to actually do something. (#5985) 2019-05-03 19:11:22 +02:00
Rolf Bjarne Kvinge 0ba3a21daf
[mtouch] Support and use the partial static registrar when using the dynamic registrar on device. (#5965) 2019-05-03 17:56:48 +02:00
Rolf Bjarne Kvinge 290899b983
[apidiff] Unzip downloaded files into a temporary subdirectory. (#5983)
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.
2019-05-03 17:41:40 +02:00
Rolf Bjarne Kvinge dbd8e111ee
Bump maccore to get fix for #5888. (#5969)
This also requires a minor fix in MachO.cs.

Diff: 758f471fbc..f7ca470c0a

Fixes https://github.com/xamarin/xamarin-macios/issues/5888.
2019-05-03 15:18:03 +02:00
monojenkins 4099f74d83 [apidiff] Keep the same guid when updating markdown documents (#5977)
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).
2019-05-01 20:19:06 -04:00
Sebastien Pouliot 3d7e104a7e
[apidiff] Keep the same guid when updating markdown documents (#5976)
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).
2019-05-01 16:15:17 -04:00
Rolf Bjarne Kvinge cb1ead3bed Revert "[builds] Make the tools build use mono's packaged logic instead of our own. (#5962)" (#5971)
This reverts commit b72a0d9bc1.
2019-04-30 19:58:12 -04:00
Rolf Bjarne Kvinge 868b3ecf44 [registrar] Add support for ref/out arrays. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge b750056271 [registrar] Fix/implement returning SEL/Class in a ref/out parameter in the registrars. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 84b99d85e5 [registrar] Reuse some more array conversion code from the static registrar. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge a123cff994 [registrar] Re-use existing method for converting from a managed method to an NSArray. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge ffc1d400f4 [registrar] Minor code simplification. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge ab5698c451 [registrar] Create a xamarin_nsstring_to_string to avoid code duplication. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 8b0f3c80d8 [registrar] Create a xamarin_string_to_nsstring function to avoid code duplication. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 10d7d1c26f [runtime] Use a 'void*' for the context in conversion functions instead of 'guint32'.
No function changes, just a refactoring to allow for pointers as context.
2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 4300aa8d03
Fix/improve marshalling of out/ref parameters, arrays, Classes and Selectors. Fixes #5171.
* 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.
2019-04-30 16:28:39 +02:00
Rolf Bjarne Kvinge 8d004e617e
[builds] Add support for using cached downloads of the mono archives from ~/Library/Caches. (#5961)
* [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.
2019-04-30 15:56:38 +02:00
Rolf Bjarne Kvinge b72a0d9bc1
[builds] Make the tools build use mono's packaged logic instead of our own. (#5962)
* [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.
2019-04-30 07:33:16 +02:00
Sebastien Pouliot 922328becb
[mmp] Fix error for `mmp --version` (#5955)
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
```
2019-04-27 10:11:47 -04:00
Rolf Bjarne Kvinge 6e9afbc605 [registrar] Add support for ref/out arrays. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge af38ac286c [registrar] Fix/implement returning SEL/Class in a ref/out parameter in the registrars. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge 1f7cdecd3d [registrar] Reuse some more array conversion code from the static registrar. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge 82c716c6ed [registrar] Re-use existing method for converting from a managed method to an NSArray. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge 08ab894b4d [registrar] Minor code simplification. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge 509c5be093 [registrar] Create a xamarin_nsstring_to_string to avoid code duplication. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge 2b5229fe46 [registrar] Create a xamarin_string_to_nsstring function to avoid code duplication. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge fc6b2c0a0d [runtime] Use a 'void*' for the context in conversion functions instead of 'guint32'.
No function changes, just a refactoring to allow for pointers as context.
2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge c8ed014af7
[runtime] Improve exception creation. (#5944)
* [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.
2019-04-26 11:16:23 +02:00
Alexander Köplinger 7f717f01ae
Merge pull request #5563 from xamarin/mono-2019-02
Bump to mono:2019-02
2019-04-25 19:24:35 +02:00
Rolf Bjarne Kvinge aa4eaf7c92
Make a copy of the static registrar and the runtime headers for Xamarin.Mac/Classic. (#5945)
* [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.
2019-04-25 18:08:10 +02:00
Rolf Bjarne Kvinge bd457212d5
[tests] Add sample tester. (#5870)
* [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.
2019-04-25 17:18:43 +02:00
Alexander Köplinger 99ea097abf Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-04-24 23:28:00 +02:00
Vlad Brezae 26ba16e3e6 [mtouch] Enable dsym even from aot'ed images when interpreter is enabled (#5919)
Fixes https://github.com/mono/mono/issues/13975
2019-04-24 13:11:39 -04:00
Rolf Bjarne Kvinge f802a02eed
[registrar] Add token type validation. (#5934)
This should never happen, but an MT0099 at build time is much better than a
runtime exception.
2019-04-23 14:57:55 +01:00
Alexander Köplinger 8ed5e3926a bcl-test-importer: Add three more unit test assemblies 2019-04-17 14:58:49 +02:00
Alexander Köplinger 3ebafb9725 bcl-test-importer: Correctly process watch/tv assemblies
The missing test assemblies validator wasn't matching them since it looked for monotouch_, instead of monotouch_watch_
2019-04-17 14:33:50 +02:00
Alexander Köplinger fc7008d226 bcl-test-importer: Select first type that ends with Test/Tests
We need to avoid selecting some unrelated type that could conflict between assemblies like FileCleanupTestBase.
2019-04-17 14:32:27 +02:00
Alexander Köplinger 65153f4985 Add System.Runtime.CompilerServices.Unsafe xunit test to iOS 2019-04-17 12:20:27 +02:00
Alexander Köplinger b1dc78525d bcl-test-importer: Append .Unsafe to System.Runtime.CompilerServices test suite
It's actually an important distinction.
2019-04-17 12:18:29 +02:00
Alexander Köplinger 455af1ccc1 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-04-15 15:05:36 +02:00
Alexander Köplinger 505a957acc [bcl-tests] Add Microsoft.CSharp reference to Mono.CSharp_test.dll on XM
It's needed for the C# "dynamic" feature.
2019-04-12 17:43:18 +02:00
Rolf Bjarne Kvinge 4967d6f516
[apidiff] Make temporary / stamp paths depend on APIDIFF_DIR. Fixes maccore#1522. (#5895)
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.
2019-04-12 15:31:27 +02:00
Alexander Köplinger db86c8cc88 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-04-11 20:28:57 +02:00
Rolf Bjarne Kvinge f4efeb0e63
[mtouch] Avoid an NRE when using the embeddinator by returning an empty collection instead of null. (#5883)
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
2019-04-10 21:48:05 +02:00
Alexander Köplinger d9376421fe Revert "[XHarness] Ignore monotouch_Microsoft.CSharp_xunit-test.dll until issue 5868 is fixed. (#5869)"
This reverts commit dc697dd5ef.
The mono issue was fixed.
2019-04-09 21:07:30 +02:00
Alexander Köplinger e42e1e8fce Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-04-09 21:06:44 +02:00
Rolf Bjarne Kvinge 8792992b79
[registrar] Make Runtime.GetINativeObject_Static take token references instead of type names. (#5879)
Saves some space in the executable by using 32-bit sized integers instead of much longer strings.
2019-04-09 16:47:33 +02:00
Manuel de la Pena dc697dd5ef
[XHarness] Ignore monotouch_Microsoft.CSharp_xunit-test.dll until issue 5868 is fixed. (#5869)
If not ignored, we will have an issue building the test app on device
resulting on a failure.
2019-04-09 12:57:27 +02:00
Alex Soto 6e2eddd328
[devops] Add azure devops build support (#5873) 2019-04-09 05:35:08 -04:00
Chris Hamons d98c22e39f
[mmp] Don't apply libintl hack when you explicitly ask for that file (#5855)
- 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
2019-04-08 10:26:23 -05:00
Sebastien Pouliot 1664cf6426 Merge branch 'master' into mono-2019-02 2019-04-05 15:53:37 -05:00
Sebastien Pouliot d66375d275 [linker] Remove new memory allocations (List) in the sealer 2019-04-05 14:01:44 -05:00
Sebastien Pouliot fad23e95b2
Small fixlets to select better overloads / unneeded parameters (#5844) 2019-04-05 09:43:22 -05:00
Alexander Köplinger 067cbf0a28 Merge remote-tracking branch 'upstream/master' into mono-2019-02
# Conflicts:
#	tools/mmp/driver.cs
2019-04-05 11:19:11 +02:00
Alexander Köplinger cc58acdcd3 Bump mono
Commit list for mono/mono:

* mono/mono@6717c3422a [2019-02] Bump linker to latest master (#13818)
* mono/mono@6d2f150690 Add regression test
* mono/mono@fe613fb067 Add reflected class to event methods

Diff: a1fc070eb5...6717c3422a
2019-04-03 23:53:09 +02:00
Alexander Köplinger 7c73d70b4f [linker] Don't remove RuntimeCompatibilityAttribute from assembly
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.
2019-04-03 23:52:18 +02:00
Vincent Dondain 86d1b42ad2 Merge branch 'xcode10.2' into master-merge-xcode10.2 2019-04-03 13:57:31 -04:00
Alexander Köplinger 02176dc5de HttpClientHandler is still in System.Net.Http.dll and use short string for http handler in runtime-options.plist 2019-04-02 17:20:58 +02:00
Sebastien Pouliot 56d87eebba [linker] Adjust HttpClientHandler selection with the new (non BCL) location of the handlers 2019-04-01 21:24:24 -05:00
Sebastien Pouliot a9f8d7b379
[mtouch][mmp] Add control over the the linker new `BeforeFieldInit` optimization (#5820)
Add an mtouch/mmp optimization flag to control this new optimization since
3rd party code (in particular binaries) might depend on this side effect.
2019-04-01 21:21:56 -05:00
Sebastien Pouliot 9ebebf9f42
[linker] Teach linker to accept old (before optimization) bindings (#5823)
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.
2019-04-01 09:35:14 -05:00
Alexander Köplinger bcae65f998 MTouch: Always add GSS framework when mono-native is used
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.
2019-03-27 11:14:53 +01:00
Alexander Köplinger 1cb9c5b068 Fix MT1015() mtouch test
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.
2019-03-26 12:41:48 +01:00
Alexander Köplinger 032145f99b mmp: Require mono-native even for Classic mode
Many BCL APIs call into it now.
2019-03-25 16:37:37 +01:00
Alexander Köplinger f67ca65e95 mmp: Add -lc++ to clang arguments
We need to link with C++ now since Mono requires it on Desktop now.
2019-03-25 16:30:52 +01:00
Alexander Köplinger b23e775fbc Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-25 00:29:17 +01:00
Manuel de la Pena 56a304ea0e
[XHarness] Make TvOS and WatchOS use their test dlls. (#5794)
Up to this commit the test dlls used for the bcl tests were from iOS. Since
the Mono SDK provides the dlls for both missing platforms (TvOS and
WatchOS) we can now use the correct path for the dlls.

There is a small trick to minimize the project generation, since there
is a simple stirng.Replace, the logic now checks the platform under
test and does:

* TvOS - Goes from monotouch_TEST_NAME to monotouch_tv_TEST_NAME
* WatchOS - Gores from monotouch_TEST_NAME to monotouch_watch_TEST_NAME
2019-03-24 18:54:15 +01:00
Alexander Köplinger a4702c465c Update pdb files in install-source tool 2019-03-22 12:20:07 +01:00
Alexander Köplinger 9b039e0f9d Fix linker paths 2019-03-22 11:19:35 +01:00
Alexander Köplinger 0e249818d2 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-22 10:32:58 +01:00
Manuel de la Pena 1615b28ed1
[XHarness] Reduce the number of test applications for the BCL tests. (#5768)
This commit improves the state of the BCL testing in the following ways:

1. Improve the device tets running. Less apps, faster results.
2. WatchOS apps are left as they were to ensure that we do not have deplouyment/run issues.

We now support the ignore files per assembly name to simplify the
tracking of the ignored tests. All
2019-03-20 12:10:18 +01:00
Alexander Köplinger ca76be3bea Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-19 16:17:35 +01:00
Sebastien Pouliot 0dbc584977
[mtouch] Fix warning in RemoveBitcodeIncompatibleCodeStep.cs (#5787)
```
/Users/poupou/git/master/xamarin-macios/tools/linker/MonoTouch.Tuner/RemoveBitcodeIncompatibleCodeStep.cs(14,7): warning CS0105: The using directive for 'Xamarin.Linker' appeared previously in this namespace [/Users/poupou/git/master/xamarin-macios/tools/mtouch/mtouch.csproj]
```
2019-03-19 08:56:14 -05:00
Sebastien Pouliot 5c321ac89d
[mtouch] Update validations around --interpreter (#5772)
This also centralize other interpreter checks and options in the same
location (making it easier to read / update).

* Warn and switch the REPL if the interpreter is enabled on simulator

Why ? It's confusing to build the same code using different options for
simulator and devices. This is what happens if you try to use features
like `dynamic` or `System.Reflection.Emit`.

So instead of an error, we warn that the interpreter is not supported
and switch to the existing REPL mode.

The JIT remains the only option for the simulator but it allows testing
features without a device.

* Fail early if the interpreter is used on 32bits [1]

The current interpreter only works on 64 bits (so ARM64). However the
error won't be reported, back to the developer, until deployment time.

This temporary [1] fix spot the condition very early and report an error

```
error MT0099 : Internal error : The interpreter is currently only available for 64 bits.
```

instead of the current one at deploy time

```
IncorrectArchitecture: Failed to find matching arch for 32-bit Mach-O input file /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.tNKDlx/extracted/X.app/X
error MT1006: Could not install the application 'X.app' on the device 'Mercure': AMDeviceSecureInstallApplicationBundle returned: 0xe8000087 (kAMDIncorrectArchitectureError).

Application could not be uploaded to the device.
```

[1] https://github.com/mono/mono/issues/9871

* [tests] Fix/renumbered MT0138

The test was using simulator + interpreter which is not _really_
possible, we use REPL in that case - so we're now checking if
assemblies were specified with `--interpreter` to cover both cases.

Also 0138 was already used by `mmp` and the warning was **not**
registered or documented in the errors documents. To avoid
confusion it has been renumbered to 0142 and documented.
2019-03-19 08:22:39 -05:00
Alexander Köplinger 66ebb76e71 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-18 19:24:52 +01:00
Rolf Bjarne Kvinge 18b13ac876
[runtime] Use mono_array_setref instead of mono_array_set. (#5782)
* [Foundation] Add an NSArray.FromNSObjects overload that can take an array of INativeObjects.

* [runtime] Use mono_array_setref instead of mono_array_set.

Otherwise the GC won't know about the assignment, and the assigned value can
be freed if it's no longer referenced anywhere else.
2019-03-18 15:00:32 +01:00
Alexander Köplinger fe92aab5bb Merge remote-tracking branch 'upstream/master' into mono-2019-02
# Conflicts:
#	external/mono
#	src/Foundation/NSUrlSessionHandler.cs
2019-03-18 14:35:46 +01:00
Alexander Köplinger c2bd7011e2 Fix processing of tools/common/StringUtils.cs in XamarinSourcesPathMangler.cs 2019-03-16 02:48:14 +01:00
Sebastien Pouliot 61372a06ba
[mtouch] Disable some optimizations when the interpreter is enabled (#5770)
Some optimizations are not safe to apply when dynamically loading code
at runtime. This is not possible when ahead-of-time (AOT) compilation
is used, so those options were always enabled in the past. The
interpreter is changing the situation so those optimizations are now
disabled, when the interpreter is enabled.

The disabled optimizations are:

* 'remove-dynamic-registrar' when using the interpreter

This avoid the following exception when unknown (at build time) code
tries to register (at runtime)

```
Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ObjCRuntime.RuntimeException: Can't register the class SubclassDemo.CustomView when the dynamic registrar has been linked away.
```

* 'inline-isdirectbinding' when using the interpreter

This avoid crashing (at runtime) when types are subclasses by the
interpreter (code unknown to `mtouch` at build time).

* 'register-protocols' when the interpreter is enabled

Dynamically loaded code can include protocols. When the optimization is
enabled then they won't be registered and won't work as expected.

Note: It is possible to re-enable the optimization(s), either one or all,
if the interpreter is not used to dynamically load code at runtime.
2019-03-15 09:05:53 -05:00
Sebastien Pouliot aa1aa68d07
[mtouch] Avoid MT0109 warnings when --repl (or --interpreter) is used (#5771)
In both cases we use a different binaries for a few assemblies. They
 include support for SRE and a few other things that are not normally
 usable on iOS. That's totally fine and not something that can be fixed
 (unless you stop using the feature). So this PR simply ignore that
 specific case so we don't warn about things that can't be changed (and
 are not a problem)

 E.g.
 ```
 Warning MT0109: The assembly 'mscorlib.dll' was loaded from a different path than the provided path (provided path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll, actual path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/repl/mscorlib.dll). (MT0109) (XXX)
 Warning MT0109: The assembly 'System.Core.dll' was loaded from a different path than the provided path (provided path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll, actual path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/repl/System.Core.dll). (MT0109) (XXX)
 Warning MT0109: The assembly 'System.dll' was loaded from a different path than the provided path (provided path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll, actual path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/repl/System.dll). (MT0109) (XXX)
 Warning MT0109: The assembly 'System.Xml.dll' was loaded from a different path than the provided path (provided path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Xml.dll, actual path: /Users/poupou/git/intr/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/repl/System.Xml.dll). (MT0109) (XXX)
 ```
2019-03-15 09:02:08 -05:00
Alexander Köplinger ed3acacd10 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-15 14:30:26 +01:00
Sebastien Pouliot d90d96ab2b
[mtouch] Consider deployment and simulator availability versions for frameworks. Fixes #5753 (#5765)
E.g. `MetalPerformanceShaders` is unusable in 10.3.1 on the simulator so
trying to build with the static registrar cause simlauncher to be rebuilt
with a **strong** (and not _weak_) reference to the framework. This cause
a crash then the application start

```
Dyld Error Message:
  Library not loaded: /System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders
  Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/95679F95-CCE7-4733-8376-35E91E97039C/data/Containers/Bundle/Application/0F665B2D-ADAC-4CA0-BD04-33E968B3F268/FailerApp.app/FailerApp
  Reason: no suitable image found.  Did find:
	/System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders: mach-o, but not built for iOS simulator
```

ref: https://github.com/xamarin/xamarin-macios/issues/5753
2019-03-14 08:12:42 -05:00
Sebastien Pouliot ea96b2299a
[mtouch] Make the SealerSubStep a configurable optimization (#5766)
document it and adjust the optimization tests.

This allows the optimization to be:
* disabled (if ever needed) on fully AOT'ed applications
* re-enabled for the interpreter (at your own risk)
2019-03-14 08:12:17 -05:00
Alexander Köplinger 8274161551 Update mmp/mtouch projects to add new linker files and adapt to new logic 2019-03-13 00:34:52 +01:00
Manuel de la Pena 3fc1e32adb
[XHarness] Reenable the NUnit System.Data tests on mac os x. (#5749)
Fixes https://github.com/xamarin/maccore/issues/1192
Fixes https://github.com/xamarin/maccore/issues/1193
2019-03-11 18:50:18 +01:00
Manuel de la Pena 5bfbefab14
[XHarness] Reneable System.Security nunit tests on mac os x. (#5751)
Fixes  https://github.com/xamarin/maccore/issues/1197
2019-03-11 12:08:10 +01:00
Manuel de la Pena 9eb75dda71
[XHarness] Reenable the System.Core tests on mac os x. (#5743)
Fixes https://github.com/xamarin/maccore/issues/1191
2019-03-08 17:02:15 +01:00
Rolf Bjarne Kvinge 99e727c90b
Merge pull request #4904 from xamarin/mono-2018-10
Bump to mono:2018-10
2019-03-08 11:06:50 +01:00
Manuel de la Pena 112502c081
[Xharness] Reenable the SystemXml tests on mac os x. (#5735)
Fixes https://github.com/xamarin/maccore/issues/1201
Fixes https://github.com/xamarin/maccore/issues/1202
2019-03-07 17:19:47 +01:00
Manuel de la Pena bc3b5a2d43
[Tests] Fix the tests.sln to include the new test projects. (#5720)
Update the sun and ensure that the GUID of the projects are always the same to make the .sln file happy.
2019-03-07 13:14:53 +01:00
Manuel de la Pena cad438dcfa
[XHarness] Reenable the System.Configuration tests on mac os x. (#5702)
Reenable the tests and add support to ignoring certain tests depending
on the version of the mac os x that is under test. The
System.Configuration tests make no sense in Modern.

Fixes https://github.com/xamarin/maccore/issues/1189
Fixes https://github.com/xamarin/maccore/issues/1190
2019-03-07 13:09:56 +01:00
Sebastien Pouliot 2eb178c7cd
[apidiff] Remove the `_*` noise in XM diffs (#5721)
Fix comparison so the XM profiles do not report _inexistent_ changes for `_Attribute`, `_EventInfo` and `_Exception`. That noise makes it harder to review the diffs (for us) and is incorrect in our published API diffs (for release notes).

Also
* Delete .unzip.stamp on clean
* Skip classic XM diff (binaries won't change)
2019-03-06 11:02:50 -05:00
Manuel de la Pena e3153dcfbe
[Xharness] Reenable MonoPoxis tests on mac os x. (#5711)
Fixes https://github.com/xamarin/maccore/issues/1190
Fixes https://github.com/xamarin/maccore/issues/1188
2019-03-05 11:26:59 +01:00
Manuel de la Pena 92ebe5b64a
[XHarness] Reenable SystemServiceModelTests on mac os x. (#5710)
Fixes  https://github.com/xamarin/maccore/issues/1198
2019-03-04 18:17:56 +01:00
Manuel de la Pena 568d19944d
[XHarness] Reneable SystemIdentityModelTests on mac os x. (#5708)
Fixes  https://github.com/xamarin/maccore/issues/1194
2019-03-04 17:42:07 +01:00
Manuel de la Pena 10912633e3
[Xharness] Reenable the xunit based System.Data tests on mac os x. (#5709)
Fixes https://github.com/xamarin/maccore/issues/1208
2019-03-04 17:41:37 +01:00
Manuel de la Pena 98d9fc2cf3
[XHarness] Reenable MonoCSharpTests on mac os x. (#5696)
Fixes https://github.com/xamarin/maccore/issues/1186
2019-03-04 10:56:22 +01:00
Sebastien Pouliot 78859b97b8
[apidiff] Fix location for XI (when comparing), otherwise we get the full (not PR) diff (#5700) 2019-03-03 12:46:47 -05:00
Manuel de la Pena 365fd66609
[Xharness] Reenable System.Data.Sqlite tests on mac os x. (#5697)
Tests are reenabled and a small typo fixed.

Fixes https://github.com/xamarin/maccore/issues/1187
2019-03-01 17:52:55 +01:00
Manuel de la Pena 1b1792cb43
[XHarness] Reenable the System.IO.Compression and (#5694)
System.IO.Compression.FileSystem tests on mac os x.

Reenable the tests that can be ran without failures.

Fixes https://github.com/xamarin/maccore/issues/1195
Fixes https://github.com/xamarin/maccore/issues/1146
2019-03-01 17:02:42 +01:00
Manuel de la Pena de82764456
[XHarness] Reneable the System.Transaction tests on Mac OS X. (#5686)
Reenable the tests and ensure that the failing ones on Modern are
ignored. The bcl tests on mac os x can now make a diff between the
version (Moder/Full) to ignore files so that tests that work in a
version are not ignored in the other one.

Fixes https://github.com/xamarin/maccore/issues/1200
2019-03-01 10:29:21 +01:00
Rolf Bjarne Kvinge 221f3e4a37 Merge remote-tracking branch 'origin/master' into mono-2018-10 2019-03-01 09:35:53 +01:00
Rolf Bjarne Kvinge 590524243c
Improve MachO support to read LC_BUILD_VERSION and static libraries. (#5685)
* MachO.cs: Support reading LC_BUILD_VERSION

Newer SDKs set this instead of LC_VERSION_MIN_*

* MachO.cs: Add support for reading Mach-O files inside ar archives.

* [tests] Augment ProductTests.MinOSVersion to test static libraries as well.

* Adjust enum field names to match our naming scheme.
2019-03-01 08:00:53 +01:00
Sebastien Pouliot 507d37eef6
[apidiff] Fix the comparison with the previous commit (#5690)
The removal of the XML files broke the comparison with the previous
commit. It did NOT fail the original PR because the targets were
in the previous commit.

And it will fail this PR because the previous commit still does not
have the targets - but it _should_ be fine, once merged, for all
future PR.

Fixes https://github.com/xamarin/maccore/issues/1452
2019-02-28 20:49:10 -05:00
Alexander Köplinger 97b5aef47e Merge branch 'master' into mono-2018-10 2019-02-28 21:18:49 +01:00
Manuel de la Pena c2967c0d50
[XHarness] Ensure we do a nuget restore on bcl imported tests. Fixes #5383 (#5574)
* [XHarness] Ensure we do a nuget restore on bcl imported tests. Fixes #5383

We need to ensure that a nuget restore is done, otherwise we might have
build issues with missing libs.

Fixes https://github.com/xamarin/xamarin-macios/issues/5383
2019-02-28 18:27:01 +01:00
Alexander Köplinger bbbf15a72b Merge branch 'master' into mono-2018-10
# Conflicts:
#	tests/bcl-test/System.Core/System.Core.csproj.template
#	tests/bcl-test/System.Net.Http/System.Net.Http-mac.csproj.template
#	tests/bcl-test/System.ServiceModel.Web/System.ServiceModel.Web.csproj.template
#	tests/bcl-test/System.Xml.Linq/System.Xml.Linq-mac.csproj.template
#	tests/bcl-test/System/System.csproj.template
2019-02-28 13:06:00 +01:00
Manuel de la Pena 297aebef60
[Tests] Fix the make rule that generate the test projects. Fixes #5638 (#5666)
Fixed the rule to generate the tests. This branch adds missing test dlls
that the make rule check, or it will give an error stating that tests
are missing.

This feature should be added to xharness and an issue was created for
that: https://github.com/xamarin/maccore/issues/1447

Fixes https://github.com/xamarin/xamarin-macios/issues/5638
2019-02-28 11:52:04 +01:00
Sebastien Pouliot ad3b70e9c7
[api-diff] Remove apidiff XML reference files. Fixes #4891 (#5663)
Instead download the assemblies (part of existing bundle.zip) of the
current release and generate the XML locally (no storage in github)
before doing the diff against the newer, just built, assemblies.

reference: https://github.com/xamarin/xamarin-macios/issues/4891
2019-02-27 08:59:53 -05:00
Manuel de la Pena a04048fd68
[XHarness] Fix small typo that made the Mono.Security tests of mac appear in a diff part of the DOM. (#5669) 2019-02-27 11:07:34 +01:00
Rolf Bjarne Kvinge c46a8b9611 Merge remote-tracking branch 'origin/master' into mono-2018-10 2019-02-27 07:43:02 +01:00
Rolf Bjarne Kvinge 5cb8b84e73
Simplify ARM64-based CPU detection logic. (#5661)
* We only need to do a runtime check on watchOS.
* On watchOS assume we're on a ARM64-based CPU as long as we're not on a
  ARMv7k CPU.

Fixes an issue where we failed to detect a 64-bit iOS CPU as ARM64-based (in
particular iPhone X's ARM64v8).
2019-02-27 07:31:33 +01:00
Bernhard Urban e2ec9422f2 [mtouch] use "--aot=interp,full,[...]" for every assembly if interpreter mixed mode is enabled (#5655)
The Mono AOT compiler maintains a set of signatures of compiled methods.
Those signatures are necessary to emit wrappers to enable the transition
from interpreter->AOT code. Thus, they must be collected for each
assembly.
2019-02-25 09:24:34 -05:00
Rolf Bjarne Kvinge 2a272a311d
[siminstaller] Improve failure scenarios. (#5662)
* Improve the behavior when we fail to download the .dvtdownloadableindex file
  to report a "Not Found" if we get a "Forbidden" (403) response, since that's
  what it really is.
* Improve the behavior when we fail to download the .dvtdownloadableindex file
  to check if the requested simulators are already installed instead of always
  failing. This makes it possible to manually install the required simulators
  if needed (Apple might not have published simulators for the Xcode version
  we're using), and this would allow any checks to pass if the required
  simulators are already installed.
* Improve the code to modify the PackageInfo XML to not use simple string
  replacement (it's too fragile), use proper XML parsing instead.
* Fix "time left" math, I have no idea what my previous math was doing.
2019-02-25 07:33:37 +01:00
Alexander Köplinger 1e9de96789 Merge branch 'master' into mono-2018-10 2019-02-24 10:20:44 +01:00
Rolf Bjarne Kvinge 1a3a3fbade
Add tool to download and install simulators, and use it to provision the iOS 10.3 simulator if needed. Fixes maccore#1442. (#5645)
* [siminstaller] Added tool to install simulators from the command line.

* Auto-provision the iOS 10.3 simulator.
2019-02-22 10:39:16 +01:00
Rolf Bjarne Kvinge 4a69a8c238
[mtouch] Compile .bc files into .o files before passing them to the clang. (#5651)
Clang will automatically compile .bc files into object code if needed, but
it's done serially. If we do the compilation ourselves, it'll be parallelized.

This makes the dontlink tests build in half the time when building for watchOS
/ Release (it drops from ~15 minutes to ~7 minutes).
2019-02-22 09:57:20 +01:00
Alexander Köplinger 4a03840d4d Merge branch 'master' into mono-2018-10
# Conflicts:
#	external/mono
#	tests/xharness/WatchOSTarget.cs
#	tools/mtouch/Target.cs
2019-02-21 19:30:39 +01:00
Alexander Köplinger a8a1aa60cf Fix issue with dylibs included in appex
See https://github.com/mono/mono/issues/13107
2019-02-21 19:22:53 +01:00
Rolf Bjarne Kvinge d19620c35f
[mtouch] Pass outfile= to the AOT compiler when compiling to full llvm as well. (#5647)
The AOT compiler uses the 'outfile' as the base for a temporary .bc file. If
it's not set, the path to the assembly is used as the base instead. This does
not work if we compile the same assembly to multiple architectures (for
instance armv7k+arm64_32), because the temporary file will clash between those
AOT compilations.

This is not a problem for iOS (armv7+armv7s) because we don't compile to
bitcode (.bc files) on iOS.
2019-02-21 16:38:30 +01:00
Rolf Bjarne Kvinge 81038fc319
[mtouch] Hide linker warning about mismatched watchOS versions. (#5646) 2019-02-21 15:44:17 +01:00
Rolf Bjarne Kvinge 2ff07b6f3a
[mtouch] Don't use the native linker to create fat executables. (#5629)
* [mtouch] Don't use the native linker to create fat executables.

Don't use the native linker to create fat executables, instead link each
architecture separately, and then manually lipo everything together at the
end. This requires a few changes since we need to keep track of the linker
flags per architecture.

The problem is that bitcode files (.bc) do not correspond with a particular
architecture, so the linker can't distinguish between .bc files for armv7k and
.bc files for arm64_32. So if we pass all together to the linker, the linker
will add all .bc files to both architectures, thus duplicating everything (and
the linking fails with duplicate symbols errors).

* [mtouch] Fix building symlinked simulator executables.

* [mtouch] Fix several assumptions about each Target only producing a single executable.
2019-02-21 14:39:02 +01:00
Sebastien Pouliot 4028977b66
[linker] Fix sealer to handle method overrides (#5643)
The current code did not consider that overrides could be swept later,
if unused/unmarked by the linker, so we were missing opportunities to
make methods as final.
2019-02-21 08:24:53 -05:00
Rolf Bjarne Kvinge 5f33d73077
[mtouch] Automatically install when building the csproj. (#5637)
I keep forgetting to run 'make mtouch' after changing mtouch, and then
expecting a test project to pick up the changes.
2019-02-20 15:13:27 +01:00
Alexander Köplinger 777a406838 Merge branch 'master' into mono-2018-10 2019-02-20 14:29:27 +01:00
Rolf Bjarne Kvinge bfab0ee22a
[mtouch] Fix --dot:<path> to honor the path passed. (#5626)
Also change output to use the full path to files as nodes, instead of just the
filename, and instead use a label to set what's shown to just the filename.

This makes the graph correct when we have multiple files with the same name,
but different paths.
2019-02-20 06:30:08 +01:00
Rolf Bjarne Kvinge ffda8b93ba
[mtouch] Remove MT0028, since it's only applicable if iOS deployment target is < 4.2. (#5625) 2019-02-20 06:29:52 +01:00
Alexander Köplinger 75ea3ca9bc Merge branch 'master' into mono-2018-10
# Conflicts:
#	external/mono
#	tests/xharness/Extensions.cs
2019-02-18 18:04:06 +01:00
Rolf Bjarne Kvinge 011d91e093
[mtouch] Document --optimize=remove-unsupported-il-for-bitcode in mtouch --help. (#5609) 2019-02-14 18:36:29 +01:00
Rolf Bjarne Kvinge 2bc18499b5
[mtouch] Quote MONO_PATH if needed in debug spew. (#5607)
Makes c&p commands easier.
2019-02-14 16:33:18 +01:00
Rolf Bjarne Kvinge 5571877312 [mtouch] Use a custom symbol writer to ensure only pdb file names are written to assemblies.
We need our 32-bit and 64-bit assemblies to be identical so that we can avoid
duplicating the .dll in fat apps.

One difference used to be that the .dll contained the full path to the
corresponding .pdb ([1]), but we changed cecil to only write the filename
([2]). Unfortunately this change breaks something else, so it has to be
reverted ([3]).

This implements a different solution: we provide a custom symbol writer to
Cecil, which only writes the filename of the pdb in the .dll, not the full
path.

[1]: https://bugzilla.xamarin.com/show_bug.cgi?id=54578
[2]: https://github.com/jbevain/cecil/issues/372
[3]: https://github.com/jbevain/cecil/pull/554

(cherry picked from commit 53874c863996656eaba43a5582731b93eb6f53b7)

# Conflicts:
#	tools/mtouch/mtouch.csproj
2019-02-13 14:59:34 +01:00
Rolf Bjarne Kvinge 0f49b41513 Merge remote-tracking branch 'origin/master' into mono-2018-10 2019-02-13 13:51:37 +01:00
Rolf Bjarne Kvinge 7e67e7123d
[bcl-test-importer] Fix compiler warning about unused variable. (#5591)
Fixes this warning:

    tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs(19,17): warning CS0414: The field 'BCLTestProjectGenerator.iOSReleasePattern' is assigned but its value is never used
2019-02-13 13:28:43 +01:00
Alexander Köplinger ea1e8b0572 MachO.cs: Support reading LC_BUILD_VERSION
Newer SDKs set this instead of LC_VERSION_MIN_*
2019-02-13 03:19:14 +01:00
Rolf Bjarne Kvinge d02c9bc8e0
Add a Runtime.IsARM64CallingConvention property. (#5569)
* Add a Runtime.IsARM64CallingConvention property.

Determining whether we should use the ARM64 calling convention in P/Invokes
gets more complicated with ARM64_32 (which for our purposes is a 32-bit
architecture).

So add a property on the Runtime class to avoid code duplication, and teach
the linker to optimize any calls to this property to a constant value whenever
possible (and the method is marked as optimizable).

Also change our code to use this new property, and make the corresponding
methods optimizable.

Some shuffling in mmp was required, which meant a little bit more code is now
shared between mtouch and mmp.

* Coding style.

* Test tweaks.

* Improve comment.

* Document new optimization

* Move ILReader to shared linker test code location.

* Disable inlining on armv7k.

* Change IsARM64CallingConvention to a read-only field.

We can give the AOT compiler a constant value for a read-only field, so that
the AOT compiler optimizes away the call to the field by using the constant
value.

This commit does not implement this change for the AOT compiler, but using a
read-only field makes it easy to implement it in the future.
2019-02-11 17:29:13 +01:00
Rolf Bjarne Kvinge 1141e01a63 [mtouch] Remove unnecessary exception handling. 2019-02-11 13:49:38 +01:00
Rolf Bjarne Kvinge c54fc2431f [mtouch] Show error in case of unexpected behavior. 2019-02-11 13:49:38 +01:00
Rolf Bjarne Kvinge 019fcb6a83 [mmp/mtouch] Share some code. 2019-02-11 13:49:38 +01:00
Rolf Bjarne Kvinge 930d66ff63 [mtouch/mmp] Use 99 as the error code for internal errors. 2019-02-11 13:49:38 +01:00
Rolf Bjarne Kvinge 5385f44021 [xharness] Some style/debug fixes. 2019-02-11 13:49:38 +01:00
Alexander Köplinger 213f23b829 Merge branch 'master' into mono-2018-10
# Conflicts:
#	tests/mtouch/mtouch.csproj
2019-02-07 23:12:42 +01:00
Rolf Bjarne Kvinge db44b386ae [MachO]: Implement reading min OS load commands. 2019-02-07 15:58:34 +01:00
Rolf Bjarne Kvinge a28fad5df3
Merge pull request #5556 from rolfbjarne/issue-5553
[build] Make sure -mmacosx-version-min is passed to the mono build. Fixes #5553.
2019-02-07 13:04:45 +01:00
Rolf Bjarne Kvinge b32ac08c6d
[mtouch] Simplify & unify lipo code. (#5558) 2019-02-07 13:04:19 +01:00
Rolf Bjarne Kvinge 135507957f
[linker] Remove non-bitcode compatible code, and show a warning. (#5551)
* [linker] Remove non-bitcode compatible code, and show a warning.

Remove code not currently compatible with bitcode and replace it with an
exception instead (otherwise we'll assert at runtime).

Also show a warning when we detect this.

This is quite helpful when looking at watch device test runs to filter out
failures we already know about.

This fixes point #2 in #4763.

* Improve documentation.

* Simplify linker code by using a substep.

* Fix whitespace issues.

* Improve reporting.

* Add support for reporting more than one MT2105 at the same time when making
  the errors instead of warnings.
* Only report MT2105 for methods that haven't been linked away.
* Format the error message nicer for properties.

* Tweak a bit for warning tests to pass.

* Use ExceptionalSubStep to provide better error information.

* Adjust where linker warnings/errors are reported from to avoid a NullReferenceException.
2019-02-07 07:57:01 +01:00
Alexander Köplinger 42c0b1e474 Merge branch 'master' into mono-2018-10
# Conflicts:
#	external/mono
2019-02-07 00:06:17 +01:00
Rolf Bjarne Kvinge 22c8ca5090
[docs] Make PreserveSmartEnumConversionsSubStep use unique error codes and improve ExceptionalSubStep error documentation. (#5555)
* Make PreserveSmartEnumConversionsSubStep use error codes that are not
  already used elsewhere: this isn't obvious at first, but all
  ExceptionalSubStep errors use a range of error numbers (10 numbers from NNN0
  to NNN9), so we need to reserve that entire range. In this case there were
  other errors using some of the numbers of the range for PreserveSmartEnumConversionsSubStep.
* Make sure there are anchor links for all the variations of each ExceptionalSubStep error.
2019-02-06 15:31:49 +01:00
Rolf Bjarne Kvinge ce72a51938 [MachO]: Implement reading min OS load commands. 2019-02-06 09:48:42 +01:00
Alexander Köplinger 8829aa0c39 Merge branch 'master' into mono-2018-10
# Conflicts:
#	tests/xharness/Harness.cs
2019-02-05 21:38:47 +01:00
Alexander Köplinger a67e2b270e Remove accidentally committed debugging helper 2019-02-05 15:08:47 +01:00
Rolf Bjarne Kvinge 6bc475e624
[xharness] Rework BCL test importation to not bail out completely if something went wrong. (#5540)
Rework BCL test importation to generate projects that won't compile instead of
giving up completely in case of generation failure.

This means that xharness can still be used for non-BCL tests even if the
generation of the BCL tests fail.
2019-02-05 12:55:46 +01:00
Alexander Köplinger 1c97aba973 Fix mono native copying when no linkcontext is available
When we're using cached linker output we can't access LinkContext.
Instead we need to cache the required values ourselves.
2019-02-05 11:37:02 +01:00
Rolf Bjarne Kvinge 736cb90ac6
[mtouch/mmp] Avoid a few clang warnings in the generated pinvoke code. (#5541) 2019-02-04 15:20:44 +01:00
Alexander Köplinger 68657484bb Merge branch 'master' into mono-2018-10 2019-02-04 15:11:58 +01:00
Rolf Bjarne Kvinge db01babe71
[tests] Set the correct environment variables when executing msbuild from the mtouch tests. (#5534)
This is usually not a problem, because these variables are already set when
running from the command-line or xharness. However, it shows up when running
tests directly from VSfM.
2019-02-04 07:59:29 +01:00
Sebastien Pouliot cf86b3e1ef
[mtouch] Use the 'repl' assemblies when the interpreter is enabled (#5535) 2019-02-01 15:55:27 -05:00
Alexander Köplinger b105a5dd6f Improve copying of libmono-native 2019-02-01 20:10:58 +01:00
Alexander Köplinger d612d3ec27 bugzilla -> github 2019-02-01 19:47:55 +01:00
Alexander Köplinger 8081626eda Improve copying of libmono-native 2019-02-01 19:40:50 +01:00
Rolf Bjarne Kvinge 510bb0b1cd
[mtouch] Add logging overloads that don't format the input. (#5525)
Sometimes we just Log a string without any format arguments. This works fine,
until the string comes from the user, and happen to contain braces, in which
case an invalid format exception is thrown.

Adding Log overloads that doesn't take format arguments (nor formats its
input) avoids this problem.
2019-02-01 07:43:15 +01:00
Alexander Köplinger e25499395d Link with GSS framework in mmp when Mono.Native is used 2019-01-31 14:32:21 +01:00
Alexander Köplinger acc513aba5 Add System.Net.Security.Native to mmp 2019-01-31 14:32:00 +01:00
Alexander Köplinger 8b21371437 Merge branch 'master' into mono-2018-10 2019-01-30 13:43:03 +01:00
Sebastien Pouliot aebbe023e0
[apidiff] Build API diffs based on 15.9/xcode10.1 so it only shows the changes from Xcode 10.2 (#5508) 2019-01-29 10:41:58 -05:00
Rolf Bjarne Kvinge 83718c0b72
[jenkins] Try to give better information when api comparison / generator diff fails. (#5477) 2019-01-25 17:33:58 +01:00
Rolf Bjarne Kvinge be504be9ac
[mtouch] Properly deserialize cached Objective-C class symbols. Fixes #5467. (#5468)
Deserialize cached Objective-C class symbols to match how the objects looked
before serialization. This means storing the Objective-C class name in the
Symbol.ObjectiveCName field, and not the Symbol.Name field.

Fixes https://github.com/xamarin/xamarin-macios/issues/5467.
2019-01-24 15:08:50 +01:00
Manuel de la Pena a63c1c7f62
[XHarness] Fix small typo in test projet name. (#5461)
The small typo made the test projects from mac and ios/tvos/watchos be
in different nodes in the xhanress web page which is ugly. They now wil
appear in the same node.
2019-01-23 10:15:36 +01:00
Manuel de la Pena a71f421a67
[XHarness] Reneable Sytem.Security tests on iOS, TvOS and WatchOS. (#5421)
Reneable the tests and ignore those failing ones.

Fixes  https://github.com/xamarin/maccore/issues/1139
2019-01-22 23:18:45 +01:00
Bernhard Urban bec4e8604a Merge branch 'master' of github.com:xamarin/xamarin-macios into mono-2018-10 2019-01-18 14:09:29 +01:00
Manuel de la Pena 879629bc9d
[XHarness] Reenable the System tests on iOS, WatchOS and TVOs. (#5425)
All the failing tests have been ignored. There are a large number of
tests ignored on the watchOS platform beacuase atm the iOS test dll is
used.

Fixes https://github.com/xamarin/maccore/issues/1135
2019-01-17 22:58:31 +01:00
Manuel de la Pena cf1a034e96
[XHarness] Reenable the NUnit Corlib tests from the iOS Mono SDK. (#5316)
Reenable the tests on iOS/TvOS/WatchOS. Fixes xamarin/maccore#1153
2019-01-17 22:55:06 +01:00
Manuel de la Pena fea85dc569
[XHarness] Reenable SystemTransactionsTests on iOS, TvOS and WatchOs. (#5411)
Fixes https://github.com/xamarin/maccore/issues/1134
2019-01-16 19:12:20 +01:00
Manuel de la Pena 34ca0496fc
[XHarness] Reneable the SystemNetHttpTests on iOS, TvOS and WatchOS. (#5405)
Failing iOS tests are ignored WatchOS is running the iOS tests until we have the tests in the SDK
for the watch runtime.

Fixes https://github.com/xamarin/maccore/issues/1144
Fixes https://github.com/xamarin/maccore/issues/1145

Mono issue: https://github.com/mono/mono/issues/12430
2019-01-16 12:16:22 +01:00
Manuel de la Pena c455a1d7b9
[XHarness] Reneable Mono.Security tests on WatchOS. (#5412)
Fixes https://github.com/xamarin/maccore/issues/1142
2019-01-16 12:13:34 +01:00
Manuel de la Pena 293ade0a30
[XHarness] Reneable the SystemSecurity tests on iOS, TvOS and WatchOS (#5410)
Some of the test classes are abstract, and we needed to change the
generator to ignore that fact. Before the change, we would have 0 test
cases.

Failing tests are ignored.

Fixes https://github.com/xamarin/maccore/issues/1128

Mono issue https://github.com/mono/mono/issues/12446
2019-01-16 12:11:53 +01:00
Manuel de la Pena f63030d267
[XHarness] Remove System.Threading.Tasks.Dataflow_xunit-test from iOS, TvOS and WatchOS. (#5407)
As with other tests, this have been added because they were present when
we built the test assemblies locally, but they are not present in the
Mono SDK.

Fixes https://github.com/xamarin/maccore/issues/1132
2019-01-15 17:38:18 +01:00
Manuel de la Pena d7813b3275
[XHarness] Remove System.Runtime.Serialization.Formatters.Soap_test from iOS, TvOS and WatchOS (#5406)
As with other tests, this assembly was added when we built the tests in
the iOS makefile, but they are not present in the Mono SDK.

Fixes https://github.com/xamarin/maccore/issues/1140
2019-01-15 17:35:05 +01:00
Manuel de la Pena 2ba9a34198
[XHarness] Reenable SystemLinqXunit on watchOS and TvOS. (#5395) 2019-01-15 12:11:09 +01:00
Manuel de la Pena 20595ce988
[XHarness] Remove not needed bcl tests for (#5400)
Remove tests that are not provided in the Mono iOS SDK for Mono.Runtime.

Fixes https://github.com/xamarin/maccore/issues/1141
2019-01-14 18:37:57 +01:00
Manuel de la Pena e53bfac5c0
[XHarness] Reenable System.Core tests on ios/tvos/watchos (#5397)
Fixes https://github.com/xamarin/maccore/issues/1143

Mono issue: https://github.com/mono/mono/issues/12419
2019-01-14 17:16:41 +01:00
Manuel de la Pena 102339ad47
[XHarness] Reenable the System.ServiceModel tests from the bcl. (#5384)
Fixes https://github.com/xamarin/maccore/issues/1138

A new mono issue was added: https://github.com/mono/mono/issues/12417
2019-01-14 16:58:36 +01:00
Manuel de la Pena 392cd4342a
[XHarness] Reneable System.Numerics XUnit tests on TvOS and WatchOS. (#5396) 2019-01-14 16:50:17 +01:00
Alexander Köplinger 929e4623c4 Merge branch 'master' into mono-2018-10
# Conflicts:
#	external/mono
2019-01-14 15:26:56 +01:00
Alexander Köplinger 0dae3f27ad Fix building XamMac projects 2019-01-14 14:58:37 +01:00
Manuel de la Pena e880c6c156
[XHarness] Remove not longer present bcl tests. (#5382)
As of Mono SDK 25a8be91115255341dd80ce4a225415feec46f56 we do not longer
have the test dll and therefore the test project can be removed.
2019-01-14 13:24:08 +01:00
Sebastien Pouliot 974617d144
[mtouch] Provide a better (and single) error message when the interpreter is enabled in simulator builds. (#5376)
Before

```
clang : error : no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-ee-interp.a'
clang : error : no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-icall-table.a'
clang : error : no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-ilgen.a'
error MT5209 : Native linking error : clang: error: no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-ee-interp.a'
error MT5209 : Native linking error : clang: error: no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-icall-table.a'
error MT5209 : Native linking error : clang: error: no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-ilgen.a'
MTOUCH : error MT5202: Native linking failed. Please review the build log.
    0 Warning(s)
    7 Error(s)
```

After

```
MTOUCH : error MT0141: The interpreter is not supported in the simulator. Do not pass --interpreter when building for the simulator.
    0 Warning(s)
    1 Error(s)
```
2019-01-11 11:38:22 -05:00
Manuel de la Pena adc9ddccf3
[XHarness] Reenable the System.Data tests from the bcl. (#5379) 2019-01-11 16:56:30 +01:00
Manuel de la Pena 6a1ecaabb0
[XHarness] Reenable the System.IO.Compression.Filesystem tests and ignore those failing ones. (#5374) 2019-01-11 12:22:48 +01:00
Alexander Köplinger 1e961da1da Add System.Net.Security.Native dllmap to mmp 2019-01-10 22:14:58 +01:00
Alexander Köplinger 32db60a51f Fix dllmap for System.Security.Cryptography.Native.Apple in mmp 2019-01-10 22:14:58 +01:00
Alexander Köplinger ca90eb2e19 Merge branch 'master' into mono-2018-10
# Conflicts:
#	external/mono
2019-01-10 22:13:44 +01:00
Chris Hamons a4332c90aa
[mmp] Add support for mono 5.18 by pulling in libmono-system-native.a (#5328)
- https://github.com/xamarin/xamarin-macios/issues/5324
- Patch tweaked over multiple commits in master so applied directly instead of cherry-pick
2019-01-10 13:31:31 -06:00
Manuel de la Pena 8e32a07af0
[XHarness] Reneable the System.IO.Compression tests. (#5373) 2019-01-10 19:05:13 +01:00
Manuel de la Pena 18035518fb
[XHarness] Reenable System.Xml tests from the mono test dlls. (#5370) 2019-01-10 16:26:54 +01:00
Rolf Bjarne Kvinge 2b4a3b948b
[mtouch] Disable native code sharing if the interpreter settings differ between the main app and app extensions. Fixes #5365. (#5369)
We can't share native code between apps and app extensions if the interpreter
settings differ between them, so detect this scenario and automatically
disable native code sharing.

Fixes https://github.com/xamarin/xamarin-macios/issues/5365.
2019-01-10 15:45:33 +01:00
Rolf Bjarne Kvinge 29e6afc0f3
[compare-commits] Only validate files when validating if files have unexpectedly changed. (#5360)
Fixes this problem:

    The following files were modified, and they shouldn't have been:
        /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/src

which shouldn't be reported, since the "file" in question is a directory.

Reference: https://github.com/xamarin/xamarin-macios/pull/5355#issuecomment-452400517
2019-01-09 16:07:23 +01:00
Rolf Bjarne Kvinge 327c0a8ddf
[xibuild] Add support for /verbose, and use it accordingly. (#5224)
* [xibuild] Add support for /verbose, and use it accordingly.

Also stop using xibuild when it's not needed.

* Use the same verbosity for xibuild as we do for xbuild/msbuild.
2019-01-09 07:43:22 +01:00
Marek Safar c6653167b9 Merge remote-tracking branch 'origin/master' into mono-2018-10 2019-01-07 14:41:25 +01:00
Manuel de la Pena 40921b9924
[XHarness] Reenable Mono.Data.Tds tests on watch os. (#5317)
Ignore the failing tests and run the rest. Fixes xamarin/maccore#1152
2018-12-21 10:38:13 +01:00
Manuel de la Pena 480f786839
[XHarness] Add support for ignore files in the blc tests (#5288)
This PR adds support to the use of *.ignore files for iOS/tvOS/WatchOS. The files are very similar to those that are use in xtro. We have:

* common-{TestProjectName}.ignore: For those tests that fail in all platforms.
* tvOS-{TestProjectName}.ignore: For tvOS specific failures.
* watchOS-{TestProjectName}.ignore: For watchOS specific failures.
* iOS-{TestProjectName}.ignore: for iOS specific projects.

Two test projects that were ignored previously have been added to show that the code does as advertised:

* SystemDataXunit: xUnit test project example. Fixes https://github.com/xamarin/maccore/issues/1131
* SystemServiceModelWebTests: NUnit test project example. Fixes https://github.com/xamarin/maccore/issues/1137

The files take the name of the failing tests, although we do support ignoring by class/namespace and other combinations, that would make the *.ignore files format more complicated and it is not worth it.
2018-12-20 23:13:17 +01:00
Rolf Bjarne Kvinge d6cf195b4e
[registrar] Throw EntryPointNotFoundException when generating P/Invoke wrappers for objc_msgSend*_stret on arm64. Fixes #5183. (#5312)
objc_msgSend*_stret doesn't exist on arm64, so trying to call these functions
in our generated P/Invoke wrappers will result in a clang error:

    [...]/pinvokes.m:180:69: error: 'objc_msgSend_stret' is unavailable: not available in arm64 (TaskId:243)

So instead generate a call to throw an EntryPointNotFoundException (which is
exactly what would happen if we didn't generate the P/Invoke wrapper).

Fixes https://github.com/xamarin/xamarin-macios/issues/5183.
2018-12-20 18:38:07 +01:00
Rolf Bjarne Kvinge b331ed8290
[registrar] Remove unused parameter from function call. (#5311) 2018-12-20 17:27:45 +01:00
Rolf Bjarne Kvinge 163f9a37f9
[mtouch] Ignore linker warnings about our own libraries being built for iOS 7.0 when deployment target is iOS 6.0. Fixes #5092. (#5310)
Only the arm64 slice are built for iOS 7.0 (because that's when arm64 was
introduced), the arm7(s) slices are built for iOS 6.0, which means it's safe
to ignore this warning.

Fixes https://github.com/xamarin/xamarin-macios/issues/5092.
2018-12-20 17:27:25 +01:00
Manuel de la Pena ef78b1dbc3
[XHarness] Do not build the test assemblies for the iOS platforms. (#5270)
We now download the ios Mono sdk which means that there is no need for
us to build the test assemblies on iOS, WatchOS and tvOS BUT we need to
do so for the Mac tests.

The change includes:
  1. Use fo the downloaded test assemblies.
  2. Removal of the dependency of building them in the tests.
  3. Move back to using reflection for the project generation.
  4. Remove the cached project details added in the workaround.
2018-12-18 14:21:09 +01:00
Marek Safar aa6fefb1c9 Merge remote-tracking branch 'origin/master' into mono-2018-10 2018-12-17 15:28:08 +01:00