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

4267 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 256a3f57f1
[docs] Document recent changes to ModelAttribute in the generator. (#3900) 2018-04-09 19:32:45 +02:00
Sebastien Pouliot 17d278e998
Bump mono to head of 2017-12 (#3895)
* Bump mono to head of 2017-12

Commit list for mono/mono:

* mono/mono@b4e428d7c4 [sdks] Use wget in place of curl, it's installed by default on Linux (#8060)
* mono/mono@1cb70ef771 [SDKS] fix Linux (and possibly other OSes) build for Android (#8045)
* mono/mono@00f930c13d [SDKS] Fix Android SDK build on Linux (#8022)
* mono/mono@911b32aef0 [runtime] Fix --disable-btls. (#8001)
* mono/mono@82306753f9 [sdks] Fix MXE_PREFIX for XA (#8011)
* mono/mono@edabe88417 [sdb] Add reference counting for single step requests, they can be accessed concurrently by the single step processing code and the event request clearing code. Fixes #7137. (#7973)
* mono/mono@12304ec458 [2017-12] [Facades] Add System.Memory facade to mobile profiles (#7969)
* mono/mono@9340ebefcd [2017-12] Disable building btls/ and support/ on the bcl build, they are not needed. (#7959)
* mono/mono@32031273ec [2017-12] [sdks] Add provisioning for Android SDK and NDK (#7980)
* mono/mono@083c130d4a [System] Disable SocketTest.AcceptBlockingStatus (#7976)
* mono/mono@b149c23832 [ppc] use ucontext_t
* mono/mono@8aa3f6182f [runtime] Add regression test for nested famility visibility.
* mono/mono@db135e42db [runtime] Fix class visibility check for protected nested classes. Fixes #7657.
* mono/mono@de7bff2994 [sdks] Fix LLVM build for XA (#7918)
* mono/mono@28f285b972 [2017-12] [sdks] Fix LLVM build on Linux for XA + Fix MXE usage on non-Darwin platforms (#7911)
* mono/mono@9b8ba28bac Bump API snapshot submodule
* mono/mono@3c76d261e1 Hide new API which didn't make it to stable on time for dev15.7
* mono/mono@b932a792d8 Bump corefx
* mono/mono@34c3d019ed [sdks] Fix usage of MXE for XA (#7899)
* mono/mono@6c4c039c9b [jit] Add signature checking for CALLI. (#7881)
* mono/mono@4de0fb710b [2017-12] [sdks] Pass LLVM_SRC from XA to use `xamarin-android/external/llvm` + Pass IGNORE_PACKAGE_MXE from XA + Only checkout specific MXE and LLVM commit when cloning (#7896)
* mono/mono@c45f358856 [sdks] Pass MXE_SRC from XA to use `xamarin-android/external/mxe` (#7889)

Diff: bf27e25446...b4e428d7c4

* Add new System.Memory facade (included in the bump) to the mobile profile
2018-04-09 08:16:03 -04:00
Vincent Dondain 7edc4d24f4
[mtouch-errors] Update MT1108 DeveloperDiskImage.dmg full path (#3891)
Path changed and it has /Platforms now. Also added /Applications at the beginning.
2018-04-08 16:03:36 -04:00
Alex Soto 318f583280
[generator] Fixes WrapAttribute usage with interface protocols (#3885)
* [generator] Fixes WrapAttribute usage with interface protocols

Fixes xamarin/xamarin-macios#3869

We need to support the scenario where `WrapAttribute` is used
to wrap an interface protocol type declaration like:

```csharp

	[Wrap ("WeakDelegate")]
	[NullAllowed]
	ICLSDataStoreDelegate Delegate { get; set; }

	[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
	NSObject WeakDelegate { get; set; }

```

We generated invalid code for the setter that needed an explicit cast
and ended up with a CS0266 compiler error:

Bad generated code:

```csharp

[CompilerGenerated]
public ICLSDataStoreDelegate Delegate {
	get {
		return WeakDelegate as ICLSDataStoreDelegate;
	}
	set {
		WeakDelegate = value;
	}
}

```

Good generated code:

```csharp

[CompilerGenerated]
public ICLSDataStoreDelegate Delegate {
	get {
		return WeakDelegate as ICLSDataStoreDelegate;
	}
	set {
		var rvalue = value as NSObject;
		if (value != null && rvalue == null)
			throw new ArgumentException ("The object passed of type " + value.GetType () + " does not derive from NSObject");
		WeakDelegate = rvalue;
	}
}

```
2018-04-06 12:42:14 -05:00
Rolf Bjarne Kvinge cbed456d31
[generator] Register models with unique names to not match platform types. Fixes #3875. (#3879)
* Move Registrar.SanitizeName to StringUtils.SanitizeObjectiveCName.

* [generator] Register models with unique names to not match platform types. Fixes #3875.

* [NSObject] Don't compare against a non-existent protocol.

* [generator] Make it possible to register models like before if the binding developer wishes it.

* [src] Make sure to not declare ObjC classes Apple already defines.

Fixes these warnings at startup:

    Class DOMNodeFilter is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944a788) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9958). One of the two will be used. Which one is undefined.
    Class WebOpenPanelResultListener is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944e4c8) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9a98). One of the two will be used. Which one is undefined.
    Class WebPolicyDecisionListener is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944e838) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9ae8). One of the two will be used. Which one is undefined.
    Class MTLCaptureScope is implemented in both /System/Library/Frameworks/Metal.framework/Versions/A/Metal (0x7fffa806f1d0) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8aa858). One of the two will be used. Which one is undefined.
    Class JSExport is implemented in both /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore (0x7fffa7eb4f60) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8aaa38). One of the two will be used. Which one is undefined.
2018-04-06 17:24:07 +02:00
Alex Soto e19336b98f
[BusinessChat] Make mtouch and mmp aware of BusinessChat framework (#3882) 2018-04-05 15:12:28 -05:00
Manuel de la Pena 51f16d962b
[MTouch] Fix small typo. Fixes #3790 (#3867) 2018-04-05 10:53:20 +02:00
Vincent Dondain 31381f0fb5
[arkit] Add missing ARHitTestResultType binding (#3872)
- Fixes #3870: Missing ARHitTestResultType.EstimatedVerticalPlane binding for ARKit 1.5
(https://github.com/xamarin/xamarin-macios/issues/3870)
2018-04-04 16:43:15 -04:00
Rolf Bjarne Kvinge fbab477b7b
[tools] Create stamp file after doing things that might modify files we care about. (#3864)
We have consistency checks to verify that no unexpected files are modified
done when comparing APIs in for a pull request.

Unfortunately the check didn't take into account that checking out the
revision to do the API check against might modify some of the files in the
consistency check itself, thus triggering the consistency check.

Fix this by only verify timestamps of files modified after checkout out the
revision, which is the only thing we care about anyway.

For examples see PR #3855 or PR #3850.
2018-04-04 15:36:49 +02:00
Rolf Bjarne Kvinge d267a508d5
[jenkins] Don't succeed if something went wrong when creating API or generator diff. (#3865)
Ref: https://github.com/xamarin/xamarin-macios/pull/3855#issuecomment-378441993
2018-04-04 15:36:30 +02:00
Sebastien Pouliot 303b2f516e
Merge pull request #3855 from spouliot/xcode93-post-merge-fix
API diff update (from stables) and xtro cleanup (unneeded files)
2018-04-04 08:57:35 -04:00
Sebastien Pouliot beb680c3cb [apidiff] Update XML references
* XI 11.9 (stable) comes from `xcode9.3`
* XM 4.2.1 (stable) comes from `d15-6`
2018-04-03 18:05:46 -04:00
Sebastien Pouliot e628c5cef9 [xtro] Remove extra .todo files. Those are not tracked and should not have been inside xcode9.3 branch 2018-04-03 18:03:34 -04:00
Sebastien Pouliot 2db1b230a5 [xtro] Remove empty files. It was a mistake to have them in xcode9.3 branch 2018-04-03 18:02:36 -04:00
Vincent Dondain 9d6147e473
Merge pull request #3850 from VincentDondain/master-merge-xcode9.3
Merge xcode9.3 into master
2018-04-03 17:49:13 -04:00
Filip Navara 4176ca56b1 Fix default values for touchbar APIs in NSTextViewDelegate. (#3843) 2018-04-03 16:20:52 -05:00
Manuel de la Pena 5439c4ff99 [Foundation] Ensure we do raise 401 on NTLM when no creds are present. Fixes #3742 (#3794)
The code was not executing the completionHandler in those case were the
user did not provide the creds. We should try to get the creds and use
them or call the cb with the proposed creds.

* After a review, make the code cleaner. Use NSURLSessionAuthChallengePerformDefaultHandling in the cases we do not have a credential. Reduce the number of exit points in the method.
2018-04-03 17:07:56 -04:00
Vincent Dondain 2a84c116db Merge branch 'xcode9.3' 2018-04-03 14:14:07 -04:00
Zoltan Varga 1dee418501 Revert "[builds] Switch the bcl build to the mono SDK makefile. (#3842)" (#3847)
This reverts commit a8f6bd90f9.
2018-04-03 09:14:11 +02:00
Zoltan Varga a8f6bd90f9
[builds] Switch the bcl build to the mono SDK makefile. (#3842)
* [builds] Switch the bcl build to the mono SDK makefile.

* Be quiet
2018-04-02 23:14:25 -04:00
Rolf Bjarne Kvinge 9d2a886f86
[jenkins] Create comment file for PR builds. (#3799)
* [jenkins] Create comment file for PR builds.
2018-04-02 14:49:03 +02:00
Sebastien Pouliot f62de4722b
Bump Xcode 9.3 to the final/released version (#3833)
* [tests] Tweak tests as NKIssue/NKAssetDownload now respond to NS[Secure]Coding without any mention in header files
2018-03-29 17:58:55 -04:00
Sebastien Pouliot b09c04352d
[mtouch] Use full path to mono-symbolicate instead of UseShellExecute (#3825)
Fix https://github.com/xamarin/xamarin-macios/issues/3653 differently as
`UseShellExecute` cannot be used when redirecting output so the original
fix [1] caused an exception which affected it from both macOS and windows
(thru XMA) instead of being an issue only with the later.

It's not clear how the original [1] fix was validated successfully, it's
possible than an older version of mono did not throw (since that
limitation seems windows specific).

[1] https://github.com/xamarin/xamarin-macios/pull/3781
2018-03-29 17:30:29 -04:00
Sebastien Pouliot b8287d0b33
Bump mono to head of 2017-12 (#3828)
Commit list for mono/mono:

* mono/mono@bf27e25446 Remove suspicious mono_gchandle_free
* mono/mono@4e276971c0 Fix the ios sdk build. (#7823)
* mono/mono@1075824929 Fix Android build for toolchain (#7819)
* mono/mono@2dbce94d6f Disable the interpreter on ios device builds. (#7796)
* mono/mono@1f09e9af88 Fix Android build for mxe (#7783)
* mono/mono@847a2de1d0 Fix Android build on Linux (#7776)
* mono/mono@beb137dd79 Fix Android build (#7770)
* mono/mono@d95eaa61b1 Revert "Disable a flaky test."
* mono/mono@f3a6da6d94 Bump corefx to bring a fix for #7696
* mono/mono@264e0d4bb2 Disable a flaky test.
* mono/mono@2eba668040 Fix partially shared constrained calls in llvmonly mode.
* mono/mono@607e20ee6c Avoid aot-ing the bcl libs twice in make fullaotcheck/llvmonlycheck.

Diff: 47631c34a7...bf27e25446
2018-03-29 17:29:45 -04:00
Vincent Dondain e297e99378
[msbuild] Skip reference assemblies passed to mtouch (#3791)
- Fixes issue #3199: Could not AOT the assembly System.Runtime.CompilerServices.Unsafe.dll (MT3001)
  (https://github.com/xamarin/xamarin-macios/issues/3199)
- Test case: https://www.dropbox.com/s/kxt3isgzn74nq35/Issue3199.zip?dl=0

### Problem

Given a Nuget Package added via the "package reference" mechanism and the said package having netstandard 'lib' **and** 'ref' folders;
MTouch was getting reference assemblies and was trying to AOT them. This resulted in an error as those assemblies are only facades.

### Solution

'ResolveNuGetPackageAssets' computes the NuGet packages using their json asset file, adds the full assemblies to 'ReferenceCopyLocalPaths' and outputs the resolved references via '_ReferencesFromNuGetPackages'.

This is exactly what "Microsoft.NuGet.Build.Tasks"'s 'ResolveNuGetPackageAssets' target does.
2018-03-27 22:39:02 -04:00
Chris Hamons 1d72f45dfd
Binding project must use csc not mcs (#3795)
- Fix XM and XI binding projects to use csc instead of mcs
- Add BindingProjectTest to verify csc not mcs for XM
- In non-msbuild use cases, removing -sdk params requires adding System/mscorlib so btouch now knows to add those references.
- Obsolete a few arguments to btouch
2018-03-27 14:31:27 -05:00
Sebastien Pouliot bc5df7c4ed
Merge pull request #3816 from spouliot/xcode93-merge-sr3
Merge d15-6 SR3 into xcode9.3
2018-03-26 17:48:22 -04:00
Sebastien Pouliot dda3ef4b5d Merge branch 'd15-6' into xcode93-merge-sr3 2018-03-26 14:28:12 -04:00
Manuel de la Pena e10ae0d323
[Mtouch] Pass ShellExceute true in CopyMSymData. Fixes 3653 (#3781) 2018-03-23 16:59:30 +01:00
Rolf Bjarne Kvinge 7d9d2965be [tests] Convert the rest of the registrar tests to new style test syntax. (#3802)
The tests should be identical, except for the MT4134 test, which I've updated
to use Xcode 8.3 (and iOS 10.3) instead of Xcode 6 (and iOS 8.0). It also
needed a few other improvements to not run into other errors before the MT4134
error the test is trying to test.
2018-03-23 09:35:31 -04:00
Rolf Bjarne Kvinge 4a0fd52fff Revert "Put a binary copy of mlaunch in macios-binaries instead of in Azure. Fixes #3316. (#3800)" (#3805)
This reverts commit e6c45c2489.

It breaks the mlaunch build.
2018-03-22 21:27:19 -04:00
Zoltan Varga 864091d337
Switch the mono device/simulator/cross compiler builds to the mono SDK makefile. (#3640)
* Switch the mono	device/simulator/cross compiler	builds to the mono SDK makefile.

* Build	   these by recursing into     external/mono/sdks/builds and calling the targets there.
* Add a	   few extra rules    to build dependencies like llvm	 and mono's configure to avoid
  these	   being build in parallel     by the SDK makefile.
* Copy config.h/eglib-config.h into builds/install so the build	in runtime/ doesn't have
  to add the builddirs to its includes.

* [builds] Fix install-llvm32 target, make command quiet.

* [builds] Link the libraries in runtime/ against the installed libmono, so there is no need to run install_name_tool on them.

* [builds] Fix up the rpath correctly for libmono-profiler-log.dylib.

* [builds] Update to the new ios sdk targets (-release suffix).

* Bump mono.

* Bump mono.

* [[builds] Update to the new ios sdk targets (-release suffix).
2018-03-22 21:25:00 -04:00
Rolf Bjarne Kvinge 0d29ca93c3
[mtouch] Ignore 'objc-missing-super-calls' warnings from clang when compiling registrar code. Fixes bugzilla #60624. (#3801)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=60624.
2018-03-22 18:34:41 +01:00
Rolf Bjarne Kvinge e6c45c2489
Put a binary copy of mlaunch in macios-binaries instead of in Azure. Fixes #3316. (#3800)
* Put a binary copy of mlaunch in macios-binaries instead of in Azure. Fixes #3316.

If the Xamarin build is enabled, then build mlaunch from source, otherwise get it from macios-binaries.

Fixes #3316.

* Bump macios-binaries.

Commit list for xamarin/macios-binaries:

* xamarin/macios-binaries@69a9088 Bump mlaunch to xamarin/maccore@4505cd6f02 (#8)

Diff: e1e8bdf7a8...69a90882a0
2018-03-22 18:26:07 +01:00
Chris Hamons 371a1d54e7
[macos] Fix XM binding projects to work with Full
* Revert previous revert (9ba23946d1) 
* Correctly fall back to Modern if tagless binding projects
* Rework binding tests to cover all supported configurations
* Add XM_FORCE_MSBUILD env variable for mmp/msbuild mac tests for easy local checking
2018-03-21 14:27:53 -05:00
Alex Soto 15d5047a4b
[Appkit] Adds NullAllowed to NSTableCellView.ObjectValue (#3793)
Fixes xamarin/xamarin-macios#3792

`null` is allowed in `NSTableCellView.ObjectValue` property according to header definition:

```
@property (nullable, strong) id objectValue;
```
2018-03-21 07:28:18 -06:00
Jeffrey Stedfast 8690c7f44a [msbuild] Correctly determine whenther Xamarin.Mac builds require a provisioning profile (#3710) (#3733)
Fixes issue #3674

The problem is that the Xamarin.Mac targets did not set the
RequireProvisioningProfile property on the DetectSigningIdentity
task which meant that it defaulted to 'false'.

When that property is 'false', the DetectSigningIdentity logic
would shortcut to not doing a provisioning profile lookup.

This was therefor causing the build to not use a provisioning
profile which caused the build to improperly codesign the app
bundle.
2018-03-20 16:12:27 -05:00
Chris Hamons ab7ba02fe7
Move MM2100 to a 2109 as mtouch collided with it (#3773) 2018-03-20 09:28:06 -05:00
Chris Hamons a73b200f59
[mmp][mtouch] Better guard framework SDK checks (#3757)
- https://github.com/xamarin/xamarin-macios/issues/3725
- These frameworks "CoreAudioKit Metal MetalKit MetalPerformanceShaders CoreNFC DeviceCheck"
 were special cased, but that special case did do an SDK check.
- Create a helper method to share check
- Add test for MM0135
2018-03-20 09:26:25 -05:00
Alex Soto a45b3aa2fd
[GameplayKit] Fix naming of GKNoise.DisplaceX (#3780)
Fixes xamarin/xamarin-macios#3716

GKNoise.DisplaceX suggests that displacement can only be done
along one axis which is not true, according to documentation
you use the 3 (x, y, x) noise objects.

The following API suggestions where considered:

GKNoise.Displace (xDisplacementNoise, yDisplacementNoise, zDisplacementNoise)
GKNoise.DisplaceWithNoises (x, y, z)

And I think just using `Displace` as the method name and let each
of the parameters clearly state their intent is best.
2018-03-19 21:34:08 -06:00
Alex Soto c5085d6c5b
[AppKit] Adds [NullAllowed] to NSGridCell.ContentView (#3779)
Fixes xamarin/xamarin-macios#3777

The Objective-C definition is:

```
@property (strong,nullable) __kindof NSView *contentView;
```
2018-03-19 20:16:05 -06:00
Alex Soto 80113b7ff3
[AppKit] Adds [NullAllowed] to NSTableView.RegisterNib (#3778)
Fixes xamarin/xamarin-macios#3776
2018-03-19 18:38:05 -06:00
Rolf Bjarne Kvinge c8e3b94f06
[msbuild] Fix detecting already signed executables. (#3743)
The MSBuild tasks will codesign an executable if the executable's timestamp is
later than `_CodeSignature/CodeResources`'s timestamp (or if
`_CodeSignature/CodeResources` doesn't exist).

Unfortunately, the codesign executable modifies both of those files, and the
executable last. This means that even just after running codesign, the
executable's timestamp might be later than `_CodeSignature/CodeResources`'s
timestamp (due to HFS+'s one-second timestamp resolution, this might happen
all within the same second, which means that this is a random issue: the
problem only occurs if the executable was modified at least a second later
than `_CodeSignature/CodeResources`.)

So make sure to touch `_CodeSignature/CodeResources` after running codesign,
so that the next time a build occurs (with no modifications), we don't resign
needlessly.

Fixes this (random) test failure when running the MSBuild tests:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.RebuildExecutable_NoModifications
         #1: ../MySingleView/bin/iPhoneSimulator/Debug/MySingleView.app/MySingleView
      Expected: 2017-11-30 10:04:20.000
      But was:  2017-11-30 10:04:22.000

Fixes https://github.com/xamarin/maccore/issues/592.
2018-03-19 15:34:24 +01:00
Sebastien Pouliot dd01b347c2
[foundation] Remove duplicated code from UnmanagedMemoryStreamWithRef (#3769)
The base type, `UnmanagedMemoryStreamWithRef`, already handle the
reference to the `NSData` and the related `Dispose` logic
2018-03-19 08:51:10 -05:00
Rolf Bjarne Kvinge 7f46564727
[link sdk] Tweak test to work when running as an extension. (#3764)
Also improve corresponding asserts to show the actual/expected values.
2018-03-16 23:03:35 +01:00
Rolf Bjarne Kvinge 5272ede1b9
[generator/registrar] Add support for blocks in static protocol members. Fixes #41226. (#3763)
Add support for blocks in static protocol members by adding another field to
the [ProtocolMember] attribute that specifies the block proxy type.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=41226.
2018-03-16 23:01:56 +01:00
Alex Soto da6db5f660
[monotouch-tests] Adds mono's WeakAttribute tests (#3739) (#3760)
* [monotouch-tests] Adds mono's WeakAttribute tests

* Embrace watchOS

Unfortunately this revealed that WeakAttribute is not working for watchOS

* Port mono's WeakAttribute test to our test runner

Test Ported:
5bdaef7e5f/mono/tests/weak-fields.cs

* Fix object leaks and implement suggested approach from 4b9ade0c59

* Remove debug spew and fix formating on header
2018-03-16 08:22:05 -06:00
Chris Hamons 09c162dc23
Reorganize MMP tests (#3759)
* Move tests out of MMPTests meta-class that were split into other files already
* Move smoke tests out of MMPTest.cs
* Reorganize MMP registrar tests
* Move assembly references tests out
2018-03-16 08:53:53 -05:00
Manuel de la Pena cf3648e33f
[Foundation] Ensure that we retain the needed data in the NSUrlSessionHandler (#3731)
* Do not release the NSData because buffers are reused between requests.
* Remove unneeded dipose override.
2018-03-16 10:51:40 +01:00
Sebastien Pouliot 9c58c4513a
[jenkins] Clean keystore on bots before running tests (#3754)
Because if invalid data gets into the store then some unit tests
will always fail on that particular bot.

Fix https://github.com/xamarin/maccore/issues/640
2018-03-15 12:25:53 -05:00