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

11300 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge aebc0117dc [msbuild] Disable the CreateIpa target on macOS and Mac Catalyst. 2021-07-28 18:27:35 +02:00
Rolf Bjarne Kvinge 25f19ae78a Merge remote-tracking branch 'origin/main' into dotnet-archive 2021-07-28 09:18:19 +02:00
Rolf Bjarne Kvinge 65b7daf620 [msbuild] We're using 'EnableSGenConc' internally now, 'MtouchEnableSGenConc' might not be set. 2021-07-28 09:17:53 +02:00
Rolf Bjarne Kvinge 7986b2f2af
[dotnet] Globalization works for Mac Catalyst now. Fixes #11392. (#12247)
Fixes https://github.com/xamarin/xamarin-macios/issues/11392.
2021-07-28 09:12:22 +02:00
Rolf Bjarne Kvinge 600ce3290b
[monotouch-test] Adjust CalendarTest.DateComponentsTest to use a specific time zone. (#12249)
Hopefully avoids random test failures like https://github.com/xamarin/maccore/issues/2471#issuecomment-887517838.
2021-07-28 09:08:52 +02:00
Rolf Bjarne Kvinge 7260f267d9
[tests] Remove workaround for #dotnet/runtime@47120, it's been fixed. (#12253) 2021-07-28 09:08:13 +02:00
Rolf Bjarne Kvinge 08dba89c98
[tests] Add dummy variable to put System.Runtime.CompilerServices.Unsafe.dll next to the test assembly. (#12251)
Otherwise this happens when running tests from within the IDE:

error BI0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
  at System.ReadOnlySpan`1[T].op_Implicit (T[] array) [0x00000] in <16786cfd571c4686983021cfcee42fb4>:0
  at System.Reflection.TypeLoading.CoreTypes..ctor (System.Reflection.MetadataLoadContext loader, System.String coreAssemblyName) [0x0003d] in <49552709e6e14610b2a2f34b9d5f4c52>:0
  at System.Reflection.MetadataLoadContext..ctor (System.Reflection.MetadataAssemblyResolver resolver, System.String coreAssemblyName) [0x00046] in <49552709e6e14610b2a2f34b9d5f4c52>:0
  at BindingTouch.Main3 (System.String[] args) [0x00e91] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:454
  at BindingTouch.Main2 (System.String[] args) [0x00007] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:199
  at BindingTouch.Main (System.String[] args) [0x00002] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:91
  at System.Environment.get_StackTrace () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/Environment.cs:316
  at ErrorHelper.ShowInternal (System.Exception e) [0x0010f] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/error.cs:175
  at ErrorHelper.Show (System.Exception e, System.Boolean rethrow_errors) [0x00089] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/error.cs:125
  at BindingTouch.Main (System.String[] args) [0x0000d] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:93
  at Xamarin.Tests.BGenTool.Execute () [0x000a1] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTool.cs:228
  at Xamarin.Tests.BGenTool.AssertExecute (System.String message) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTool.cs:207
  at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.Boolean nowarnings, System.Boolean processEnums, System.Collections.Generic.IEnumerable`1[T] references, System.String[] filenames) [0x000ab] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:764
  at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.Boolean nowarnings, System.Boolean processEnums, System.String[] filenames) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:750
  at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.String[] filenames) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:740
  at GeneratorTests.BGenTests.IgnoreUnavailableProtocol () [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:636
  at System.Reflection.RuntimeMethodInfo.InternalInvoke (System.Reflection.RuntimeMethodInfo , System.Object , System.Object[] , System.Exception& ) [0x00000] in <08f46039e5064c628bf7795f9b970b7b>:0
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Reflection/MethodBase.cs:53
  at NUnit.Framework.Internal.Reflect.InvokeMethod (System.Reflection.MethodInfo method, System.Object fixture, System.Object[] args) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.MethodWrapper.Invoke (System.Object fixture, System.Object[] args) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Commands.TestMethodCommand.InvokeTestMethod (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Execution.WorkItem.Execute () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Execution.TestWorker.TestWorkerThreadProc () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/thread.cs:74
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:968
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:910
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:899
  at System.Threading.ThreadHelper.ThreadStart () [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/thread.cs:111
2021-07-28 09:00:29 +02:00
Manuel de la Pena f611cd8cae
[CI] Do not even try to do net6 publishing on not main builds. (#12250) 2021-07-27 15:03:03 -04:00
Peter Collins d886ae6d7a
[CI] Use NuGet to MSI conversion v2 (#12205) 2021-07-27 13:04:42 -04:00
Manuel de la Pena 3b0d79df6a
[CI] Run tests on M1 machines with BS. (#12230) 2021-07-27 11:10:08 -04:00
github-actions[bot] 9598c9bd7f
[Localization] Pulling New Localization Translations 1061159247 (#12214)
Co-authored-by: CSIGS <csigs@outlook.com>
2021-07-27 11:01:05 -04:00
Rolf Bjarne Kvinge 2900ccb173
[xharness] Bump timeout for the .NET unit tests. (#12240)
Adding more and more tests make the tests take longer and longer...
2021-07-27 15:46:03 +02:00
Sebastien Pouliot 1fa43189b5
[generator] Do not generate `BindingImplOptions.Optimizable` when code snippets are provided (#12165)
unless the snippet-based attribute also set the `Optimizable` property.

IOW this is now required to _opt-in_ (to optimize) instead of default,
with no ~easy~ way to turn it off.

Re-enabled each of the `[Dispose]` cases after protecting the required
extra calls they make.

Fix https://github.com/xamarin/xamarin-macios/issues/12150

* Add test for [Dispose] and SnippetAttribute subclasses

* Opt-in all [*Snippet] to be optimizable

This is exactly what we have been shipping for years (no changes).

Unlike [Dispose] there is no change in the generated code or the
optimizations.

Future snippets should come with tests - which is _normal_ for any
manual code (which they are) added to the SDK
2021-07-27 09:36:22 -04:00
Rolf Bjarne Kvinge d1e74874dc [msbuild] Move the CreateIpa target to shared code.
There was a main version of this target for Xamarin.iOS, and then numerous dummy targets for two scenarios:

* Building app extensions.
* Building macOS apps.

The first one is handled by the '_CanArchive' property (will be false when
building app extensions), and for the second case I've added it to the
condition on the CreateIpa target.

This way we don't have to have logic elsewhere about when it's valid to call
CreateIpa.
2021-07-27 14:42:58 +02:00
Rolf Bjarne Kvinge 0c9fff29ff [msbuild] Move a few more properties to the shared files so that they're before they participate in conditions. 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 9158dcc6ff [msbuild] Make code signing required when archiving a macOS or Mac Catalyst app.
We fail later with an uninformative error ('The "Archive" task was not given a
value for the required parameter "SigningKey"') otherwise, and this way the
user doesn't have to manually enable signing to avoid the this error.
2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 1aaf9404ac [msbuild] Don't execute the CollectITunesSourceFiles target on desktop platforms. 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge d22cf7da8c [dotnet] Add unit tests for archiving, package creation and ipa creation. 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 46128ac62e [msbuild] Add dummy CreateIpa target for Mac. 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge d7599050a7 [msbuild] Slightly rework the logic to determine if code signing is required to take Mac Catalyst into account 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 1db432a1bd [msbuild] Share the logic to determine whether a provisioning profile is required 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 38acfafd38 [msbuild] Move/document a few properties related to signing and packaging. 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge a6b10696aa [msbuild] Accept both 'CodeSigningKey' and 'CodesignKey' as synonyms.
This makes it easier to use the same csproj for multiple platforms for customers.
2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge b62b6213e2 [msbuild] Move the EnablePackageSigning variable to shared code.
So that it's set for both macOS and Mac Catalyst.
2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge ea61948502 [msbuild] Merge the EnableSGenConc properties.
We use two different properties for the same thing: MtouchEnableSGenConc and
EnableSGenConc. Going forward, we're sticking with just EnableSGenConc, but
we'll keep accepting MtouchEnableSGenConc if it's set.
2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge a2a2221c5e [msbuild] Unify the IsAppExtension property 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 1e8698ae9b [msbuild] Unify the ArchiveOnBuild property 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 3accf61ffd [msbuild] Unify the _CanOutputAppBundle property. 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 12f49a327e [dotnet] Add the CreateIpa, _CreateInstaller and Archive targets to the things we need to do at build time
* CreateIpa: only executed if 'BuildIpa' is set.
* _CreateInstaller: only executed if 'CreatePackage' is set.
* Archive: only executed if 'ArchiveOnBuild' is set.

We don't do this for inner builds of multi-rid builds, only single-rid builds or
outer builds of multi-rid builds.
2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 7e52c08a52 [msbuild/dotnet] Mac Catalyst entitlements must be embedded in the app signature, not the executable.
Just like they are for macOS apps.
2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 1e496ba458 [msbuild] Move the logic to create .pkg files from Mac-specific target files to shared target files.
Because we need it for Mac Catalyst as well.
2021-07-27 13:52:46 +02:00
dotnet-maestro[bot] edc088ad7b
[main] Update dependencies from dotnet/installer (#12195)
* Update dependencies from https://github.com/dotnet/installer build 20210722.14

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21372.2 -> To Version 6.0.100-rc.1.21372.14

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21372.2 -> To Version 6.0.100-rc.1.21373.26

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21372.2 -> To Version 6.0.100-rc.1.21374.6

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21372.2 -> To Version 6.0.100-rc.1.21376.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-07-27 07:53:27 +02:00
Rolf Bjarne Kvinge 1f8c7130f4
[xtro] Improve the auto-sanitizer. (#12226)
Now with support for auto-sanitizing todo files.
2021-07-27 07:46:04 +02:00
Rolf Bjarne Kvinge abcd04d049
[Foundation] Add EnumDesktop.cs to the API sources to handle it with the generator. (#12223)
This also meant merging the definitions for NSDocumentType.
2021-07-27 07:44:52 +02:00
Rolf Bjarne Kvinge 0549af9736
[dotnet] Add support for the interpreter + AOT when needed. Fixes #11421 and #11724. (#12211)
* Add support for the interpreter everywhere.
* Add support for the AOT compiler everywhere we didn't support it before,
  because the interpreter needs it (at least System.Private.CoreLib.dll must
  be AOT-compiled when using the interpreter).
* Do FullAOT compilation on Mac Catalyst/ARM64 if we're not using the
  interpreter, since we can't use the JIT.
* Fix monotouch-test to be green on Mac Catalyst/ARM64.

Fixes https://github.com/xamarin/xamarin-macios/issues/11724.
Fixes https://github.com/xamarin/xamarin-macios/issues/11421.
2021-07-27 07:39:43 +02:00
Rolf Bjarne Kvinge 52ad560f3b
[monotouch-test] Make CalendarTest.TestOrdinality location-agnostic. Fixes #xamarin/maccore@2471. (#12192)
Modifying the test to use UTC datetimes instead of local datetimes + specify
the timezone for the NSCalendar to make the results predictable everywhere and
at all times.

Fixes https://github.com/xamarin/maccore/issues/2471.
2021-07-27 07:37:15 +02:00
Sebastien Pouliot 2032f4a09a
[tests] Fix introspection results on iOS 15 beta 3 devices (#12232) 2021-07-26 20:31:13 -04:00
Sebastien Pouliot 13b1b3c45a
[tests][macos] Fix protocol failures for introspection on beta 3 (#12233) 2021-07-26 20:29:05 -04:00
Sebastien Pouliot b02f7c8e66
[tests] Fix introspection on macOS 12 (#12234)
This was fixed for iOS 15 but also happens on macOS 12 so the case
was moved into the common, shared test sources.
2021-07-26 20:23:12 -04:00
TJ Lambert 149434de3e
[SafariServices] Update to Xcode13 beta1 (#12102) 2021-07-26 17:29:17 -05:00
Manuel de la Pena d6542dd352
[CI] Update xcode versions to remove. (#12229) 2021-07-26 17:39:25 -04:00
Rolf Bjarne Kvinge c0651c92b1
[dotnet] Put the 'createdump' executable in the app bundle when using CoreCLR. Fixes #11432. (#12210)
So that CoreCLR can create crash dumps.

Fixes https://github.com/xamarin/xamarin-macios/issues/11432.
2021-07-26 16:16:10 +02:00
Manuel de la Pena afe582f91e
[CI] Remove xtro todo files form the static page due to size issues. (#12202) 2021-07-26 10:08:23 -04:00
Rolf Bjarne Kvinge e67f4de7cb
[AppKit/Foundation] Use Foundation's NSUnderlineStyle everywhere except for macOS until XAMCORE_4_0. (#12221) 2021-07-26 15:29:07 +02:00
Sebastien Pouliot 402be91510
[generator] Fix `[PrologueSnippetAttribute]` (#12212)
Lack of mapping results in an error if the attribute is used

```
error BI1055: bgen: Internal error: failed to convert type 'PrologueSnippetAttribute, Xamarin.iOS.BindingAttributes, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
```

Unit test will be added as part of https://github.com/xamarin/xamarin-macios/pull/12165
2021-07-26 09:19:01 -04:00
Rolf Bjarne Kvinge 233675a19d [tools] Always use '__Internal' as the native library for .NET.
This is not the final fix, but this code will be reworked extensively, and
this fix works for now to make the interpreter work.
2021-07-26 15:17:45 +02:00
Rolf Bjarne Kvinge 478b58897f
[AppKit/Foundation] Sprinkle some null allowed. (#12201) 2021-07-26 09:19:48 +02:00
Rolf Bjarne Kvinge 170ab44c7c
[msbuild] Unify the Archive task between iOS and Mac. (#12200)
The iOS version and the Mac version were slightly different in that they were
adding different things to the archive, but both seemed to be resilient to
those files not existing, so I just merged both implementations to try to add
everything to the archive.
2021-07-26 09:19:01 +02:00
Rolf Bjarne Kvinge 561ffb7663
[AppKit/UIKit/Foundation] Use NSWritingDirection from Foundation. Partial fix for #6573. (#12199)
Make the NSWritingDirection enum from Foundation the main version, and
deprecate the others (AppKit.NSWritingDirection,
UIKit.UITextWritingDirection).

This makes things a bit easier with Mac Catalyst, which ships both AppKit and UIKit.

Ref: https://github.com/xamarin/xamarin-macios/issues/6573
2021-07-26 09:10:41 +02:00
Rolf Bjarne Kvinge 8372cda0fa
[msbuild] Remove dead code. (#12198) 2021-07-26 09:09:29 +02:00