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

11969 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena eb871b7bb4
[Actions] Provide first step for a ping action. (#12889) 2021-09-30 20:55:11 -04:00
Chris Hamons 3ffabb1daa
[AppKit] Add Catalyst attributes (#12863) 2021-09-30 09:57:10 -05:00
dotnet-maestro[bot] e23a7de01d
Update dependencies from https://github.com/dotnet/installer build 20210929.7 (#12864)
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21478.8 -> To Version 6.0.100-rtm.21479.7

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-09-30 11:00:50 +02:00
Rolf Bjarne Kvinge 9286bfb793
[msbuild/dotnet] Compile project-level assets in the outer build for multi-rid builds. Fixes #12410. (#12847)
We don't need to compile project-level assets for every RuntimeIdentifier in
multi-rid builds, we can instead compile them just once in the outer build.

There is also a correctness issue here: we can't compile assets more than once
and expect to get the exact same compiled result every time (in particular
actool seems to be adding random bytes in to the compiled output), and this
creates a problem when trying to merge the different runtime-specific compiled
output into a universal binary.

We accomplish this by:

* Processing these assets in the outer build, before we execute the
  rid-specific inner builds.
* Store the paths to the assets we've processed in a file.
* In the inner builds, we read that file, and remove any matches from the
  corresponding item group.
* Make sure to copy the compiled assets to the app bundle at the end of the
  outer build.

These are the assets we currently handle this way:

* BundleResource
* ImageAsset
* InterfaceDefinition
* SceneKitAsset
* Collada
* TextureAtlas
* CoreMLModel

Also:

* Add a new test case (AppWithResource) that contains all these different
  types of assets.
* Add support for the ScnTool task on Mac Catalyst (which the new test case
  revealed was missing).

Fixes https://github.com/xamarin/xamarin-macios/issues/12410.
2021-09-30 08:25:10 +02:00
Rolf Bjarne Kvinge 72e2be57a5
[devops] Set a 1h timeout on cleanup duties. (#12865)
If cleaning takes longer than 1h then something is stuck somewhere, so let's
just ignore it and hope for the best for the rest of the test run.
2021-09-30 08:24:20 +02:00
Rolf Bjarne Kvinge 2417377017
[tests] Fix a few nullability warnings. (#12872) 2021-09-30 08:21:43 +02:00
Rolf Bjarne Kvinge 7a090e9dc8
[msbuild] Sign the localization assembly as well. (#12869)
Fixes this problem:

    error MSB4018: The "FindItemWithLogicalName" task failed unexpectedly.
    error MSB4018: System.IO.FileLoadException: Could not load file or assembly 'Xamarin.Localization.MSBuild, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
    error MSB4018: File name: 'Xamarin.Localization.MSBuild, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
    error MSB4018: at Xamarin.MacDev.Tasks.FindItemWithLogicalNameTaskBase.Execute()
    error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2021-09-30 07:32:06 +02:00
TJ Lambert 7bf18ab179
[CI] Print the API Diff Json for easier debugging (#12876) 2021-09-29 22:31:08 -05:00
Chris Hamons af416003f1
[Foundation] Add attributes and fix ignores for Catalyst (#12854) 2021-09-29 10:18:01 -05:00
dotnet-maestro[bot] 071b665016
Update dependencies from https://github.com/dotnet/installer build 20210928.8 (#12859)
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21476.2 -> To Version 6.0.100-rtm.21478.8

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-09-29 08:16:46 +02:00
Rolf Bjarne Kvinge cd2867d44c
[msbuild] Share the Metal[Lib] task implementations between iOS and macOS. (#12851) 2021-09-29 07:55:55 +02:00
Rolf Bjarne Kvinge 3d182c5c54
[Metal] Fix a few issues in MTLDevice. (#12861)
* MTLCopyAllDevices returns a retained object, so we need to release it.
* MTLCopyAllDevicesWithObserver returns an observer (no need to provide one). This
  means we can obsolete the 'ref NSObject' overload (the API doesn't make sense),
  and instead add an 'out NSObject' overload.
* The returned observer from MTLCopyAllDevicesWithObserver is retained, so we must
  release it.
* The returned array from MTLCopyAllDevicesWithObserver is a retained object, so
  we need to release it.
* Simpify the supporting block code for the calls to MTLCopyAllDevicesWithObserver.
* Clean up the block we passed to MTLCopyAllDevicesWithObserver.
2021-09-29 07:54:42 +02:00
github-actions[bot] 8fa1ccad0b
LEGO: check in for Localization to temporary branch. (#12849)
Co-authored-by: CSIGS <csigs@outlook.com>
2021-09-28 14:34:38 -04:00
Rolf Bjarne Kvinge 5fcd73b160
[actions] Fix yml syntax. (#12860) 2021-09-28 14:33:10 -04:00
Rolf Bjarne Kvinge 09905e8021
[msbuild] Share the ALToolUpload and ALToolValidate task implementations between iOS and macOS. (#12852) 2021-09-28 17:38:51 +02:00
Rolf Bjarne Kvinge 8b2288fe59
[msbuild] Share the ScnTool task implementation between iOS and macOS. (#12850) 2021-09-28 17:31:53 +02:00
Rolf Bjarne Kvinge 7dc2d9af61
[msbuild] Sign Xamarin.iOS.Tasks.dll and Xamarin.Mac.Tasks.dll. Fixes #9835. (#12831)
We need to strongname our MSBuild assemblies, so that different versions
can be loaded side-by-side (one example being having both a legacy and a
.NET project in the same solution).

This required setting a version for Xamarin.iOS.Tasks.dll and
Xamarin.Mac.Tasks.dll, otherwise strong-naming won't work properly (all
versions of an assembly would have the same identity).

Also sign the corresponding test assemblies, since they poke into the
internals of the task assemblies.

Fixes https://github.com/xamarin/xamarin-macios/issues/9835.
2021-09-28 17:31:35 +02:00
Manuel de la Pena b20ca55943
[Foundation] Remove warning due to the Equals accepting a null value. (#12839)
Removes the following warning during the builds:

```
warning CS8767: Nullability of reference types in type of parameter 'host' of 'bool NSHost.Equals(NSHost host)' doesn't match implicitly implemented member 'bool IEquatable<NSHost>.Equals(NSHost? other)' (possibly because of nullability attributes)
```

Test was added to ensure that we did not throw an exception.
2021-09-28 08:11:07 -04:00
Manuel de la Pena 339936f457
[Tests] Fix cecil tests. (#12853)
-  Added the marshaling attr and a test to ensure it is ok.
- Fix the cecil MarshalAs test to not skip over types when checking.
    This revealed multiple tests failures that needed fixing.

fixes: https://github.com/xamarin/maccore/issues/2519

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-09-28 08:09:23 -04:00
Rolf Bjarne Kvinge 5cd7c96dcf
[msbuild] Share the TextureAtlas task implementation between iOS and macOS. (#12826) 2021-09-27 20:27:24 +02:00
Rolf Bjarne Kvinge 6bf39bacfa
[tests] Simplify the test code for the .NET unit tests. (#12842)
As more tests have been written, helper methods have been added, so this is
just making existing code use newer helper methods.
2021-09-27 15:55:30 +02:00
Rolf Bjarne Kvinge e90893ab6e
Make the NuGet version code a bit more consistent. (#12841)
Some code branches had names with dot at the end, some code paths didn't.

Now they're all dotted in the same place.
2021-09-27 15:52:24 +02:00
dotnet-maestro[bot] ac317ecf7c
[main] Update dependencies from dotnet/installer (#12828)
* Update dependencies from https://github.com/dotnet/installer build 20210924.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21472.96 -> To Version 6.0.100-rtm.21474.1

* Update dependencies from https://github.com/dotnet/installer build 20210924.34

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21472.96 -> To Version 6.0.100-rtm.21474.34

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-1.21459.1 -> To Version 6.0.100-1.21473.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210926.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21472.96 -> To Version 6.0.100-rtm.21476.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-1.21459.1 -> To Version 6.0.100-1.21473.1 (parent: Microsoft.Dotnet.Sdk.Internal

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-09-27 15:44:30 +02:00
VS MobileTools Engineering Service 2 0ef3a43a08
Localized file check-in by OneLocBuild Task (#12836) 2021-09-27 08:10:31 -04:00
Manuel de la Pena 409fce4c65
[src] Use the correct warning number. (#12838) 2021-09-27 06:55:47 -04:00
Manuel de la Pena 57448bff48
[Makefile] Remove warning in submake commands. (#12840)
Remove the following warning:

```
make[3]: warning: -jN forced in submake: disabling jobserver mode.
/Applications/Xcode_13.0.0-beta5.app/Contents/Developer/usr/bin/make -C ../../../maccore/tools/mlaunch install -j8
make[3]: warning: -jN forced in submake: disabling jobserver mode.
/Applications/Xcode_13.0.0-beta5.app/Contents/Developer/usr/bin/make
../../_build/Microsoft.iOS.Sdk/tools/bin/mlaunch
../../_build/Microsoft.tvOS.Sdk/tools/bin/mlaunch
```

There is no need to pass the number of jobs to be used to a submake
commands as per the gnu make documentation:
```
The ‘-j’ option is a special case (see Parallel Execution). If you set it to some numeric value ‘N’ and your operating system supports it (most any UNIX system will; others typically won’t), the parent make and all the sub-makes will communicate to ensure that there are only ‘N’ jobs running at the same time between them all. Note that any job that is marked recursive (see Instead of Executing Recipes) doesn’t count against the total jobs (otherwise we could get ‘N’ sub-makes running and have no slots left over for any real work!)
```

That means there is not need to pass it since it will be the default
used in submake commands. The override has not effect other the warning
and therefore is better to remove the noise.
2021-09-27 06:55:23 -04:00
Manuel de la Pena c9ba8c5d4e
[Makefile] Remove warning for duplicate files. (#12837)
csc does not care about the order of the files, yet it does care about
duplicate files (warning is printed). One of the side effects of sort
implementation in gnu make is that it removes the duplicates and
therefore the warning about some files being included twice.
2021-09-27 06:54:35 -04:00
Rolf Bjarne Kvinge e2d1777cc7
[dotnet] Show an error if we must link, but linking has been disabled. Fixes #12372. (#12832)
For executable projects, we must run the linker (otherwise we won't produce
something that can be executed).

We'll enable the linker by default in these cases, but if the developer has
manually disabled the linker (if the linker fails to execute for any reason,
it will suggest that the developer disables it), then we should show an error
explaining why.

Fixes https://github.com/xamarin/xamarin-macios/issues/12372.
2021-09-27 07:28:10 +02:00
Manuel de la Pena ad673ae731
[CoreMedia] Add support for xcode13 (#12770)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-09-24 18:19:49 -04:00
Rolf Bjarne Kvinge 9a299aeded
[msbuild] Share the OptimizeImage and OptimizePropertyList tasks and targets between iOS and macOS. (#12819)
This brings .png and .plist optimization to macOS (but no behavior is changed,
because it's already disabled by default).
2021-09-24 16:26:28 +02:00
dotnet-maestro[bot] 230377dc48
Update dependencies from https://github.com/dotnet/installer build 20210922.96 (#12821)
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21472.4 -> To Version 6.0.100-rtm.21472.96

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-09-24 13:48:32 +02:00
Rolf Bjarne Kvinge 4d5616687a
[dotnet] Fix an issue where we wouldn't re-link if some files changed. (#12794) 2021-09-24 13:20:03 +02:00
Rolf Bjarne Kvinge 4464cc7cc7
[msbuild] Share the *CompileTextureAtlas targets between Xamarin.iOS and Xamarin.Mac. (#12818)
The iOS version is more advanced (has additional fixes for incremental
builds), so that's the one that got chosen.
2021-09-24 07:46:50 +02:00
Rolf Bjarne Kvinge 8ba7ff3324
[actions] Skip the label checker for pull requests from 'dotnet-maestro'. (#12823) 2021-09-23 15:15:51 -04:00
Rolf Bjarne Kvinge 5318a2b9fa
[msbuild] Make the CompileAppManifestTaskBase.AppManifest property an ITaskItem. (#12804)
So that any input app manifest is copied to Windows when doing remote builds.
2021-09-23 18:46:37 +02:00
github-actions[bot] fb2d6fc65e
[Localization] Pulling New Localization Translations 1183018662 (#12583) 2021-09-23 11:05:48 -05:00
Rolf Bjarne Kvinge 83de23f6b4
[tests] Build interdependent-binding-projects for macOS now, there's a corresponding macOS Touch.Client project. (#12817) 2021-09-23 16:20:18 +02:00
Rolf Bjarne Kvinge cc4bd44407
[msbuild] Fix a compiler warning about an unused variable. (#12793) 2021-09-23 15:32:57 +02:00
Rolf Bjarne Kvinge 8d994be235
[msbuild] Fix casing for couple of properties to match their other usages. (#12806) 2021-09-23 15:32:35 +02:00
Rolf Bjarne Kvinge 1e90493ccf
[msbuild] Remove dead property (AotScope). (#12805)
All the other code related to this property was removed a long time ago
(659a74cc36).
2021-09-23 15:31:58 +02:00
Rolf Bjarne Kvinge 4dad2ca2d7
[tools] Keep passing 'direct-icalls' to the AOT compiler for legacy Xamarin. Fixes #12810. (#12812)
Fixes https://github.com/xamarin/xamarin-macios/issues/12810.
Fixes https://github.com/mono/mono/issues/21210.
2021-09-23 15:31:29 +02:00
dotnet-maestro[bot] e72fe6c52e
[main] Update dependencies from dotnet/installer (#12800)
* Update dependencies from https://github.com/dotnet/installer build 20210921.61

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21466.6 -> To Version 6.0.100-rtm.21471.61

* Update dependencies from https://github.com/dotnet/installer build 20210922.4

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21466.6 -> To Version 6.0.100-rtm.21472.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-09-23 09:02:10 +02:00
Mauro Agnoletti ac3325f518
Fix CopyDSYMFromMac target to copy *.DSYM to the right path in Windows (#12811)
The working directory on the Zip task was causing relative paths to be used and the resulting zip file to have unnecessary sub folders
2021-09-23 07:59:12 +02:00
Rolf Bjarne Kvinge 5a0a5cdab9
[dotnet-linker] Check if both static and dynamic libraries from the Mono runtime matches P/Invoke libraries. (#12791)
When checking if we need to manually preserve a native symbol, we need to
check if a P/Invoke matches both static and dynamic libraries from the Mono
runtime, not just dynamic libraries.
2021-09-22 07:32:51 +02:00
Rolf Bjarne Kvinge 666d0066f3
[runtime/tools] Change the 'xamarin_runtime_libraries' array to contain only the names of the runtime library in question. (#12792)
P/Invokes may point to a dylib, while the actual library linked into the .app
might be a static library, so make sure to compare without the extension.

This fixes an issue when linking with the static version of the runtime libraries.
2021-09-22 07:31:53 +02:00
Rachel Kang 70dd0d31fa
[Intents] Update bindings for Xcode 13.0 betas 1 through 5 (#12771)
* "[Intents] Update bindings for Xcode 13.0 betas 1 through 5"

* Update based on feedback

* Update based on feedback

* Update based on feedback
2021-09-21 20:30:56 -04:00
Chris Hamons 65f0e4c614
Some Catalyst API annotations and corrections (#12677)
- Part of https://github.com/xamarin/xamarin-macios/issues/10216
- This includes most of the smaller SDKs.
2021-09-21 14:17:52 -05:00
Manuel de la Pena ae08971865
[src] Ignore warning due to obsolete method. (#12779)
The warning is new from .net 5 but the code is old and the change of the
method is not direct, EscapeDataString does not work as EscapeUriString.
2021-09-21 11:22:38 -04:00
Rolf Bjarne Kvinge c4a67e585c
[msbuild/tools] Add a better error message for when we fail to convert between iOS and macOS versions for Mac Catalyst. (#12767)
New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@9e6e29f [Xamarin.MacDev] Return valid iOS/macOS versions when converting betweeen iOS and macOS versions for Mac Catalyst.

Diff: 41d91e0de0..9e6e29f2a4
2021-09-21 16:19:04 +02:00
Rolf Bjarne Kvinge 4c0e5a66f8
[dotnet] Bump to preview 10. (#12784) 2021-09-21 15:08:23 +02:00