Both headers and documentation agree that:
* The TextLists and LineBreakStrategy properties are available in all OS
versions we support, so adjust the availability attributes accordingly.
* While the NSLineBreakStrategy enum is supposedly not available in all OS
versions we support, the NSLineBreakStrategy.PushOut enum value is. This
doesn't make much sense, so I've made our enum available in all OS versions
+ the PushOut enum value as well. All the other enum values are only
available in iOS 14+ (according to docs + headers).
Fixes https://github.com/xamarin/xamarin-macios/issues/19209.
The OneLoc team creates these translations to be consumed later on in
the second step of the Localization process. We need to bring these into
the main branch in order to continue the process.
Co-authored-by: CSIGS@microsoft.com <csigs@users.noreply.github.com>
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
Fixed an issue where the C# class name was coming in with `,
AssemblyName` tacked on the end.
Fixed an issue where a class that had an entry in the map didn't have a
`class_ptr` which was causing an NRE.
Fixed a predicate for deciding when to mark the assembly for save.
Note - for an as yet undetermined reason, the linker is not picking up
that I'm marking the assembly for save, which is why the `true` test
cases are commented out.
This fixes issue 16671 https://github.com/xamarin/xamarin-macios/issues/16671
This fixes makes this rather unhelpful error:
error MSB4018: The "CreateBindingResourcePackage" task failed unexpectedly.
error MSB4018: System.Exception: Could not lstat 'mylib.a': 2
error MSB4018: at Xamarin.Utils.PathUtils.IsSymlink(String file) in /Users/rolf/work/maccore/main/xamarin-macios/tools/common/PathUtils.cs:line 222
error MSB4018: at Xamarin.Utils.PathUtils.IsSymlinkOrContainsSymlinks(String directoryOrFile) in /Users/rolf/work/maccore/main/xamarin-macios/tools/common/PathUtils.cs:line 229
error MSB4018: at Xamarin.MacDev.Tasks.CreateBindingResourcePackageBase.ContainsSymlinks(ITaskItem[] items) in /Users/rolf/work/maccore/main/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackageBase.cs:line 110
error MSB4018: at Xamarin.MacDev.Tasks.CreateBindingResourcePackageBase.Execute() in /Users/rolf/work/maccore/main/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackageBase.cs:line 46
error MSB4018: at Xamarin.MacDev.Tasks.CreateBindingResourcePackage.Execute() in /Users/rolf/work/maccore/main/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackage.cs:line 15
error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
turn into this instead:
error : The NativeResource 'mylib.a' does not exist.
---------
Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
A task item's GetMetadata method will return an empty string if the metadata
isn't available, so make sure to check for both null (which shouldn't really
happen, but just to be safe) and an empty string when detecting whether the
Link metadata is set or not.
Fixes https://github.com/xamarin/xamarin-macios/issues/12783.
---------
Co-authored-by: Alex Soto <alex@alexsoto.me>
The current logic doesn't work on Windows for some reason.
Also avoid extra slash in _StrippedAssemblyDirectory, because
DeviceSpecificIntermediateOutputPath already has a trailing slash.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1864985.
The OneLoc team creates these translations to be consumed later on in
the second step of the Localization process. We need to bring these into
the main branch in order to continue the process.
Co-authored-by: CSIGS@microsoft.com <csigs@users.noreply.github.com>
The OneLoc team creates these translations to be consumed later on in
the second step of the Localization process. We need to bring these into
the main branch in order to continue the process.
---------
Co-authored-by: CSIGS@microsoft.com <csigs@users.noreply.github.com>
The OneLoc team creates these translations to be consumed later on in
the second step of the Localization process. We need to bring these into
the main branch in order to continue the process.
Co-authored-by: CSIGS@microsoft.com <csigs@users.noreply.github.com>
The OneLoc team creates these translations to be consumed later on in
the second step of the Localization process. We need to bring these into
the main branch in order to continue the process.
Co-authored-by: CSIGS@microsoft.com <csigs@users.noreply.github.com>
The documented URL for downloading a script to install .NET
(https://dot.net/v1/dotnet-install.[ps1|sh]) is rather unreliable and fails
quite often. So add support for a fallback URL - which is just the url the
documented URL redirects to - and use that if the main URL doesn't work.
Hopefully this will decrease the number of times the Windows tests fail
because we couldn't download the install script.
We couldn't do universal builds using NativeAOT, because .NET had a sanity
check that was a bit too eager and caused unnecessary build failures. We've
now been able to add an escape hatch to that sanity check, so let's use it.
This makes universal builds using NativeAOT work, so we can also enable/add
corresponding test variations in xharness.
Also ask the runtime to allow SelfContained without a RuntimeIdentifier (the
runtime has an overeager sanity check that doesn't apply to us, so we must
skip it). Fixes#19142.
Fixes https://github.com/xamarin/xamarin-macios/issues/19142.
Fixes https://github.com/xamarin/xamarin-macios/issues/19206.
This pull request updates the following dependencies
## Coherency Updates
The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)
- **Coherency Updates**:
- **Microsoft.NET.ILLink.Tasks**: from 8.0.0-rtm.23509.5 to 8.0.0-rtm.23511.16 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.AspNetCore.App.Ref**: from 8.0.0-rtm.23511.13 to 8.0.0-rtm.23512.10 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.NETCore.App.Ref**: from 8.0.0-rtm.23509.5 to 8.0.0-rtm.23511.16 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.NETCore.App.Ref**: from 8.0.0-rtm.23509.5 to 8.0.0-rtm.23511.16 (parent: Microsoft.Dotnet.Sdk.Internal)
## From https://github.com/dotnet/installer
- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20231013.4
- **Date Produced**: October 13, 2023 7:31:46 PM UTC
- **Commit**: c65382f00216756e0fb192cc2fd6513448d2679d
- **Branch**: refs/heads/release/8.0.1xx
- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rtm.23512.1 to 8.0.100-rtm.23513.4][4]
- **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-rtm.23509.5 to 8.0.0-rtm.23511.16][5]
- **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-rtm.23511.13 to 8.0.0-rtm.23512.10][6]
- **Microsoft.NETCore.App.Ref**: [from 8.0.0-rtm.23509.5 to 8.0.0-rtm.23511.16][5]
- **Microsoft.NETCore.App.Ref**: [from 8.0.0-rtm.23509.5 to 8.0.0-rtm.23511.16][5]
[4]: dfe59b6c4d...c65382f002
[5]: a9cc3c80fe...256bf22a3d
[6]: 4a957dd469...4605c50d7c
This pull request updates the following dependencies
## Coherency Updates
The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)
- **Coherency Updates**:
- **Microsoft.AspNetCore.App.Ref**: from 8.0.0-rtm.23510.7 to 8.0.0-rtm.23511.13 (parent: Microsoft.Dotnet.Sdk.Internal)
## From https://github.com/dotnet/installer
- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20231012.1
- **Date Produced**: October 12, 2023 10:09:53 AM UTC
- **Commit**: dfe59b6c4dec70fef72f18010dc8606ce8fb141a
- **Branch**: refs/heads/release/8.0.1xx
- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rtm.23511.3 to 8.0.100-rtm.23512.1][1]
- **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-rtm.23510.7 to 8.0.0-rtm.23511.13][2]
[1]: b76fe590ac...dfe59b6c4d
[2]: 7ffeb436ad...4a957dd469
Cache:
* Assembly -> assembly name, because Assembly.GetName ().Name is quite slow.
* Token reference -> member lookup, because it takes a non-significant amount
of time to do the lookup each time.
Assembly.GetName ().Name used to be 75% of the time in Runtime.GetINativeObject_Static:
![Screenshot 2023-09-21 at 17 55 07](https://github.com/xamarin/xamarin-macios/assets/249268/87d456a6-9aa6-4a00-8631-d125eb4b70c2)
Text table:
```
| 6.82 s | 100.0% | 0 s | MauiBugiOSInteropPerformance (17191)
| 6.82 s | 100.0% | 0 s | Main Thread 0x4a830e
| 6.82 s | 100.0% | 1.00 ms | xamarin_get_inative_object_static
| 6.80 s | 99.8% | 0 s | wrapper_native_to_managed_ObjCRuntime_Runtime_get_inative_object_static_intptr_sbyte_uint_uint_intptr_
| 6.79 s | 99.6% | 2.00 ms | ObjCRuntime_Runtime_get_inative_object_static_intptr_sbyte_uint_uint_intptr_
| 6.79 s | 99.5% | 3.00 ms | ObjCRuntime_Runtime_GetINativeObject_Static_intptr_sbyte_uint_uint
| 4.23 s | 62.0% | 4.00 ms | ObjCRuntime_Class_ResolveTypeTokenReference_uint
| 4.23 s | 62.0% | 8.00 ms | ObjCRuntime_Class_ResolveTokenReference_uint_uint
| 4.07 s | 59.7% | 0 s | ObjCRuntime_Class_ResolveAssembly_intptr
| 4.07 s | 59.7% | 25.00 ms | ObjCRuntime_Class_TryResolveAssembly_intptr_System_Reflection_Assembly_
| 3.35 s | 49.2% | 22.00 ms | System_Reflection_Assembly_GetName
| 668.00 ms | 9.8% | 0 s | System_AppDomain_GetAssemblies
| 25.00 ms | 0.3% | 25.00 ms | ObjCRuntime_Runtime_StringEquals_intptr_string
| 107.00 ms | 1.5% | 5.00 ms | ObjCRuntime_Class_ResolveModule_System_Reflection_Assembly_uint
| 40.00 ms | 0.5% | 0 s | ObjCRuntime_Class_ResolveToken_System_Reflection_Module_uint
| 1.00 ms | 0.0% | 1.00 ms | plt_ObjCRuntime_Class_ResolveToken_System_Reflection_Module_uint
| 2.54 s | 37.3% | 3.00 ms | ObjCRuntime_Runtime_GetINativeObject_intptr_bool_System_Type_System_Type
| 2.33 s | 34.2% | 1.00 ms | ObjCRuntime_Runtime_LookupINativeObjectImplementation_intptr_System_Type_System_Type_bool
| 2.32 s | 33.9% | 1.00 ms | ObjCRuntime_Runtime_FindProtocolWrapperType_System_Type
| 2.12 s | 31.0% | 1.00 ms | ObjCRuntime_Class_ResolveTypeTokenReference_uint
| 2.12 s | 31.0% | 7.00 ms | ObjCRuntime_Class_ResolveTokenReference_uint_uint
| 2.04 s | 29.9% | 1.00 ms | ObjCRuntime_Class_ResolveAssembly_intptr
| 2.04 s | 29.9% | 13.00 ms | ObjCRuntime_Class_TryResolveAssembly_intptr_System_Reflection_Assembly_
| 1.69 s | 24.8% | 19.00 ms | System_Reflection_Assembly_GetName
| 1.67 s | 24.5% | 9.00 ms | System_Reflection_RuntimeAssembly_GetName_bool
| 872.00 ms | 12.7% | 16.00 ms | System_Reflection_AssemblyName_Create_intptr_string
| 791.00 ms | 11.6% | 1.00 ms | System_Reflection_RuntimeAssembly_GetInfo_System_Reflection_RuntimeAssembly_AssemblyInfoKind
| 319.00 ms | 4.6% | 1.00 ms | System_AppDomain_GetAssemblies
| 14.00 ms | 0.2% | 14.00 ms | ObjCRuntime_Runtime_StringEquals_intptr_string
| 4.00 ms | 0.0% | 4.00 ms | plt_ObjCRuntime_Runtime_StringEquals_intptr_string
| 54.00 ms | 0.7% | 0 s | ObjCRuntime_Class_ResolveModule_System_Reflection_Assembly_uint
| 15.00 ms | 0.2% | 1.00 ms | ObjCRuntime_Class_ResolveToken_System_Reflection_Module_uint
```
and Class.ResolveTokenReference was 90% of the time in Runtime.GetINativeObject_Static:
![Screenshot 2023-09-21 at 17 55 40](https://github.com/xamarin/xamarin-macios/assets/249268/75adc9bf-ca5b-4bc6-96c6-ace4cb39a0d4)
```
| 6.82 s | 100.0% | 0 s | MauiBugiOSInteropPerformance (17191)
| 6.82 s | 100.0% | 0 s | Main Thread 0x4a830e
| 6.82 s | 100.0% | 1.00 ms | xamarin_get_inative_object_static
| 6.80 s | 99.8% | 0 s | wrapper_native_to_managed_ObjCRuntime_Runtime_get_inative_object_static_intptr_sbyte_uint_uint_intptr_
| 6.79 s | 99.6% | 2.00 ms | ObjCRuntime_Runtime_get_inative_object_static_intptr_sbyte_uint_uint_intptr_
| 6.79 s | 99.5% | 3.00 ms | ObjCRuntime_Runtime_GetINativeObject_Static_intptr_sbyte_uint_uint
| 4.23 s | 62.0% | 4.00 ms | ObjCRuntime_Class_ResolveTypeTokenReference_uint
| 4.23 s | 62.0% | 8.00 ms | ObjCRuntime_Class_ResolveTokenReference_uint_uint
| 2.54 s | 37.3% | 3.00 ms | ObjCRuntime_Runtime_GetINativeObject_intptr_bool_System_Type_System_Type
| 2.33 s | 34.2% | 1.00 ms | ObjCRuntime_Runtime_LookupINativeObjectImplementation_intptr_System_Type_System_Type_bool
| 2.32 s | 33.9% | 1.00 ms | ObjCRuntime_Runtime_FindProtocolWrapperType_System_Type
| 2.12 s | 31.0% | 1.00 ms | ObjCRuntime_Class_ResolveTypeTokenReference_uint
| 2.12 s | 31.0% | 7.00 ms | ObjCRuntime_Class_ResolveTokenReference_uint_uint
| 181.00 ms | 2.6% | 4.00 ms | ObjCRuntime_Class_GetTokenReference_System_Type_bool
| 11.00 ms | 0.1% | 0 s | wrapper_managed_to_native_ObjCRuntime_Runtime_xamarin_find_protocol_wrapper_type_uint
| 3.00 ms | 0.0% | 0 s | System_Type_get_IsInterface
| 1.00 ms | 0.0% | 1.00 ms | plt_System_Type_get_IsByRef
| 1.00 ms | 0.0% | 1.00 ms | System_Type_get_IsByRef
| 10.00 ms | 0.1% | 0 s | System_RuntimeType_IsAssignableFrom_System_Type
| 5.00 ms | 0.0% | 0 s | System_Type_get_IsInterface
| 2.00 ms | 0.0% | 0 s | System_Type_get_IsByRef
| 192.00 ms | 2.8% | 3.00 ms | ObjCRuntime_Runtime_ConstructINativeObject_T_REF_intptr_bool_System_Type_ObjCRuntime_Runtime_MissingCtorResolution
| 8.00 ms | 0.1% | 1.00 ms | ObjCRuntime_Runtime_TryGetNSObject_intptr_bool
| 4.00 ms | 0.0% | 1.00 ms | System_RuntimeType_IsSubclassOf_System_Type
| 1.00 ms | 0.0% | 1.00 ms | mono_monitor_enter_v4_fast
| 8.00 ms | 0.1% | 3.00 ms | ObjCRuntime_Runtime_AllocGCHandle_object_System_Runtime_InteropServices_GCHandleType
| 1.00 ms | 0.0% | 1.00 ms | plt_ObjCRuntime_Runtime_AllocGCHandle_object_System_Runtime_InteropServices_GCHandleType
| 9.00 ms | 0.1% | 0 s | mono_threads_detach_coop
| 5.00 ms | 0.0% | 0 s | mono_threads_attach_coop
| 12.00 ms | 0.1% | 1.00 ms | xamarin_gchandle_unwrap
```
There's some overlap here - the Assembly.GetName ().Name cache would be redundant if it was only called from Class.ResolveTokenReference - but since it's called in more places (it still shows up in profiles once Class.ResolveTokenReference is cached), I kept both caches.
Fixes https://github.com/xamarin/xamarin-macios/issues/19079.
---------
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
This pull request updates the following dependencies
## Coherency Updates
The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)
- **Coherency Updates**:
- **Microsoft.NET.ILLink.Tasks**: from 8.0.0-rc.2.23469.9 to 8.0.0-rtm.23509.5 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.AspNetCore.App.Ref**: from 8.0.0-rtm.23470.10 to 8.0.0-rtm.23510.7 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.NETCore.App.Ref**: from 8.0.0-rc.2.23469.9 to 8.0.0-rtm.23509.5 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: from 8.0.0-rc.2.23463.1 to 8.0.0-rtm.23504.4 (parent: Microsoft.NETCore.App.Ref)
- **Microsoft.NETCore.App.Ref**: from 8.0.0-rc.2.23469.9 to 8.0.0-rtm.23509.5 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.DotNet.Cecil**: from 0.11.4-alpha.23461.1 to 0.11.4-alpha.23502.1 (parent: Microsoft.NETCore.App.Ref)
## From https://github.com/dotnet/installer
- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20231011.3
- **Date Produced**: October 11, 2023 9:13:56 PM UTC
- **Commit**: b76fe590ac588baa9fcf0a47b937b21c705a7687
- **Branch**: refs/heads/release/8.0.1xx
- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rtm.23470.21 to 8.0.100-rtm.23511.3][1]
- **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-rc.2.23469.9 to 8.0.0-rtm.23509.5][2]
- **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-rtm.23470.10 to 8.0.0-rtm.23510.7][3]
- **Microsoft.NETCore.App.Ref**: [from 8.0.0-rc.2.23469.9 to 8.0.0-rtm.23509.5][2]
- **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: [from 8.0.0-rc.2.23463.1 to 8.0.0-rtm.23504.4][4]
- **Microsoft.NETCore.App.Ref**: [from 8.0.0-rc.2.23469.9 to 8.0.0-rtm.23509.5][2]
- **Microsoft.DotNet.Cecil**: [from 0.11.4-alpha.23461.1 to 0.11.4-alpha.23502.1][5]
[1]: 34e6dab21e...b76fe590ac
[2]: 575843df1a...a9cc3c80fe
[3]: 470af14260...7ffeb436ad
[4]: 1999c8c8ab...0c28b5cfe0
[5]: a112f15aa0...64a8874f3c
"IsHotRestartBuild" is an MSBuild global property set by the VS
extension or manually when running a CLI build, however for multi target
frameworks builds it could happen that if the global value has been set
to true, it will remain true for all the inner builds and affect other
target frameworks that are not compatible with Hot Restart (e.g:
MacCatalyst).
This commit adds an extra target "_DetectBuildType", which will set the
correct value for "IsHotRestartBuild" and "IsRemoteBuild", so any other
target that uses those properties can be sure that the values are the
right ones for the current build run.
Fixes Bug #1886158 - [MAUI][.NET8] MAUI/MAUI Blazor project build on
local device failed with error 'The "CompileAppManifest" task failed
unexpectedly'.:
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1886158
"IsHotRestartBuild" is an MSBuild global property set by the VS
extension or manually when running a CLI build, however for multi target
frameworks builds it could happen that if the global value has been set
to true, it will remain true for all the inner builds and affect other
target frameworks that are not compatible with Hot Restart (e.g:
MacCatalyst).
This commit adds an extra target "_DetectBuildType", which will set the
correct value for "IsHotRestartBuild" and "IsRemoteBuild", so any other
target that uses those properties can be sure that the values are the
right ones for the current build run.
Fixes Bug #1886158 - [MAUI][.NET8] MAUI/MAUI Blazor project build on
local device failed with error 'The "CompileAppManifest" task failed
unexpectedly'.:
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1886158
Backport of #19103
Co-authored-by: Mauro Agnoletti <mauro.agnoletti@gmail.com>