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

5247 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge e955a489f8 Move generator-ikvm.csproj.in -> generator.csproj.in. 2018-08-23 13:38:32 +02:00
Rolf Bjarne Kvinge dea087332e [src] Simplify the IOS_TARGETS_template template to have fewer variables.
Turns out we only need a single variable now.
2018-08-23 13:38:32 +02:00
Rolf Bjarne Kvinge ab4b6fa8d9 [src] Expand the IOS_GENERATOR_template template, since it's only used once.
No need to have complicated template code when it's only instantiated once.
2018-08-23 12:59:03 +02:00
Rolf Bjarne Kvinge 508ecd16c8 [src] Remove make targets for SRE-based generators.
They're not used anymore.
2018-08-23 12:53:22 +02:00
Rolf Bjarne Kvinge 30af5e34ad Remove unneeded solution to simplify things / avoid confusion. 2018-08-23 12:32:57 +02:00
Rolf Bjarne Kvinge 53b88bfd7f Remove unusued project configuration ('DebugStaticRegistrar') from Xamarin.iOS.sln. 2018-08-23 12:32:09 +02:00
Rolf Bjarne Kvinge 51c16e4fdc Fix mtouch's Release configuration to build the right Cecil assemblies. 2018-08-23 12:31:24 +02:00
Rolf Bjarne Kvinge 91fcb31688 Fix mmp's Release configuration to build the right Cecil configuration. 2018-08-23 12:30:10 +02:00
Sebastien Pouliot 216966ee87 [coredata] Add some missing API spotted by xtro 2018-08-22 16:51:24 -04:00
Sebastien Pouliot beeb0021c5 [coreanimation][macos] Update for xtro 2018-08-22 15:46:26 -04:00
Sebastien Pouliot 387e45093d [cloudkit] Add back (an updated) watchOS-CloudKit.ignore 2018-08-22 15:42:55 -04:00
Sebastien Pouliot b348cc56b6 [contacts] Add comment why 'CNPhoneNumber::init' is not bound (since it's reported by xtro) 2018-08-22 15:42:07 -04:00
Sebastien Pouliot 10d13cc986 [cloudkit] Review missing 'init' on some types, in particular allow them outside watchOS 2018-08-22 14:56:51 -04:00
Rolf Bjarne Kvinge 2ba60926a5
[introspection] Fix typo test on Mojave. (#4677)
Fixes:

    [FAIL] Typo in METHOD name: TcpSetDisableAckStretching - Ack, Type: NWProtocolOptions
    [FAIL] Typo in METHOD name: get_DrmProtected - Drm, Type: ITLibMediaItem
    [FAIL] Typo in FIELD name: DistinguisedKind - Distinguised, Type: ITLibPlaylistProperty
    [FAIL] Typo in FIELD name: IsDrmProtected - Drm, Type: MediaItemProperty
2018-08-22 16:54:43 +02:00
Rolf Bjarne Kvinge ea4909034b
[xharness] Be resilient when trying to copying contents from an inexistent file. (#4676)
Should fix this (or at the very least not prevent xharness from writing out the report):

    21:07:30.3947450 Failed to write log: System.IO.FileNotFoundException: Could not find file '/Users/builder/Library/Logs/CoreSimulator/6DA2ED3C-B1FA-4D0B-9DD6-113E5F9A1381/system.log'.
    File name: '/Users/builder/Library/Logs/CoreSimulator/6DA2ED3C-B1FA-4D0B-9DD6-113E5F9A1381/system.log'
        at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x00207] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/io/__error.cs:188
        at System.IO.FileInfo.get_Length () [0x00038] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/io/fileinfo.cs:171
        at xharness.CaptureLog.Capture () [0x0004a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/xharness/Log.cs:334
        at xharness.CaptureLog.Flush () [0x00008] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/xharness/Log.cs:373
        at xharness.Jenkins.GenerateReportImpl (System.IO.Stream stream, System.IO.StreamWriter markdown_summary) [0x017db] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/xharness/Jenkins.cs:2012
        at xharness.Jenkins.GenerateReport (System.Boolean only_if_ci) [0x00075] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/xharness/Jenkins.cs:1313
2018-08-22 16:54:19 +02:00
Sebastien Pouliot 19683847c2 [avfoundation] Add missing API (previously missed by xtro) 2018-08-22 09:14:10 -04:00
Manuel de la Pena 8012d4cd54
[Runtime] Small fix for the runtime.h exposed by Emb-4000. Fixes #4442 (#4663)
This fixes issue #4442 by fixing a small struct issues.

https://github.com/xamarin/xamarin-macios/issues/4442
2018-08-22 11:16:27 +02:00
Rolf Bjarne Kvinge 1d5c334a89
[jenkins] Don't give VSTS a fake branch. (#4667)
Something in VSTS changed, and now fake branch names don't work anymore.

So instead use real branch names (and for pull requests I've created a
'pull-request' branch we can use).
2018-08-21 23:31:42 +02:00
Sebastien Pouliot 885ee6f3c1 [corebluetooth] Update xtro (we provided something else, enabling events) 2018-08-21 16:59:51 -04:00
Sebastien Pouliot 5ee10601d9 [xtro] Add new todo 2018-08-21 16:04:28 -04:00
Sebastien Pouliot b8e50117f9 [xtro] Remove duplicated filter method from reporter and share the new common one 2018-08-21 16:03:37 -04:00
Sebastien Pouliot 75b146b9d2 [xtro] Update u2todo not to create todo files for non supported frameworks 2018-08-21 15:42:36 -04:00
Vincent Dondain 1eefd4e383 Bump maccore for d15-8 merge (#4668) 2018-08-21 14:30:04 -04:00
Sebastien Pouliot b8d1a8739e [xtro] Skip '+type:new' selectors, we do not bind them 2018-08-21 14:21:12 -04:00
Sebastien Pouliot 4b7d631dba [xtro] Fix how we get selectors so parameter-less are not skipped 2018-08-21 14:20:25 -04:00
Rolf Bjarne Kvinge 1d0e058636
[xharness] Replace existing content in TCC.db. Might fix maccore#951. (#4666)
There seems to be an issue where adding stuff to the TCC.db might fail
partially. In that case we try again, but we try to add every entry once more,
which now might fail due to existing entries.

So always replace when adding new entries in TCC.db. Also dump the database
when done to help debugging if it turns out this doesn't fix maccore#915.

Might fix https://github.com/xamarin/maccore/issues/951.
2018-08-21 19:11:23 +02:00
Sebastien Pouliot d99be7a03e
Merge d15-8 into xcode 10 2018-08-21 09:29:35 -04:00
Rolf Bjarne Kvinge f9a3be16da
[system-dependencies] Use 'xcodebuild -runFirstLaunch' to install first-launch packages instead of manually installing each package. (#4662)
This is more future-proof, since the list of packages may change, or there may
be other tasks that need doing in addition to installing packages.

This might help/fix https://github.com/xamarin/maccore/issues/952.
2018-08-21 15:21:29 +02:00
Sebastien Pouliot d9edf5928d
[avfoundation] Deprecate 'AVMediaTypeTimedMetadata' (#4655)
AVMediaTypeTimedMetadata has been obsoleted since iOS 6 but was totally
removed (returns null) in iOS 12.

Adjust test and provide a (better) deprecation warning for developers.
2018-08-21 08:57:44 -04:00
Rolf Bjarne Kvinge 347f472b03
[jenkins] Improve error reporting a bit. (#4646)
We keep track of the current stage by using the 'currentStage' variable, so that we can properly report what failed.

There were a couple of problems with this:

* The 'Package Xamarin.Mac tests' is not a fatal step, which means that the
  pipeline will continue executing even if it fails. In this case the previous
  code would assign any failure to package the XM tests to the last stage
  ('Test docs').

* Something similar seems to happen if there are failures in the Xamarin.Mac
  tests executed in parallel (on other bots), where any failure would be
  reported as a failure in the last stage ('Test docs').

* No support for reporting failure in multiple stages.

So do a couple of things:

* Clear out the 'currentStage' variable at the end, and handle it being empty
  when reporting results. This should solve at least some of the problems
  where blame as being assigned incorrectly (we'll probably run into cases
  where blame isn't assigned at all, but this is still half the way of getting
  it right).

* Add a 'failedStages' variables where we can keep track of (and report)
  multiple failed stages.
2018-08-21 09:55:07 +02:00
Rolf Bjarne Kvinge b6f2ad4b57 Bump mono.
Commit list for mono/mono:

* mono/mono@4e0a2ac0dd [llvm] Avoid using the preserveall calling convention on watchos, xcode10 asserts on it. (#9325)
* mono/mono@02928166e5 Bump nunitlite to get NUnit2 xml output fix and failure on file not found fix (#10188)
* mono/mono@6c1f4b9746 [System.Xml.Linq] Fix namespace conflict with new Xamarin.Mac namespace in test code. (#10185)

Diff: 4fe3280bba...4e0a2ac0dd
2018-08-21 07:07:44 +02:00
Manuel de la Pena 92d6e94707 [NaturalLanguage] Change return type to use double instead on nuint. Fixes #4642 (#4654)
The docs or headers do not specify the exact type. Using double to be
sure.

Issue: https://github.com/xamarin/xamarin-macios/issues/4642
2018-08-20 21:44:24 -04:00
Sebastien Pouliot 213590b3c0
[tests] Re-enable AVPlayerViewController.PrepareForPrerollAds test (broken in early betas) (#4656) 2018-08-20 21:15:58 -04:00
Vincent Dondain c40822d846 [healthkit] Add missing static to GetClinicalType (#4657)
*Note: Credit to Paul DiPietro (@pauldipietro) for finding this when trying to use the new HealthKit APIs.*
2018-08-20 20:54:22 -04:00
Manuel de la Pena 82dfd4fb59 [AppKit] Xcode 10 beta 6 support. (#4653) 2018-08-20 18:00:32 -04:00
Sebastien Pouliot c7e791a514
[tests] Re-enabled CIBarcodeGenerator tests (failed in earlier betas) (#4651) 2018-08-20 15:26:59 -04:00
Manuel de la Pena c5974d94ef [CarPlay] Update for Xcode 10 beta 6. (#4650) 2018-08-20 14:49:02 -04:00
Rolf Bjarne Kvinge 5995833903
[tests] Improve F# test's assert message. (#4649)
Before in case of failure:

    [FAIL] FSharpTest.SprintfTest :   Expected: True
        But was:  False
    	  at fsharp.FSharpTest.SprintfTest () [0x00052] in /work/maccore/mono-master/xamarin-macios/tests/fsharp/FSharpTests.fs:34
    	  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)

After in case of failure:

    [FAIL] FSharpTest.SprintfTest :   String lengths are both 24. Strings differ at index 10.
      Expected: "1111 2222 3333 4444 5555"
      But was:  "1111 2222 4444 3333 5555"
      ---------------------^
    at fsharp.FSharpTest.SprintfTest () [0x00044] in /work/maccore/mono-master/xamarin-macios/tests/fsharp/FSharpTests.fs:33
    at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
2018-08-20 19:06:01 +02:00
Vincent Dondain c2a993e4c9
[IntentsUI] Update for Xcode 10 beta 6 (#4640) 2018-08-20 09:20:01 -04:00
Jeffrey Stedfast 2d25af6412 [msbuild] pass --target-platform=<platform> to copySceneKitAssets (#4630)
The copySceneKitAssets program has a poor command-line options
parser that cannot handle --target-platform and its argument
being 2 separate arguments, they have to be combined with an '='.

Fixes https://github.com/xamarin/xamarin-macios/issues/4467
2018-08-20 08:40:11 -04:00
Sebastien Pouliot 9f90691820
[mtouch] Add the option of always weak link a framework. Fixes #4628 (#4641)
Linking with CoreNFC crash applications on iOS 12 on iPad (and likely
other device not supporting, or supported, for NFC).

This used to work on iOS 11.x (when introduced). The solution is to
always **weak** link CoreNFC (since we can't guess devices)

https://github.com/xamarin/xamarin-macios/issues/4628
2018-08-20 08:34:29 -04:00
Rolf Bjarne Kvinge a619226b36
[msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237. (#4512)
* [msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237.

In Xamarin.iOS.Common.targets, just before the _CompileToNative target, we
modify the mtouch references to ensure that we get the lib assemblies for
nugets, and not the ref references:

9e31d07ecc/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets (L784-L791)

This logic removes nuget references, and then re-adds any copy-local dll
references.

This works fine in executable projects, but not in library projects (aka
extensions), because nugets aren't copied for library projects:

cf4b0a12cf/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets (L86)

So we need to set the CopyNuGetImplementations variable to 'true' for our
library projects.

Fixes https://github.com/xamarin/xamarin-macios/issues/4235.
Fixes https://github.com/xamarin/xamarin-macios/issues/4237.

* [tests] Redirect MSBuildExtensionsPath to MSBuildExtensionsPathFallbackPathsOverride when running msbuild for package reference tests.

This fixes a problem where nuget restore would fail for projects with
PackageReferences, because a variable would be empty and msbould would try to
write to /:

    nuget restore ../MyAppWithPackageReference/MyAppWithPackageReference.csproj
    MSBuild auto-detection: using msbuild version '15.0' from '/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/'.
    Restoring packages for /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/msbuild/tests/MyAppWithPackageReference/MyAppWithPackageReference.csproj...
    Committing restore...
    Generating MSBuild file /MyAppWithPackageReference.csproj.nuget.g.props.
    Path / is a directory

This will become unnecessary when PR #4111 is merged.

* Add Xamarin.Mac test showing that fix is not needed (?!?)

* Add AppExtension test with packagereference

* Make extension actually have json code generated

* Fix ProjectTypeGuids of checked in extension projects, as they were not openable in VSfM

* XM extension test now correctly fails

* Now that we have a failing test, fix XM same as rest of platforms

* Disable XM tests due to msbuild redirect sadness

* Disable iOS tests as well due to #4110

* Disable iOS tests by using the Ignore attribute.

Disable tests by using the Ignore attribute, because just commenting out the
TestCase attributes makes the test fail:

    1) NotRunnable : Xamarin.iOS.Tasks.ProjectReferenceTests.BasicTest
       No suitable constructor was found
2018-08-20 13:43:48 +02:00
Rolf Bjarne Kvinge da436c479b [msbuild] Exclude some code in Metal tasks when building the tests.
Exclude some code in Metal tasks when building the tests to avoid the
significant complexity it would be to add the required source files to the
mtouch test project.
2018-08-20 12:59:55 +02:00
Rolf Bjarne Kvinge 7e368e1264
Bump maccore to get fix for VSTS #616528. (#4637)
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/616528.

Diff: f4e3e7c1f9...9937926f56
2018-08-20 08:57:29 +02:00
Rolf Bjarne Kvinge 1bbfbd26ff
[F# tests] Default to LinkSdk for device builds. (#4643)
Makes device builds (and uploads) much faster.

I've checked all other tests, and this was the only one not using LinkSdk
(except tests that don't on purpose, such as linker tests).
2018-08-20 07:42:32 +02:00
Rolf Bjarne Kvinge 5f4327ab0f
[CoreGraphics] Fix CGFunction to work after being disposed. (#4644)
We have a test for CGFunction, and in iOS 12 the behavior changed where
previously the CGFunction was invoked immediately when rendering, it's now
retained and only called later.

This is troublesome for the test, because it disposes the managed CGFunction
when it thinks it's completed. Since the function is invoked way later, the
test now crashes. Ops.

The obvious fix is to change the test to dispose the CGFunction later. This
falls flat when finding out that "later" is undetermined. Native code retains
the CGFunction, and can do whatever it wishes with it until it's released, and
there's no way to know when that is.

OK: what about not disposing the CGFunction, and letting the GC do its job?
This also falls flat, because there's a circular reference between the native
CGFunction and the managed wrapper, preventing any of them from being released
automatically by the GC. The only way to break the circular reference is to
dispose the managed wrapper.

So, can we fix the circular reference? Unfortunately not, because we can't
monitor the native CGFunction's retain count, which is required in order to
switch the native->managed link between weak and strong according to the
retain count.

This leaves one solution (that I could come up with at least): make sure
everything works fine after disposing the managed wrapper.

This involves a few things:

* Only break the native->managed connection (the 'gch' GCHandle) when the
  native CGFunction is freed. This is accomplished by using the API provided
  by Apple for exactly that purpose (the 'release' callback field in the
  'CGFunctionCallbacks' struct).

* Use a static variable for the 'CGFunctionCallback' struct and its contents.
  This solves another potential problem: the GC could have collected the
  delegate to the 'EvaluateCallback' function at any point.

* Don't null out the 'evaluate' delegate in Dispose. This leaves the user with
  no way to break a potential circular reference through that delegate (since
  it will never be null), so provide a property that makes it possible for
  users to explicitly null out the delegate ('EvaluateFunction').

* Only call the 'evaluate' callback if it's not null.

This also has the additional advantage that test (and any customer code
running into the same issue) works without modifications.
2018-08-20 07:40:54 +02:00
Rolf Bjarne Kvinge 8ff0dccad0
Try to fix random make failure in src/ by not using pattern rules. (#4639)
Randomly make 3.81 says this:

    error CS0006: Metadata file 'build/ios/reference/MonoTouch.Dialog-1.dll' could not be found

The makefile seems fine, and it also doesn't happen when using make 4.21, so
this looks like a make bug.

So rewrite the troublesome rule to not be a pattern rule, and cross some fingers.
2018-08-18 00:44:36 +02:00
Sebastien Pouliot b5ef7b134b
Merge branch 'xcode10' into xcode10-rebase-15.8 2018-08-17 14:53:03 -04:00
Vincent Dondain c5169120bf
[msbuild] Update 'metal' binary path for Xcode 10 (#4601)
- Fixes #4576: [xcode10] 'Metal Game' fails to build. (https://github.com/xamarin/xamarin-macios/issues/4576)

In Xcode 10 Apple moved the "metal" binary from `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/bin/metal` to `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal`.
2018-08-17 10:24:02 -04:00
Rolf Bjarne Kvinge 4d30955c7a [tests] Remove some 32-bit XM tests.
32-bit macOS is dying, and keeping these tests running is not worth the effort.
2018-08-17 12:49:41 +02:00