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

8738 Коммитов

Автор SHA1 Сообщение Дата
Přemek Vysoký b1f7bd44d9
[xharness] Do not mark DeviceLoaders as loaded when loading fails (#9367) 2020-08-17 08:27:48 +02:00
Manuel de la Pena c60759d857
[Mono] Bump to match android on 66e2b840 (#9380)
Commits:
* mono/mono@66e2b84: [aot] Fix an assert which is hit for generic instances with a lot of arguments. (#20239)
* mono/mono@d3daacd: Bump msbuild to latest commit
* mono/mono@e59c1cd: Fix Cairo issue on macOS Big Sur (#20154)
* mono/mono@648655b: [aot] Avoid a crash in generic sharing for invalid generic instances. (#20158)
* mono/mono@ec71e8a: [2020-02] Reapply "Emit DWARF debug_abbrev offset for compile units as a label instead of 0" (#20046)
* mono/mono@20bb4f9: [mono][mini] Do a non-virtual call for bound delegates (#20039)
* mono/mono@9ca6fa6: [merp] Remove dead code (#20043)
* mono/mono@2ff424b: [crashing] Improve crash chaining (#20018)

Complete diff:

mono/mono@83105ba...66e2b84

Related Android: https://github.com/xamarin/xamarin-android/pull/5014
2020-08-14 21:35:08 -04:00
Manuel de la Pena 7e7caa00a6
[Submission] Fix all the selectors that apple warns about. (#9268)
We have noticed the following message from Apple when performing
submissions with Xamarin.iOS:

> ITMS-90338: Non-public API usage - The app references non-public
> selectors in WcBc.iOS: behaviorTypes, convolutionState,
> discoverAllContactUserInfosWithCompletionHandler:,
> discoverAllContactsCompletionBlock,
> discoverUserInfoWithEmailAddress:completionHandler:,
> discoverUserInfoWithUserRecordID:completionHandler:,
> discoverUserInfosCompletionBlock, displayContact, drawableResizesAsynchronously,
> encodeToCommandBuffer:sourceImage:convolutionState:,
> encodeToCommandBuffer:sourceImage:destinationImage:state:,
> getProperty:onChannel:responseHandler:, hasProperty:onChannel:responseHandler:,
> initWithEmailAddresses:userRecordIDs:, initWithMIDIEntity:dataReadyHandler:,
> initWithZoneID:options:, initWithZoneID:subscriptionID:options:,
> isPublicDatabase, mouseUpAction, newDrawable, propertyChangedCallback,
> removeAllAppearanceStreams, replaceTextStorage:, retrieveConnectedPeripherals,
> retrievePeripherals:, setDiscoverAllContactsCompletionBlock:,
> setDiscoverUserInfosCompletionBlock:, setDrawableResizesAsynchronously:,
> setEditedMask:, setMouseUpAction:, setMovieControlMode:,
> setProperty:onChannel:responseHandler:, setPropertyChangedCallback:,
> setSocketFamily:, setTemporaryAttributes:forCharacterRange:, setUserRecordIDs:,
> sourceOffset, subscriptionOptions, takeBackgroundColorFrom:, takePasswordFrom:,
> temporalAntialiasingEnabled, userRecordIDs. If method names in your source code
> match the private Apple APIs listed above, altering your method names will help
> prevent this app from being flagged in future submissions. In addition, note
> that one or more of the above APIs may be located in a static library that was
> included with your app. If so, they must be removed. For further information,
> visit the Technical Support Information at http://developer.apple.com/support/technical/

All of them have been removed but without a break in the API excep
"initWithMIDIEntity:dataReadyHandler:" wich does look like an error on
Apples side.

Empty stubs are used as much as possible except on those cases in which
a handler is called or an output variable should be modified (buffer,
out param) to minimize the users surprise at runtime.
2020-08-14 14:53:01 -04:00
Sebastien Pouliot dafef3dfea
[tools] Fix message typo in device-tests.yml (#9373) 2020-08-14 09:02:03 -04:00
Rolf Bjarne Kvinge b28997fa8a
[xharness] Add support for getting the default AssemblyName for projects. (#9369)
In .NET projects there's a default value for most properties, which means that
there won't necessarily be an AssemblyName property in a csproj. We need to know the
AssemblyName, so calculate it from the csproj filename (which is how .NET does it).

This turned out slighly complicated, because we're pass an XmlDocument around,
and the XmlDocument doesn't know the file from where it was loaded, so we need
to keep that information separately.
2020-08-14 10:32:23 +02:00
Rolf Bjarne Kvinge 33ecd581ac
[mtouch/mmp] Move Application.BuildTarget, Application.IsDeviceBuild and Application.IsSimulatorBuild to shared code. (#9363)
Also add a 'None' build target for the BuildTarget enum for when we're
building for neither simulator nor device (i.e. macOS). This means the default
value will change (since 'Simulator' is no longer the first value), but as far
as I can tell we're always assigning a specific value and not relying on the
default, so this should not make any difference.

This will be needed when the .NET code starts using these classes.
2020-08-13 15:33:13 +02:00
Rolf Bjarne Kvinge 0601d17507
[mtouch] Move Driver.IsFrameworkAvailableInSimulator to shared Application code. (#9365)
This will be needed when the .NET code starts using these classes.
2020-08-13 15:27:57 +02:00
Rolf Bjarne Kvinge b1e5a3faf8
[mtouch/mmp] Move a few Application.Is* properties to shared code. (#9364)
This will be needed when the .NET code starts using these classes.
2020-08-13 15:27:13 +02:00
Alex Soto d20717528a
[main] Update API diff to latest stable release (#9359) 2020-08-13 03:00:31 -04:00
Manuel de la Pena e994e43099
[iOSurface] Remove warning from the generator. (#9357)
The following warning was being raised:

```
iosurface.cs(202,4): warning CS0657: 'return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'property'. All attributes in this block will be ignored.
```

Moved the attr to the correct location and fixed a missing using with
the MaybeNull attrs.
2020-08-12 22:00:11 -04:00
Rolf Bjarne Kvinge d36853c8cd
[xharness] Add support for adding PropertyGroups for unknown platform/configuration values in a csproj. Fixes xamarin/maccore@2277. (#9347)
Fixes https://github.com/xamarin/maccore/issues/2277.
2020-08-12 10:35:18 +02:00
Rolf Bjarne Kvinge 621bf6c085
[tests] Fix running several test suites from the command line. Fixes xamarin/maccore@2279. (#9348)
Fixes https://github.com/xamarin/maccore/issues/2279
2020-08-12 10:34:55 +02:00
Rolf Bjarne Kvinge 9fda2c6c9b
[tests] Add --dlsym:+nunit.framework.dll to all Xamarin.iOS test suites. (#9349)
This works around a build problem that occurs because NUnit ships with a
P/Invoke to a function that doesn't exist on Apple platforms:

    MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetVersionEx. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/xamarinqa/myagent/_work/8/s/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test58/monotouch-test-tvos.csproj]
    MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -fembed-bitcode-marker [/Users/xamarinqa/myagent/_work/8/s/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test58/monotouch-test-tvos.csproj]
    clang : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/xamarinqa/myagent/_work/8/s/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test58/monotouch-test-tvos.csproj]

Also fix an issue in mtouch where we would overwrite any previous --dlsym
values; they're now accumulative (`--dlsym:foo.dll --dlsym:bar.dll` works
as expected)

Ref: https://github.com/nunit/nunit/issues/3618
2020-08-12 09:42:53 +02:00
Rolf Bjarne Kvinge 90ec0c7cf9
[dotnet] Add support for building binding projects (#9340).
* Ship bgen
* Fix a few issues in the generator.
* Modify some of the MSBuild logic to support binding projects.
* Port bindings-test[2] to .NET.
2020-08-11 11:15:56 +02:00
Rolf Bjarne Kvinge 82c6b03d0c
[mtouch/mmp] Add CoreFoundation and GSS to our list of known frameworks. (#9338)
* [mtouch/mmp] Add CoreFoundation and GSS to our list of known frameworks.

Putting these frameworks in our known list of frameworks means we won't try to
weak link them unless needed (when the deployment target is earlier than when
they were introduced), because if we encounter a framework we don't know
about, we'll weak link them to be on the safe side.

* GSS was available in at least macOS 10.1
2020-08-11 10:37:35 +02:00
Rolf Bjarne Kvinge 855c2b09fc
[mtouch] Fix the MT0091 (now called MT0180) after recent code changes. Fixes xamarin/maccore@2280. (#9342)
Also fix a confusion between the M?0179 and M?0180 error message vs error number.

Fixes https://github.com/xamarin/maccore/issues/2280.
2020-08-10 15:49:50 -04:00
Alex Soto f822013d87
[README] Add d16-7 versions (#9343)
Fixes https://github.com/xamarin/xamarin-macios/issues/9337
2020-08-10 15:07:47 -04:00
Rolf Bjarne Kvinge 2ab8d3f4f8
[mtouch/mmp] Move Application.RequiresXcodeHeaders to shared code. (#9321) 2020-08-10 17:39:33 +02:00
Rolf Bjarne Kvinge 8814e8ca24 [tests] Port bindings-test2 to .NET. 2020-08-10 16:14:52 +02:00
Rolf Bjarne Kvinge d883eb4725 [tests] Add a tvOS and watchOS version of the bindings-test project for .NET 2020-08-10 16:12:42 +02:00
Rolf Bjarne Kvinge 43d234de52 [tests] Add a macOS version of the bindings-test project for .NET
This required disabling some Xamarin.Mac-specific binding code in .NET mode.
2020-08-10 16:12:42 +02:00
Rolf Bjarne Kvinge c583cfd01e [dotnet] Add bindings-test to our unit tests. 2020-08-10 16:12:42 +02:00
Rolf Bjarne Kvinge 89e5bb15f7 [tests] Port bindings-test to .NET 2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge 64718ac139 [bgen] Improve lookup of dependent assemblies by looking in our explicitly referenced assemblies to see if we were passed the path. 2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge 4e1b571ab6 [msbuild] Pass the path to the binding attribute assembly to bgen. 2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge a4191b3ab6 [dotnet] Set BTouchToolPath and BaseLibDllPath to the where bgen and the platform assembly is. 2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge 612769c390 [dotnet] Split part of _ComputeVariables into a _ComputeFrameworkVariables.
This means that the '_ComputeFrameworkVariables' target can be executed without needing
some of the dependencies the '_ComputeVariables' target has (in particular executing
'_GenerateBundleName' is not possible for binding projects).
2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge df69755fb0 [msbuild] Create the output directory for generated binding sources. 2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge d5b91781dd [msbuild] Don't pass a reference to mscorlib.dll to bgen.
In .NET there's no mscorlib.dll next to the platform assembly. bgen will find it
anyway when needed if it's not passed explicitly, so just don't pass it.
2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge af7a2a3391 [dotnet] Ship bgen. 2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge edc673ca7f [dotnet] Disable default compilation includes for binding projects. 2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge 19e53376dd
[dotnet] Port the fsharplibrary project to .NET (#9339) 2020-08-10 16:12:19 +02:00
Rolf Bjarne Kvinge d96827cd89
[msbuild] Share the _CompileEntitlements target. (#9323)
Use two separate output variables (EntitlementsInExecutable/EntitlementsInSignature)
instead of using the same output variable for two different purposes. This makes
the code more self-explanatory.

Also move the simulator check to the C# code, that way it's easier to re-use elsewhere.

* [msbuild] Share the _CompileEntitlements task.

* [msbuild] Create the same class hierarchy for Xamarin.Mac and Xamarin.iOS for the CompileEntitlements task.

    CompileEntitlementsTaskBase
    └─── iOS/CompileEntitlementsTaskCore
    │    └─── iOS/CompileEntitlements
    └─── Mac/CompileEntitlementsTaskCore
         └─── Mac/CompileEntitlements

This also means we can remove a known failure in the list of MSBuild tasks that don't
conform to our 'no code in final task implementation' requirements.
2020-08-10 13:55:54 +02:00
Rolf Bjarne Kvinge d0f426b731
[tests] Port the EmbeddedResources test project to .NET and add a test to build it. (#9324) 2020-08-10 10:48:29 +02:00
Rolf Bjarne Kvinge 200608ce77
[xharness] Look at the exact NUnit version an NUnit project is referencing to figure out how to run it in a makefile. (#9322) 2020-08-10 10:47:45 +02:00
Rolf Bjarne Kvinge 916e79b8d2
[mtouch/mmp] Move Driver's LOCAL_BUILD_DIR and FRAMEWORK_LOCATION_VARIABLE constants to Application instance fields. (#9320) 2020-08-10 10:47:35 +02:00
Rolf Bjarne Kvinge d8665ddd63
[mtouch/mmp] Remove the Error91LinkerSuggestion and implement it using two different error codes. (#9319)
* It makes the error message localizable.
* It makes the implementation shared between mtouch and mmp.
2020-08-10 10:41:25 +02:00
Rolf Bjarne Kvinge 06fec85900
[msbuild] Move Xamarin.iOS' implementation of the PrepareResourceRules task to Xamarin.MacDev.Tasks. (#9318) 2020-08-07 14:54:38 +02:00
Rolf Bjarne Kvinge 4f8afa575d
[msbuild] Create a few '_*DependsOn' variables that specifies depend targets. (#9305)
The .NET logic will inject an additional dependencies in these variables.
2020-08-07 14:53:49 +02:00
Rolf Bjarne Kvinge 9be9a9a4b6
[msbuild] Compute variables for where the platform assembly is, and the platform assembly name. (#9304)
This will be more useful later, because these variables will be used in more places
in the .NET code.
2020-08-07 14:53:30 +02:00
Rolf Bjarne Kvinge fd5d82da6b
[msbuild] Pass the full path to the output file to the native linker. (#9295)
This makes it easier to copy-paste commands to debug them.
2020-08-07 14:53:15 +02:00
Rolf Bjarne Kvinge 44b2f00b39
[mtouch/mmp] Share Assembly.CopyAssembly. (#9310)
The shared version isn't used by mmp yet as far as I can tell (mmp has its own logic
to copy assemblies), but sharing this code is the first step towards having the same
implementation as well.
2020-08-07 08:24:09 +02:00
Rolf Bjarne Kvinge 08bb01e3b5
[mtouch] Sort the errors in Errors.resx. (#9308)
Also add a make check to ensure the errors stay sorted.

This makes it much easier to find unused numbers for new errors.
2020-08-07 08:23:44 +02:00
Rolf Bjarne Kvinge ccca0cd2c7
[mtouch/mmp] Move Target.Is32Build and Target.Is64Build to shared code. (#9306)
We'll need the iOS implementation for .NET, so use that everywhere.
2020-08-07 08:11:52 +02:00
Rolf Bjarne Kvinge 8f5dba2194
[introspection] Some P/Invokes have moved to a QCall library in .NET 5 preview 8+. (#9300)
This fixes numerous P/Invoke test failures like this:

    Could not find the symbol 'GlobalizationNative_GetCalendars' in QCall
    Could not find the symbol 'GlobalizationNative_GetCalendarInfo' in QCall
    Could not find the symbol 'GlobalizationNative_EnumCalendarInfo' in QCall
    Could not find the symbol 'GlobalizationNative_GetLatestJapaneseEra' in QCall
    [...]

Ref: a56d6a8034
Ref: fae477f34b
2020-08-07 08:06:31 +02:00
Rolf Bjarne Kvinge f2b8dc3d48
[xharness] Make it possible to include .NET tests by setting a label. (#9298)
This also means that setting 'run-all-tests' enables the .NET tests, which
means they'll now start running on internal Jenkins (as was the intention from
the beginning).
2020-08-07 07:59:14 +02:00
Rolf Bjarne Kvinge 2b96b9ac5f
[monotouch-test] Adjust tests based on Environment.OSVersion (#9291)
With Mono, Environment.OSVersion returns the macOS version when running in the
simulator. On Catalina, Mono returns 19.* as the Environment.OSVersion, which
means that the check for major version = 15 in the simulator turns out to be a
constant value now (since we don't support running in the simulator on a
4-year-old macOS version).

With .NET, Environment.OSVersion returns the iOS version instead, which means
that the check would have to be reworked.

However, since these version checks have effectively been constant for a few
years now, we can just remove the checks and the resulting unreachable code.
2020-08-07 07:57:40 +02:00
Manuel de la Pena f147fe91cf
[Harness] Fix some typos. (#9303) 2020-08-06 17:37:57 -04:00
Manuel de la Pena 90bf04f608
Remove wrongly added dir. (#9301)
Someone (Manuel) uses an IDE that uses .idea to store user settings and
that got added by accident.
2020-08-06 16:35:26 -04:00
Rolf Bjarne Kvinge ffde3dd49f
[dotnet] Fix referencing an MSBuild variable. (#9296)
This fixes copying executables to the app bundle.
2020-08-06 18:53:25 +02:00