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

8019 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge aca2a1a257
[devops] Use a more restricted glob to find directories with sample data in. Fixes xamarin/maccore#2202. (#8465)
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:35:23 +02:00
Manuel de la Pena aed4af1ce0
[Bump Mono] Bump mono to the latest of 2020-02. (#8457)
* [Bump Mono] Bump mono to the latest of 2020-02.

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

* Remove already fixed warning in mono.
2020-04-27 09:50:33 -04:00
monojenkins 1040a31636
[generator] Remove generated, 32bits specific code paths for XM (#8445)
Product now only supports 64bits but the generator was still
producing some dual 32/64 code.

Fix https://github.com/xamarin/xamarin-macios/issues/8441
2020-04-22 12:12:39 -04:00
monojenkins 725aedec3d
[mtouch] Always enable experimental-xforms-product-type (#8427)
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-18 10:47:01 -04:00
Manuel de la Pena b6ff94a4cb
[d16-7][Mono] Bump mono to the head of 2020-02 (#8421)
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 16:17:04 -04:00
monojenkins 53694fabbd
[mmp] Fix PostLinkScanTypeReferenceStep from running two times (#8405)
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-16 09:22:18 -04:00
monojenkins 5673bb0dba
[msbuild] Build bindings with the latest (stable) version of C# (#8401)
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 20:31:18 -04:00
monojenkins 49f6846a72
[generator] Handle (ignore) C#8 special nullability attributes (#8384)
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 16:54:20 -04:00
monojenkins 50d3d7bdc2
[Harness] Fix HML report for NUnitTestTasks. (#8379)
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-14 12:03:25 -04:00
monojenkins d76c86f233
[d16-7] [Harness] Ensure that the generator tests are set when we modify the sources. (#8378)
fixes: https://github.com/xamarin/xamarin-macios/issues/8363
2020-04-14 11:33:56 -04:00
Emanuel Fernandez Dell'Oca bdcd7d35a4
[d16-7] Fixes msbuild.zip (#8368)
* [msbuild] Conditionally include MSBuild assets

Updates the Microsoft.Build* references to use PackageReference to match Xamarin.iOS.Tasks.Core.csproj, and conditionally includes the MSBuild assets so these can be copied to the output directory if needed. If `IncludeMSBuildAssets` is not set, the behavior will remain the same, the MSBuild assemblies won't be copied to the output dir.

* Fix whitespace.

* Bump maccore

New commits in xamarin/maccore:

* xamarin/maccore@92a06f7303 [d16-7] Fixes msbuild.zip (#2200)

Diff: a14f74b40a..92a06f7303

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-04-14 08:19:08 +02:00
monojenkins 731963e6f8
[d16-7] [AppKit] Allow static properties to execute on non-UI threads. (#8339)
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


Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-04-10 16:25:00 -04:00
monojenkins 2ff994455d
[linker] Fix infinite queue found with nullability PR (#8340)
and removed previous workaround

Replace previous attempt https://github.com/xamarin/xamarin-macios/pull/8336
2020-04-10 15:44:06 -04:00
Sebastien Pouliot 15938de198
[generator] Add C#8 nullability into generated code (#7570) (#8333)
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-10 12:38:14 -04:00
monojenkins 015fd895c5
[d16-7] [xtro][bindings] Add xtro support for nullability and fix some bindings (#8341)
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 12:37:16 -04:00
monojenkins fb5c5187a2
[linker] Remove nullability attributes than are not used at runtime (#8303) 2020-04-07 13:44:10 -04:00
Matt Sylvia 9686ecb7f6 Branching for d16-7 2020-04-06 18:22:06 -04:00
Alex Soto 55c6bd74e5
[maccore] Bump maccore to bring localization revert (#8298)
New commits in xamarin/maccore:

* xamarin/maccore@a14f74b40a Revert "[Localization] Rework mlaunch (#2171)" (#2194)
* xamarin/maccore@9939a3812d [mlaunch] Accept the latest C# language version in projects (#2193)

Diff: fdeec0f4cc..a14f74b40a
2020-04-06 17:21:28 -04:00
Přemek Vysoký 530f2a2bfa
[Harness] Rename device management classes (Devices, Simulators, ILoadAsync) (#8295) 2020-04-06 14:33:27 -04:00
Manuel de la Pena 6c9f62f56e
[Introspection] Fix a false typo in mac modern typo tests. (#8294)
Add Sha as an allowed word in the typo tests, it is a well known
acronym.
2020-04-06 14:31:46 -04:00
Přemek Vysoký b4a262eb42
Fix unit tests, make Devices fields readonly (#8293) 2020-04-06 10:57:31 -04:00
Manuel de la Pena ab476d7fa2
[Harness] Fix the generation of the sources. (#8289)
The name of the dll changed, ergo the prefix changed.
2020-04-06 09:52:18 -04:00
Rolf Bjarne Kvinge 2ae55ac1f4
[msbuild] Compute the ComputedFrameworkMoniker later in the build. Fixes #8277. (#8279)
It might only be necessary for Xamarin.iOS builds, but modify both XI and XM
so that the logic is identical.

Fixes https://github.com/xamarin/xamarin-macios/issues/8277.
2020-04-06 12:47:01 +02:00
Přemek Vysoký ce9f9278b6
[Harness] Move TestImporter into the shared library (#8283) 2020-04-03 18:28:49 -04:00
Manuel de la Pena 10333b0d0f
[Harness] Make sure TestsTasks do not share an id. (#8273)
Threading is hard, part 2. We could have a situation in which two tasks
that are instantiated async use the same id. The id is later used to
build the logs directory etc.. When they share the id we end up in a
situation in which the logs overlap.

fixes: https://github.com/xamarin/xamarin-macios/issues/8146
2020-04-03 14:43:04 -04:00
Sebastien Pouliot a4d5d97b99
[avfoundation] Remove extra NSString instance created to get a constant (#8280) 2020-04-03 14:14:43 -04:00
Manuel de la Pena 3004e7d34b
[Harness] Ensure we do not throw an exception if we do not have tasks. (#8272)
The First extension will throw an exception if the list is empty. Use
FirstOrDefault, check if the devices are null and return the test as
Ignored.

fixes: https://github.com/xamarin/xamarin-macios/issues/8271
2020-04-03 13:23:35 -04:00
Manuel de la Pena f8001a8114
[Bump VMac] Bump max version of VSMac to current stable major. (#8282)
Current VSMac version is 8.5.1.42. Bump the max version so that we can
dogfood at least the stable channel without setting the ignore flag.
2020-04-03 13:14:11 -04:00
Manuel de la Pena da0c009a39
[Bump Mono] Bump mono to match android to ecde086 (#8281)
Commits:

* mono/mono@ecde08600b: [runtime] Allocate the memory for gshared gparams from image sets. (#19361) (#19419)
* mono/mono@8fb9301292: [meta] Add mono_type_get_name_full to public API (#19415)
* mono/mono@7bfb441fb4: Fix Windows .msi build using newer xar
* mono/mono@e77cea1910: Fix Windows .msi build with recent cygwin updates

Complete diff: fda73998f9..ecde08600b
2020-04-03 13:10:19 -04:00
Manuel de la Pena d7160b3dcf
[Harness] Completely remove the BCL prefix from the test importer. (#8224)
Remove the last BCLPrefix and move the InfoPlistGenerator to the managed
namespace since it is part of the managed template.
2020-04-03 11:01:56 -04:00
Přemek Vysoký d4cf8301cf
[Harness] Allow to create a process manager with default tool paths (#8278) 2020-04-03 11:00:45 -04:00
Alex Soto 5aa2b1c34f
Update azure-pipelines.yml 2020-04-02 22:20:01 -04:00
Alex Soto 316359cf98 [maccore] Bump maccore to get AzDo script changes (#8269)
New commits in xamarin/maccore:

* xamarin/maccore@fdeec0f4cc Update external-deps.csx (#2191)
* xamarin/maccore@f473e45166 [Localization] Rework mlaunch (#2171)

Diff: 5dbf6f4c5f..fdeec0f4cc
2020-04-02 16:20:42 -04:00
Rolf Bjarne Kvinge 5aff10b3c0
[msbuild] No need to pass --gsharedvt to mtouch anymore, mtouch ignores --gsharedvt since it must always be enabled. (#8270) 2020-04-02 17:22:17 +02:00
monojenkins 04acaf65e4
[UIKit] Fixes UIGestureRecognizer default introduced in iOS 13.4 (#8264)
Fixes xamarin/Xamarin.Forms#10162
Fixes xamarin/xamarin-macios#8255

Xcode 11.4 introduced a new protocol member to
`UIGestureRecognizerDelegate` and our initial proposed default value for
`ShouldReceiveEvent` is not playing well with the world.

Co-authored-by: Alex Soto <alex@alexsoto.me>
2020-04-01 18:50:36 -04:00
Manuel de la Pena 786bfc09f5
[Mono bump] But mono to match android. (#8259)
Commits:

* mono/mono@7bfb441fb4 Fix Windows .msi build using newer xar

Full diff: e77cea1910..fda73998f9

Related android PR: https://github.com/xamarin/xamarin-android/pull/4500
2020-04-01 15:15:41 -04:00
Manuel de la Pena feec8d4ef9
[Harness] Remove hardcoded paths to the testing framework dlls. (#8244)
The testing framework dlls come from mono and their paths are harcoded
in the templates. Move the hardcoded paths out to the assembly locator
which know were to find the paths.

This is needed to later allow the cmd to pass the location of the paths.
2020-04-01 15:10:13 -04:00
Manuel de la Pena 1518894394
[Harness] Add the assets as part of the managed template. (#8251)
The assets were being used from the bcl-test directory. Move them as
part of the template. Renamed a file to make things a little easier when
adding the assets (a '.' in the middle of the name made this
complicated).

The template should be selfcotained.
2020-04-01 15:09:08 -04:00
Manuel de la Pena f16561b49f
[Harness] If we cannot connect over tcp use Console.Out as the writer. (#8235)
If we could not connect to the host via tcp, set the writer to be
Console.Out which will fix the NRE and will report the test run in the
runlogs.

fixes: https://github.com/xamarin/xamarin-macios/issues/8130
2020-04-01 14:03:40 -04:00
Přemek Vysoký b14a055265
[Harness] Move code to a shared library (#8234)
- Code that will later be moved to the `dotnet/xharness` repo is first moved to an isolated project before it will be extracted to the new repo and NuGetified
- New project for the shared code and new test project for tests accompanying the moved code are created
- Only Factories are left behind that are used only by XHarness
2020-04-01 13:32:21 -04:00
Manuel de la Pena a4e31d546a
[Mono Bump] Bump mono to pick fix for issue (#19389) (#8257)
Commits:

* mono/mono@e77cea1910 Fix Windows .msi build with recent cygwin updates.
* mono/mono@fda73998f9 Adding static to ss_req_acquire and ss_req_count.

Complete diff: beccf5ba43...e77cea1910
2020-04-01 13:06:54 -04:00
Sebastien Pouliot 559ca5624d
[homekit] Remove manual workaround since #57870 was fixed a while ago (#8256) 2020-04-01 11:53:10 -04:00
Vincent Dondain dd9b320704
[devops] Fix provision-xcode unhandled exception (#8253)
In cases where a `Make.config` doesn't exist, there's an unhandled exception and the user friendly one cannot be reached.

Arguably, an edge case not applicable to xamarin-macios I discovered when using that code in an other context (where obviously I don't have a Make.config :P). Still this is making the code more robust (;
2020-04-01 10:30:02 -04:00
Sebastien Pouliot 86ab2bc1d1
[tests][link all] Remove test workaround (#8252)
iOS fixed after Xcode 11 release

Fix https://github.com/xamarin/xamarin-macios/issues/6254
2020-04-01 09:00:26 -04:00
Sebastien Pouliot ac01b522f0
[generator] Add missing `EnsureUIThread` for generated `init` and `initWithCoder` (#8250)
Fix https://github.com/xamarin/xamarin-macios/issues/8249
2020-03-31 17:20:44 -04:00
Rolf Bjarne Kvinge 862d200a18
[mtouch] Fix filename casing for Errors.resx. (#8247)
So that the name on disk matches the casing in the csproj.
2020-03-31 17:53:12 +02:00
Alexis Christoforides 4b94e3073b
Wrap mono_gc_init_finalizer_thread() call with now-needed coop GC state transition. (#8242)
Starting with https://github.com/mono/mono/pull/16907 , the Mono runtime ends in GC-Safe state (mode) after mono_jit_init_version() is called. The monotouch code did not expect that, and calls mono_gc_init_finalizer_thread() which also tries to enter GC-safe mode.

Should fix https://github.com/mono/mono/issues/19372
2020-03-31 09:28:02 +02:00
Manuel de la Pena f383593924
[Harness] Merge the Generator and the Factory in a same object and rename namespace. (#8222)
The Generator and the Factory classes are a xamarin-macios thing.
Initially, they were separated because the code that generated the bcl
tests was not inside xharness. That is not longer the case. We can merge
both classes, generalize the namespace and be more prepared to move out
of the xamarin-macios repo.
2020-03-30 23:23:33 -04:00
Manuel de la Pena 63fcc22bad
[Harness] Make sure we do not copy/generate the app sources more than once. (#8243)
Threading is hard, even with async. We reached a situation in which the
src code of the test applications from the template was being generated
more than once. Ideally, we could have a nice solution with
AsyncLazy<bool> and use the lazy async to copy the code, but it was
moved to netcore 5. The fix is a little uglier but valid, lock and
enure we only generate it once. Please note that you CANNOT use a lock
statement inside a async method.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8240
2020-03-30 21:20:37 -04:00
Sebastien Pouliot 046daad997
[generator] Remove unneeded null checks in event args (#8241)
The calls to `Runtime.GetNSObject<T>` and `NSArray.ArrayFromHandle<T>`
already do the null / `IntPtr.Zero` check.

This generates a bit less code (always a good thing) and reduce the
number of nullability warnings.

Also use `Array.Empty<T>` instead of allocating empty arrays.

before
```
$ grep -r "new " src/build/  | grep "\[0]"
src/build//ios/native/ObjCRuntime/EventArgs.g.cs:					return new string [0];
src/build//ios/native/ObjCRuntime/EventArgs.g.cs:					return new MPTimedMetadata [0];
src/build//ios/native/ObjCRuntime/EventArgs.g.cs:					return new string [0];
src/build//ios/native/ObjCRuntime/EventArgs.g.cs:					return new string [0];
src/build//ios/native/AuthenticationServices/ASAuthorizationProviderAuthorizationOperation.g.cs:		static IntPtr[] values = new IntPtr [0];
src/build//mac/full/ObjCRuntime/EventArgs.g.cs:					return new string [0];
src/build//mac/full/AppKit/NSTextField.g.cs:				return new string[0];
src/build//mac/full/AuthenticationServices/ASAuthorizationProviderAuthorizationOperation.g.cs:		static IntPtr[] values = new IntPtr [0];
src/build//mac/mobile/ObjCRuntime/EventArgs.g.cs:					return new string [0];
src/build//mac/mobile/AppKit/NSTextField.g.cs:				return new string[0];
src/build//mac/mobile/AuthenticationServices/ASAuthorizationProviderAuthorizationOperation.g.cs:		static IntPtr[] values = new IntPtr [0];
src/build//tvos/tvos/ObjCRuntime/EventArgs.g.cs:					return new string [0];
src/build//tvos/tvos/AVFoundation/AVMetadataObjectType.g.cs:		static IntPtr[] values = new IntPtr [0];
src/build//watch/watch/ObjCRuntime/EventArgs.g.cs:					return new string [0];
src/build//watch/watch/AVFoundation/AVMetadataObjectType.g.cs:		static IntPtr[] values = new IntPtr [0];
```

after
```
grep -r "new " src/build/  | grep "\[0]"
src/build//ios/native/AuthenticationServices/ASAuthorizationProviderAuthorizationOperation.g.cs:		static IntPtr[] values = new IntPtr [0];
src/build//mac/full/AppKit/NSTextField.g.cs:				return new string[0];
src/build//mac/full/AuthenticationServices/ASAuthorizationProviderAuthorizationOperation.g.cs:		static IntPtr[] values = new IntPtr [0];
src/build//mac/mobile/AppKit/NSTextField.g.cs:				return new string[0];
src/build//mac/mobile/AuthenticationServices/ASAuthorizationProviderAuthorizationOperation.g.cs:		static IntPtr[] values = new IntPtr [0];
src/build//tvos/tvos/AVFoundation/AVMetadataObjectType.g.cs:		static IntPtr[] values = new IntPtr [0];
src/build//watch/watch/AVFoundation/AVMetadataObjectType.g.cs:		static IntPtr[] values = new IntPtr [0];
```

and the remaining are not related to the same generator code.
2020-03-30 20:29:04 -04:00