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

8220 Коммитов

Автор SHA1 Сообщение Дата
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
Manuel de la Pena 969d5d92ed
[Harness] Generalize the RunTestTask to allow it to be used in the CLI. (#8380)
Move all the logic outside and use it as a Composition pattern, later
this class can be used in the CLI so that we share the logic of building
and tested.
2020-04-14 18:39:58 -04:00
Sebastien Pouliot af7da4b233
[generator] Handle (ignore) C#8 special nullability attributes (#8382)
C# 8 nullability attributes are special (injected into assemblies) and
not meant to be used from C# source code.

We do not **use** them (we generated them) so existing attributes can
be ignored (filtered) by the generator.

Fix https://github.com/xamarin/xamarin-macios/issues/8347
2020-04-14 15:25:00 -04:00
Manuel de la Pena bbffb308e8
[Harness] Donet doest not need to restore. (#8383)
Removed line due to a bad merge, re-add it.
2020-04-14 15:03:12 -04:00
Manuel de la Pena dbc89f01a4
[Harness] Create IBuildToolTask and use it in the RunTestTask. (#8375)
In order to de-couple the RunTestTask from Jenkins, create an interface
to be implemented, which is pass to use as a member (Composition
pattern). In order to do that, do not expose Jenkins as a property of
the interface because it is required just by the base constructor.

Moving the the use an interface meant a lot of small changes that
should have no real effect (the compiler should have caught any possible
issues).
2020-04-14 13:11:55 -04:00
Rolf Bjarne Kvinge 511124f4b1
[mmp] Explicitly resolve assemblies from the GAC / system mono. (#8377)
Cecil has a fall-back mode where it looks in the GAC / system mono for
assemblies when failing to find them elsewhere. This is not the expected
behavior when using Xamarin.Mac in the Full/XM mode, because then we should
only resolve to assemblies shipped with Xamarin.Mac.

Unfortunately doing so will break apps (our own tests break), so instead
change our resolution to be explicit about where we find assemblies, and if we
find assemblies in the GAC / system mono when we're not supposed to, then show
a warning.

Also add a fall-back mechanism, where we use the old logic instead, in case
the new logic is not 100% compatible with the old one.

This showed up when I tried to port mmp to dotnet, because then Cecil stopped
looking in the GAC / system mono for assemblies (Cecil has a special case when
running on Mono to look in Mono's GAC), and tests started failing.
2020-04-14 16:32:42 +02:00
Manuel de la Pena c150679630
[Harness] Refactor certain class names to simplify the extraction of the RunTestTask. (#8372)
The initial idea of the refactoring looked nice but as soon as we want
to get the RunTestTask out of jenkins, we have a number of naming
issues. Move the tools to not use the *Task postfix so that it is
cleaner and we can later extra the RunTestTask better.


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-04-14 08:04:35 -04:00
Manuel de la Pena 98d21d742c
[Harness] Ensure that the generator tests are set when we modify the sources. (#8371)
fixes: https://github.com/xamarin/xamarin-macios/issues/8363

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-04-14 07:58:24 -04:00
Rolf Bjarne Kvinge 794fd9983d
[mmp] Make the system mono location customizable. Fixes #7923. (#8369)
This also makes things a bit easier with regards to the .NET 5 work.

Fixes https://github.com/xamarin/xamarin-macios/issues/7923.
2020-04-14 09:09:55 +02:00
Manuel de la Pena 5e0131db27
[Harness] Fix HML report for NUnitTestTasks. (#8367)
PR https://github.com/xamarin/xamarin-macios/pull/8184 removed the
inheritance with TextWriter, therefore the `as` will return null and we
will not generate the Html report. In this particular case, we do not
need an ILog, we just use it to get a path to the correct location,
therefore, we can create the file using the full path and pass it to the
xslt.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8364
2020-04-13 13:51:48 -04:00
Chris Hamons 13fa3c96ab
Invert order of download table to be most recent first (#8362) 2020-04-13 11:33:46 -05:00
Manuel de la Pena 01d2b62097
[AppKit] Ignore test in earlier versions of Mac OS X. (#8357)
The api is present since Mac OS X 10.11 but we get an exception when
executing it in earlier versions of Mac OS X, it just works on 10.15.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8356
2020-04-13 12:21:06 -04:00
Rolf Bjarne Kvinge 00d39b9b6d
[tests] NugetRestore should only restore, not build. (#8360)
"msbuild /restore" will run nuget restore, then build. "msbuild /t:Restore"
will just run the Restore target, which should just restore.

This becomes significant when we later try to do "msbuild build", and expect
warnings to show up. If we previously built the project unintentionally, those
warnings won't show up because nothing will actually be built.
2020-04-13 17:44:17 +02:00
Rolf Bjarne Kvinge 3005f8fa0f
[AppKit] Fix typo hWord -> Word. (#8359) 2020-04-13 17:36:07 +02:00
Chris Hamons 035b376182
[README] Add macOS download package table (#8343)
- https://github.com/xamarin/xamarin-macios/issues/7462
2020-04-13 10:00:23 -05:00
Rolf Bjarne Kvinge 665b20a44c
[tests] Fix location of aot.cs in mmptest.csproj (#8361) 2020-04-13 16:08:15 +02:00
Rolf Bjarne Kvinge f3ee011797
[xharness] Automatically generate xharness make dependencies. (#8324) 2020-04-13 09:26:55 +02:00
Manuel de la Pena 7ac67e6e33
[AppKit] NSScreen properties can be executed in non-UI threads. (#8345)
Allow all the properties to be executed outside the UI thread. This has
been tests with Xcode using MTC.
2020-04-10 19:25:56 -04:00
Manuel de la Pena 382f2ad997
[Tests] Bump language used in the mac binding tests. (#8348)
* [Tests] Bump language used in the mac binding tests.

They broke with nullability, we need to use the latests lang version.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8346
2020-04-10 19:25:30 -04:00
Manuel de la Pena a2f57b38d6
[Harness] Generalize MSBuildTask and DotnetBuildTask. (#8306)
Move all the logic outside of the Jenkins namespace. Rework a little the
inheritance to make it nicer in the constructors.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-04-10 16:50:50 -04:00
Sebastien Pouliot 8d3987b84a
[xtro][bindings] Add xtro support for nullability and fix some bindings (#8335)
Enabling this will ensure that future bindings (and Xcode updates that
change nullability information) are spotted right away.

The binding fixes are **not** complete, i.e. what was done was mostly
to debug the xtro rule and find corner cases. The backlog will be
_ignored_ so the builds won't fail.
2020-04-10 11:00:47 -04:00
Sebastien Pouliot 48b813e8a3
[linker] Fix infinite queue found with nullability PR (#8337)
and removed previous workaround

Replace previous attempt https://github.com/xamarin/xamarin-macios/pull/8336
2020-04-10 10:59:01 -04:00
Manuel de la Pena 4621b467df
[AppKit] Allow static properties to execute on non-UI threads. (#8330)
VSMac has failing tests when they query the NSScrees.Screens property
which the following swift code shows that it can be executed in a diff
thread:

```swift
import Cocoa
import AppKit

DispatchQueue.global(qos: .background).async {
    print("This is run on the background queue")

    print(Thread.current)
    var screens = NSScreen.screens
    print (screens.count)
}
```

Fixes: https://github.com/xamarin/xamarin-macios/issues/8329
2020-04-09 10:24:16 -04:00
Sebastien Pouliot a5ac0ea102
[generator] Add C#8 nullability into generated code (#7570)
Goals
* Reflect Apple nullability annotations in our bindings using C#8
* No warnings when building bindings

Non-Goals
* Update (add or fix) `[NullAllowed]` to match Apple headers (next phase)
* Make the generator or internal code fully nullable aware (`nowarn` is used)

Notes
* Apple's own annotations are not 100% accurate :(
* Where known issue exists we have _fixed_ our attributes to match reality :)
* We also do additional null-checks internally that might seems not required (better safe than sorry).
2020-04-09 09:29:28 -04:00
Manuel de la Pena e668545555
[Harness] Generalize the BuildProjectTask (#8299)
Use composition to generalize the BuildProjectTask to later reuse it in
the CLI.

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-04-08 20:09:10 -04:00
Manuel de la Pena 5b99859321
[Harness] Move BuildToolTask to a more general namespace. (#8287)
Move the task and use composition so that we can reuse the code. This
will later allow other projects to use the class without the need of
Jenkins or Harness and just implement the base class.



Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-04-08 15:03:33 -04:00
Manuel de la Pena a6955968fa
[Master] Bump mono to 165f4b03 to match android. (#8326)
Commits:

* mono/mono@165f4b0341: [2020-02][debugger] Fix NOT_IMPLEMENTED while debugging. (#19450)
* mono/mono@b04dc7e6a4: Bump corefx to get https://github.com/mono/corefx/pull/395 (#19426)

Diff: ecde08600b...165f4b0341

Related android PR: https://github.com/xamarin/xamarin-android/pull/4540
2020-04-08 14:50:26 -04:00
Rolf Bjarne Kvinge 2e8e26ae1d Bump maccore to get msbuild.zip fix.
New commits in xamarin/maccore:

* xamarin/maccore@ad1696d6f3 Restore Xamarin.iOS.Tasks project for msbuild.zip (#2198)

Diff: a1ad303faf..ad1696d6f3
2020-04-08 13:51:22 -03:00
Přemek Vysoký db921689a9
[Harness] Remove launchTimeout parameter from TestReporter, move factories (#8322) 2020-04-08 11:32:47 -04:00