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

8148 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot dfc7f6267e
[appkit] Remove 32bits code paths from NSGradient (#8478) 2020-04-30 08:10:30 -04:00
Rolf Bjarne Kvinge d601ad5bdf
Use a GCHandle instead of WeakReference in our IntPtr->NSObject table. (#8473)
A WeakReference contains a GCHandle and provides additional services on top,
but we don't need those services, so we can just use a GCHandle instead.

This should decrease memory usage somewhat, since we won't have the
WeakReference objects around.

This also prepares us for switching the native API to use GCHandle instead of
passing MonoObject* to managed code (we won't have to re-create a GCHandle
inside a WeakReference when passed a GCHandle for a managed object).
2020-04-30 09:43:32 +02:00
Cosmin Stirbu f4f89ece0a
[corelocation] Added missing nullability attributes to CoreLocation (#8471) 2020-04-29 13:47:13 -04:00
Manuel de la Pena baf361309d
[Master][Mono] Bup mono to 075c3f0 (#8469)
Bump mono to the head of 2020. Match android.
Commits:

  * mono/mono@075c3f0619: Fix if already send error to http client, do not callback. (#19668)
  * mono/mono@35cc82cc6c: [2020-02] [debugger] Remove assert when the DebuggerTypeProxy cannot be instantiated (#19632)
  * mono/mono@00ae178a04: Bump corefx (#19656)
  * mono/mono@c23ad4f5b3: [2020-02] Bump msbuild to track mono-2019-12 (#19623)
  * mono/mono@83558de96b: [System.Runtime.Serialization] Work around `specified cast is not valid` error (#19640)

Full diff: 051408e0be...075c3f0619
Related android PR: https://github.com/xamarin/xamarin-android/pull/4630
2020-04-29 12:33:22 -04:00
Rolf Bjarne Kvinge 7e18b592ca
[master] [devops] Use a more restricted glob to find directories with sample data in. Fixes xamarin/maccore#2202. (#8466)
The previous pattern would match the output files we created from processing
these directories, and somehow the pattern would match such a file (even
though the pattern should only be executed before doing any processing, when
those files don't exist yet, so I don't know exactly why this is happening),
leading us to try to process those files as if they were directories with
sample data in, with the predictable (disastrous) result.

Fixes https://github.com/xamarin/maccore/issues/2202.
2020-04-29 17:34:31 +02:00
Whitney Schmidt ecf295f4db
[ImageIO] Update bindings for Xcode11 (#8376)
* initial imagio bindings + test project

* remove sample files, update xtro

* clean up

* add new line at eof

* even more cleanup...

* update based on PR feedback

* reformat according to coding standards

* fix all feedback except monotouch tests

* add monotouch-test files

* fix test feedback

* fix PR feedback

* fix timeout in tests, add asserts for status, update return value for APi to CGImageAnimationStatus enum

* fix == asserts

* respond to more pr feedback

* add StrongDictionary, remove Partial

* NSNumber -> nuint for NSUInteger

* add smaller gif

* remove hack.gif from project

* add gif to csproj
2020-04-28 17:02:36 -04:00
Rolf Bjarne Kvinge 95d71c8ee1
[msbuild] Unify most of the DetectSdkLocations task between Xamarin.Mac and Xamarin.iOS. (#8462)
New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@45c5a68 [Xamarin.MacDev] Add interfaces to bridge Xamarin.iOS- and Xamarin.Mac-specific classes. (#72)

Diff: a0a11aff27..45c5a680e2
2020-04-28 14:55:35 +02:00
Rolf Bjarne Kvinge d73c21d43e
[mmp] Don't re-compute (possibly incorrectly) the system framework directories to find assemblies in. (#8454) 2020-04-27 08:34:37 +02:00
Rolf Bjarne Kvinge e631a55787
[mtouch] Fix typo in simlauncher.mm. (#8455) 2020-04-27 08:34:24 +02:00
Rolf Bjarne Kvinge 81f019a59e
[jenkins] Provide a login keychain password when installing provisioning profiles. (#8456)
This seems to fix an issue where the login keychain would somehow end up
locked, which would break provisioning.
2020-04-27 08:32:36 +02:00
Manuel de la Pena 71a25ecd0c
[Bump Mono] Bump mono to the latest of 2020-02. (#8451)
Commits:

  * mono/mono@051408e0be: Bump CoreFX to pickup https://github.com/mono/corefx/pull/398. (#19566)

Full diff: 58b04da0d7...051408e0be

Bump and match android: https://github.com/xamarin/xamarin-android/pull/4608
2020-04-24 19:10:00 -04:00
Manuel de la Pena 3655da2a17
[Bump VMac] Bump max version of VSMac to current 8.6. (#8450)
Bump the vmac version to simplify dogfooding.
2020-04-23 13:48:22 -04:00
Manuel de la Pena 40761ccb36
[Devops] If we fail to provision dependencies skip certain tasks. (#8423)
xamarin-storage can not be reachable or a network issue might happen
when we try to provision the dependencies. In that case, skip those
tasks that are skipped when we cannot provision the certs.

The provisioning dependencies will only execute in the provisioning
profiles was successful, therefore, the if statement is not stepping in
any value that was set by the profiles step.
2020-04-23 10:10:34 -04:00
yaliashkevich 05d9520b2c
Avoid ObjCRuntime. Runtime.GetDelegateForBlock race condition. (#8433)
* Initialize block_to_delegate_cache once.

* Lazy initialization of block_to_delegate_cache.

* Use lock_obj while accessing block_to_delegate_cache.

Co-authored-by: Yauheni Aliashkevich <Yauheni_Aliashkevich@epam.com>
2020-04-23 12:34:35 +02:00
Rolf Bjarne Kvinge aa45a2d6e7
[jenkins] State all the time where we're working on. (#8447)
It's annoying to have to track it down all the time when something goes wrong.
2020-04-23 10:10:50 +02:00
Sebastien Pouliot 5eb593f4ba
[generator] Avoid repetitive calls to GetSafeParamName (#8443)
as it can allocate memory (create string) in some cases
also a few other left over pieces from nullability work
2020-04-22 09:23:15 -04:00
Sebastien Pouliot a9721e08cf
[generator] Remove generated, 32bits specific code paths for XM (#8444)
Product now only supports 64bits but the generator was still
producing some dual 32/64 code.

```
    Assembly    |    Profile    |   Before   |    After   |   Diff  |  %
----------------|---------------|------------|------------|---------|------
Xamarin.Mac.dll | full 64bits   | 22 348 800 | 22 082 560 | 266 240 | 1.2%
Xamarin.Mac.dll | mobile 64bits | 22 352 384 | 22 085 632 | 266 752 | 1.2%
```

Fix https://github.com/xamarin/xamarin-macios/issues/8441
2020-04-22 09:10:31 -04:00
Rolf Bjarne Kvinge 936ec3c3fc
[jenkins] Fix error reporting for the 'Generate Workspace Info' stage. (#8442)
* Set the 'currentStage' variable upon entry so that reporting reports any
  problems in the correct stage.
* Rewrite the 'getRedirect()' exception message to not use an undefined
  variable (content).
2020-04-22 08:49:04 +02:00
Rolf Bjarne Kvinge 697f36e313
[NSObject] Remove dead XAMCORE_2_0 and ARCH_64 code/defines. (#8440) 2020-04-21 17:06:46 +02:00
Manuel de la Pena 337f3efac4
[Devops] Add timeouts to the steps. (#8436)
Add timeouts to the steps to catch possible issues when a step takes
longer than expected. Numbers have been taken from common runs and
rounded up a little to have some buffer.
2020-04-20 19:06:02 -04:00
Chris Hamons b93e97fe92
[AVFoundation] AVPlayerItemMetadataCollector is now 10.12+ (#8435)
- Runs on older macOS show the type is not as documented, nm confirms.
	1) ApiCtorInitTest.DefaultCtorAllowed (Introspection.MacApiCtorInitTest.ApiCtorInitTest.DefaultCtorAllowed)
		1 potential errors found in 1143 default ctor validated:
		Default constructor not allowed for AVFoundation.AVPlayerItemMetadataCollector : Could not create an native instance of the type 'AVFoundation.AVPlayerItemMetadataCollector': the native class hasn't been loaded.
2020-04-20 10:26:20 -05:00
Rolf Bjarne Kvinge 5038f4a801
[tests] Remove the mcs variation of tests that run with both mcs and csc. (#8418)
There's no need to test mcs code anymore.
2020-04-20 15:56:24 +02:00
Rolf Bjarne Kvinge 8cf388273b [tests] Fix the Xamarin.MTouch.OnlyDebugFileChange test to work with csc instead of mcs. 2020-04-20 11:04:26 +02:00
Rolf Bjarne Kvinge a72999c732 [tests] Remove mcs assert which isn't needed anymore. 2020-04-20 10:36:31 +02:00
Rolf Bjarne Kvinge cb234697f5
[msbuild] Remove the net461 version of the msbuild task assemblies. (#8419)
The netstandard2.0 version has been the default for a few weeks now, and no
problems have been found, so just delete the net461 version.

This speeds up testing a bit, since we won't be testing the net461 version
anymore.
2020-04-20 09:59:22 +02:00
Rolf Bjarne Kvinge 9dd1231e50
[Foundation] Add an overload to NSString.FromHandle that takes an 'owns' parameter. (#8417)
This matches our API elsewhere.
2020-04-20 09:48:29 +02:00
Manuel de la Pena 39629ab93b
[Harness] Remove old files that are not longer used. (#8424)
The bcltest dir should only have the .ignore files, the code generator
creates all the different projects and those files were left behind when
they should have been removed.

* The info.plist is needed. This was added to issue: https://github.com/xamarin/xamarin-macios/issues/8426
2020-04-18 12:33:34 -04:00
Manuel de la Pena 7a2573a99b
[Harness] Move all common code to the shared lib. (#8389)
Moved all the code that can be shared with the CLI to the common
library. We neede some small changes, but mainly due to namespaces and a
forgotten interface implemenation (was already implemented, was missing
in the class).

This was fun :)
2020-04-17 18:14:55 -04:00
Sebastien Pouliot c8a8fb3156
[mtouch] Always enable experimental-xforms-product-type (#8425)
Not an experiment anymore - it works as expected.

This half-remove the optimization option (it must remain there to avoid
breaking all projects that have it defined) but it will always be `true`
so `Xamarin.Forms.Platform.iOS.dll` will **always** be considered as SDK
code by the linker.

Fix https://github.com/xamarin/xamarin-macios/issues/8407
2020-04-17 17:18:20 -04:00
Chris Hamons c0b8036d3b
[mac][mapkit] Allow creation of MKLocalSearchCompleter instance (#8370)
- Fix https://github.com/xamarin/xamarin-macios/issues/8274
- Turns out that MKLocalSearchCompleter can be instanced, even on iOS
	- Tested on sim and in docs
- MKLocalSearchCompletion is still not instanced, updating comment
2020-04-17 12:48:36 -05:00
Chris Hamons e2a73610a7
Add missing ctors to AVPlayerItemMetadataCollector and SKCloudServiceController (#8403)
- https://github.com/xamarin/xamarin-macios/issues/8398
- They were incorrectly marked DisableDefaultCtor in an attempt to fix API breaks
- Manual tests/documentation shows that the default init works
2020-04-17 12:42:08 -05:00
Chris Hamons a066315030
[appkit] Fix smartInsertForString to use nullable out strings (#8365)
- Fixes https://github.com/xamarin/xamarin-macios/issues/8349
2020-04-17 12:38:51 -05:00
Manuel de la Pena cdee7bbeb6
[Tests] Remove flacky tests from AppKit. (#8422)
Remove the tests, they give problems in headless servers and in old
versions of Mac OS X.
2020-04-17 11:51:44 -04:00
Manuel de la Pena 644af3c80f
[Mono] Bump mono to the head of 2020-02 (#8414)
Bump mono to the head of 2020-02 and match with android.
Commits:

  * mono/mono@58b04da0d7: Bump CoreFX to pickup https://github.com/mono/corefx/pull/397. (#19548)
  * mono/mono@f51cb7ad85: [2020-02][debugger] Bump protocol for multi threaded single step implementation (#19437) (#19477)
  * mono/mono@62414d588b: [2020-02] Add BeginRead/BeginWrite/EndRead/EndWrite overloads back to SslStream (#19476)
  * mono/mono@259ec2ef65: [2020-02][debugger] Bump protocol for this commit https://github.com/mono/mono/pull/19248 (#19318) (#19473)

Diff : 165f4b0341...58b04da0d7
Android PR: https://github.com/xamarin/xamarin-android/pull/4568
2020-04-17 10:05:15 -04:00
Rolf Bjarne Kvinge da5c5a0ce6 [tests] Remove the mcs variation of tests that run with both mcs and csc.
There's no need to test mcs code anymore.
2020-04-17 13:52:28 +02:00
Rolf Bjarne Kvinge 1de5368593
[mtouch/mmp] Simplify namespace handling now that we don't support Classic anymore. (#8410)
Also consolidate and sort the list of namespaces.
2020-04-17 12:26:38 +02:00
Rolf Bjarne Kvinge 28eddda439
Extract the ApplePlatform and LinkMode enums into their own files. (#8411) 2020-04-17 09:45:18 +02:00
Sebastien Pouliot 2dbd247c53
[SystemConfiguration] Add 'IsWWAN' to XM to ease code sharing (#8413)
`IsWWAN` is not available (so it won't be returned) but it's nicer to
include it anyway to make the code better looking.

The example that triggered this was
0bbb51c548 (r409239375)
2020-04-16 21:09:00 -04:00
Sebastien Pouliot 8127c77b35
[foundation] Remove scary 'unsafe' from NSString API that are safe (#8412) 2020-04-16 21:07:26 -04:00
Manuel de la Pena e0b6ff480c
[Harness] Refactor TestProject to be moved to the common lib. (#8388)
Refactor TestProject so that we can move all the tasks to the common
assembly. We had to remove all the references from Harness, that
included the MonoNativeInfo.
2020-04-16 20:20:53 -04:00
Manuel de la Pena 430ce42e44
[Tests] Ignore failing tests in older versions of Mac OS X. (#8409)
Something must be different between the virtual screen created in a
headless system in older versions of Mac OS X and 10.15. Everything
works on 10.15 older versions throw an exception.

fixes: https://github.com/xamarin/xamarin-macios/issues/8408
2020-04-16 15:03:07 -04:00
Manuel de la Pena a6dcd40c8b
[Harness] Refactor RunDeviceTask. (#8386)
Move most/all of the logic to a helper class so that it later can be
used in the CLI.
2020-04-16 10:25:24 -04:00
Rolf Bjarne Kvinge 02481c1525
[mmp] Handle not being able to resolve an assembly gracefully. Fixes #8399. (#8406)
Fixes https://github.com/xamarin/xamarin-macios/issues/8399.
2020-04-16 16:24:57 +02:00
Rolf Bjarne Kvinge e4f8460277
[mmp/mtouch] Share more code. (#8394)
* Rearrange files in Xamarin.Mac a bit to ease code sharing between mmp and
  mtouch, by putting mono's static and dynamic libraries in
  /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Sdks/Xamarin.macOS.sdk
  to match how Xamarin.iOS does it.

* Don't use 'usr' as an intermediate directory. This removes another special
  case.

* Share many of the functions and properties that return specific directories,
  and document (as comments) what each function/property is supposed to
  return.
2020-04-16 14:19:45 +02:00
Rolf Bjarne Kvinge 8feb3c29e6
[mtouch] Handle a failure to launch the native linker better by showing better error messages. (#8391)
* [mtouch] Handle a failure to launch the native linker better by showing better error messages.

dotnet will throw a Win32Exception if the command line is too long, so handle
that scenario. Also handle any other Win32Exceptions and show a better error
message.

* Make MT5217 an error to avoid multiple potentially confusing errors.
2020-04-16 14:18:43 +02:00
Rolf Bjarne Kvinge 151342ba23
[jenkins] Add a timeout to the final tasks as well. (#8390)
This makes it so that if something goes wrong when publishing results and it
ends up stuck, the job won't stay hung for days until we realize what's
happening.
2020-04-16 09:47:03 +02:00
Sebastien Pouliot 1a8f0e6811
[mmp] Fix PostLinkScanTypeReferenceStep from running two times (#8402)
This came with the merge from xcode11.4 into master. Thankfully there
were unit tests to caught it, because Eyeballs Mark I did not.

Fix https://github.com/xamarin/xamarin-macios/issues/8400
2020-04-15 20:33:29 -04:00
Manuel de la Pena a036e6e998
[AppKit] Ignore failing test on older OS X versions. (#8397)
The API should be present, yet we have an exception thrown when using
the selector. On 10.15 we do not have issues, so we skip in older
versions. Might be related to the fact that we use headless mac minis.

fixes: https://github.com/xamarin/xamarin-macios/issues/8395
2020-04-15 18:25:48 -04:00
Sebastien Pouliot 9f28bce6b8
[msbuild] Build bindings with the latest (stable) version of C# (#8387)
We now require C# 8 for nullability support. However we allow custom code
to be included inside binding projects and we should not support anything
(stable) that the C# compiler (installed separately) allow, so `latest`
it is.
2020-04-15 15:41:32 -04:00
Rolf Bjarne Kvinge e6f64d7b38
[tests] Add script to launch manual sample test run for the current commit. (#8381) 2020-04-15 08:01:59 +02:00