From 5add8c524b43ff7a256d625cbe1eb4dd3b953e35 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 24 Feb 2022 16:51:12 +0100 Subject: [PATCH] [runtime] Remove ObjCRuntime.nfloat in favor of System.Runtime.InteropServices.NFloat. (#14197) * Remove ObjCRuntime.nfloat (in favor of System.Runtime.InteropServices.NFloat). * Automatically add a reference to the System.Runtime.InteropServices.Internal package, so that developers get the new NFloat API (with operators) we've added post .NET 6 (but don't do this for .NET 7). * Automatically add a global using alias for System.Runtime.InteropServices.NFloat -> nfloat. This is not behind the usual `ImplicitUsings` condition our other implicit usings are, because they're off by default for existing projects, and the main target for the global using alias for nfloat is upgraded projects. * Automatically generate a global using alias (like above) in the generator for all code the generator compiles. * Update xtro entries to reference System.Runtime.InteropServices.NFloat instead of ObjCRuntime.nfloat. * Add a workaround for a hopefully temporary issue with .NET/CoreCLR where the wrong runtime pack is selected otherwise (without the new NFloat API, so nothing works at runtime). Ref: https://github.com/xamarin/xamarin-macios/issues/13087 --- Make.config | 8 +++++ .../package-download/download-packages.proj | 3 ++ dotnet/BreakingChanges.md | 26 ++++++++++---- ...atalyst.Sdk.ImplicitNamespaceImports.props | 10 ++++++ ...oft.iOS.Sdk.ImplicitNamespaceImports.props | 10 ++++++ ...t.macOS.Sdk.ImplicitNamespaceImports.props | 10 ++++++ ...ft.tvOS.Sdk.ImplicitNamespaceImports.props | 10 ++++++ .../Xamarin.Shared.Sdk.DefaultItems.targets | 32 +++++++++++++++++ dotnet/targets/Xamarin.Shared.Sdk.targets | 5 +++ .../Tasks/BTouchTaskBase.cs | 5 +++ msbuild/Xamarin.Shared/Xamarin.Shared.targets | 1 + runtime/trampolines.m | 2 +- src/Makefile | 2 +- src/NativeTypes/Primitives.tt | 7 ++-- src/ObjCRuntime/NFloat.cs | 7 ++++ src/ObjCRuntime/Registrar.cs | 4 +-- src/ObjCRuntime/Stret.cs | 8 ++++- src/README.md | 5 +-- src/SceneKit/SCNMatrix4_dotnet.cs | 2 +- src/SceneKit/SCNQuaternion.cs | 2 +- src/SceneKit/SCNVector3.cs | 2 +- src/SceneKit/SCNVector4.cs | 2 +- src/btouch.cs | 18 ++++++++++ src/frameworks.sources | 1 + src/generator-typemanager.cs | 3 +- src/generator.cs | 4 +++ src/glkit.cs | 2 +- src/spritekit.cs | 2 +- tests/generator/BGenTests.cs | 11 ++++++ tests/generator/tests/nfloat.cs | 18 ++++++++++ tests/introspection/ApiSignatureTest.cs | 2 +- .../monotouch-test/SceneKit/SCNMatrixTest.cs | 2 +- .../MacCatalyst-UIKit.todo | 8 ++--- .../common-MetalKit.ignore | 2 +- .../api-annotations-dotnet/iOS-UIKit.ignore | 8 ++--- .../macOS-AppKit.ignore | 34 +++++++++---------- .../macOS-MetalKit.ignore | 2 +- .../api-annotations-dotnet/tvOS-UIKit.ignore | 8 ++--- tools/common/StaticRegistrar.cs | 2 +- tools/mmp/Makefile | 8 ++--- tools/mtouch/Makefile | 2 +- 41 files changed, 236 insertions(+), 64 deletions(-) create mode 100644 src/ObjCRuntime/NFloat.cs create mode 100644 tests/generator/tests/nfloat.cs diff --git a/Make.config b/Make.config index a1aafd628135..19143488abea 100644 --- a/Make.config +++ b/Make.config @@ -565,6 +565,14 @@ DOTNET6_DIR=$(abspath $(TOP)/builds/downloads/$(basename $(basename $(DOTNET6_TA DOTNET6=$(DOTNET6_DIR)/dotnet DOTNET6_BCL_DIR:=$(abspath $(TOP)/builds/downloads/microsoft.netcore.app.ref/$(DOTNET6_BCL_VERSION)/ref/net6.0) +# Use the System.Runtime.InteropServices.NFloat.Internal package to get the System.Runtime.InteropServices.dll reference assembly for +# .NET 6. This is no longer needed for .NET 7, when we can switch back to the usual BCL reference assemblies. +ifeq ($(DOTNET_TFM),net6.0) +DOTNET_SYSTEM_RUNTIME_INTEROPSERVICES_REF_ASSEMBLY_DIR:=$(abspath $(TOP)/builds/downloads/system.runtime.interopservices.nfloat.internal/6.0.1/ref/net6.0) +else +DOTNET_SYSTEM_RUNTIME_INTEROPSERVICES_REF_ASSEMBLY_DIR:=$(DOTNET6_BCL_DIR) +endif + # The sdk version band has the last two digits set to 0: https://github.com/dotnet/sdk/blob/22c4860dcb2cf6b123dd641cc4a87a50380759d5/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs#L52-L53 DOTNET_MANIFEST_VERSION_BAND=$(shell echo $(DOTNET6_VERSION_BAND) | sed 's/..$$/00/') # We must do the same for our version band: the last two digits must be set to 0. diff --git a/builds/package-download/download-packages.proj b/builds/package-download/download-packages.proj index f69c9244f911..e02f7d3ccff8 100644 --- a/builds/package-download/download-packages.proj +++ b/builds/package-download/download-packages.proj @@ -19,6 +19,9 @@ + + + diff --git a/dotnet/BreakingChanges.md b/dotnet/BreakingChanges.md index a1ff9ceb0761..eae781f55529 100644 --- a/dotnet/BreakingChanges.md +++ b/dotnet/BreakingChanges.md @@ -40,17 +40,29 @@ favor of the C# 9 `nint` and `nuint` types (these map to `System.IntPtr` and Reference: https://github.com/xamarin/xamarin-macios/issues/10508 -## System.nfloat moved to ObjCRuntime.nfloat +## Removed `System.nfloat` -The `nfloat` type moved from the `System` namespace to the `ObjCRuntime` namespace. +The `System.nfloat` type has been removed in favor of the +`System.Runtime.InteropServices.NFloat` type. -* Code that references the `nfloat` type might not compile unless the `ObjCRuntime` namespace is imported. +In order to make existing code compile as much as possible, we're adding a +global using directive to C# projects, so that using `nfloat` as a type name +continues to work: - Fix: add `using ObjCRuntime` to the file in question. +```csharp +global using nfloat = System.Runtime.InteropServices.NFloat; +``` + +If this global using directive is undesirable, it can be turned off by setting +a `NoNFloatUsing=true` property in the project file. -* Code that references the full typename, `System.nfloat` won't compile. +There are a few other source code incompatibilities: - Fix: use `ObjCRuntime.nfloat` instead. +* Any code that refers to the full typename (`System.nfloat`) will have to be + modified to just use `nfloat`, or the new full typename + (`System.Runtime.InteropServices.NFloat`). +* The `nfloat.CopyArray` methods don't exist in `NFloat`. The code needs to be + rewritten to use `Buffer.CopyMemory` instead. ## System.NMath moved to ObjCRuntime.NMath @@ -58,7 +70,7 @@ The `NMath` type moved from the `System` namespace to the `ObjCRuntime` namespac * Code that uses the `NMath` type won't compile unless the `ObjCRuntime` namespace is imported. - Fix: add `using ObjCRuntime` to the file in question. + Fix: add `using ObjCRuntime` to the file in question, or as a global using directive. ## NSObject.Handle and INativeObject.Handle changed type from System.IntPtr to ObjCRuntime.NativeHandle diff --git a/dotnet/targets/Microsoft.MacCatalyst.Sdk.ImplicitNamespaceImports.props b/dotnet/targets/Microsoft.MacCatalyst.Sdk.ImplicitNamespaceImports.props index 77fc106cb39a..aad258599e04 100644 --- a/dotnet/targets/Microsoft.MacCatalyst.Sdk.ImplicitNamespaceImports.props +++ b/dotnet/targets/Microsoft.MacCatalyst.Sdk.ImplicitNamespaceImports.props @@ -27,4 +27,14 @@ + + + + + diff --git a/dotnet/targets/Microsoft.iOS.Sdk.ImplicitNamespaceImports.props b/dotnet/targets/Microsoft.iOS.Sdk.ImplicitNamespaceImports.props index c1ab2872462e..03c23ccb6819 100644 --- a/dotnet/targets/Microsoft.iOS.Sdk.ImplicitNamespaceImports.props +++ b/dotnet/targets/Microsoft.iOS.Sdk.ImplicitNamespaceImports.props @@ -27,4 +27,14 @@ + + + + + diff --git a/dotnet/targets/Microsoft.macOS.Sdk.ImplicitNamespaceImports.props b/dotnet/targets/Microsoft.macOS.Sdk.ImplicitNamespaceImports.props index 3f50cbefffb1..065407c86be6 100644 --- a/dotnet/targets/Microsoft.macOS.Sdk.ImplicitNamespaceImports.props +++ b/dotnet/targets/Microsoft.macOS.Sdk.ImplicitNamespaceImports.props @@ -27,4 +27,14 @@ + + + + + diff --git a/dotnet/targets/Microsoft.tvOS.Sdk.ImplicitNamespaceImports.props b/dotnet/targets/Microsoft.tvOS.Sdk.ImplicitNamespaceImports.props index 73a6d0ce5cf4..d1d4165c4578 100644 --- a/dotnet/targets/Microsoft.tvOS.Sdk.ImplicitNamespaceImports.props +++ b/dotnet/targets/Microsoft.tvOS.Sdk.ImplicitNamespaceImports.props @@ -27,4 +27,14 @@ + + + + + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets b/dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets index c6b68bd636bc..0ab89f6128d0 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets @@ -109,4 +109,36 @@ + + + + + + + + + 6.0.3 + + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index d292eba68522..18ba0aad11f0 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -1030,6 +1030,11 @@ <_GeneratorAttributeAssembly>$(_XamarinSdkRootDirectory)/tools/lib/Xamarin.Apple.BindingAttributes.dll <_DotNetCscCompiler>$(RoslynTargetsPath)/bincore/csc.dll + + + <_BTouchCompileCommand Include="$(DOTNET_HOST_PATH)" /> + <_BTouchCompileCommand Include="$(RoslynTargetsPath)/bincore/csc.dll" /> + diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs index 8d028d82379a..ddc7434fb543 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs @@ -55,6 +55,8 @@ public abstract class BTouchTaskBase : XamarinToolTask { public string Namespace { get; set; } + public bool NoNFloatUsing { get; set; } + public ITaskItem[] NativeLibraries { get; set; } public string OutputAssembly { get; set; } @@ -156,6 +158,9 @@ protected override string GenerateCommandLineCommands () cmd.AddQuotedSwitchIfNotNull ("/ns:", Namespace); + if (NoNFloatUsing) + cmd.Add ("/no-nfloat-using:true"); + if (!string.IsNullOrEmpty (DefineConstants)) { var strv = DefineConstants.Split (new [] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (var str in strv) diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.targets b/msbuild/Xamarin.Shared/Xamarin.Shared.targets index a27769540405..082f5d86e963 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.targets @@ -1584,6 +1584,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. GeneratedSourcesDir="$(GeneratedSourcesDir)" GeneratedSourcesFileList="$(_GeneratedSourcesFileList)" Namespace="$(Namespace)" + NoNFloatUsing="$(NoNFloatUsing)" OutputAssembly="$(OutputAssembly)" ProcessEnums="$(ProcessEnums)" ProjectDir="$(MSBuildProjectDirectory)" diff --git a/runtime/trampolines.m b/runtime/trampolines.m index d20b94ee34c3..ad410fadd587 100644 --- a/runtime/trampolines.m +++ b/runtime/trampolines.m @@ -1522,7 +1522,7 @@ #endif func = to_managed ? (void *) xamarin_nsnumber_to_nuint : (void *) xamarin_nuint_to_nsnumber; #if DOTNET - } else if (!strcmp (fullname, "ObjCRuntime.nfloat")) { + } else if (!strcmp (fullname, "System.Runtime.InteropServices.NFloat")) { #else } else if (!strcmp (fullname, "System.nfloat")) { #endif diff --git a/src/Makefile b/src/Makefile index 479839244f69..dc2dc56d6eaf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -52,7 +52,7 @@ DOTNET_REFERENCES = \ /r:$(DOTNET6_BCL_DIR)/System.Runtime.dll \ /r:$(DOTNET6_BCL_DIR)/System.Runtime.CompilerServices.Unsafe.dll \ /r:$(DOTNET6_BCL_DIR)/System.Runtime.Extensions.dll \ - /r:$(DOTNET6_BCL_DIR)/System.Runtime.InteropServices.dll \ + /r:$(DOTNET_SYSTEM_RUNTIME_INTEROPSERVICES_REF_ASSEMBLY_DIR)/System.Runtime.InteropServices.dll \ /r:$(DOTNET6_BCL_DIR)/System.Security.Cryptography.X509Certificates.dll \ /r:$(DOTNET6_BCL_DIR)/System.Text.RegularExpressions.dll \ /r:$(DOTNET6_BCL_DIR)/System.Threading.dll \ diff --git a/src/NativeTypes/Primitives.tt b/src/NativeTypes/Primitives.tt index 001643183f56..e78013356d2f 100644 --- a/src/NativeTypes/Primitives.tt +++ b/src/NativeTypes/Primitives.tt @@ -32,10 +32,7 @@ <#@ import namespace="System" #> <#@ import namespace="System.Collections.Generic" #> -#if NET -#define SKIP_nint -#define SKIP_nuint -#endif +#if !NET using System; using System.ComponentModel; @@ -454,3 +451,5 @@ namespace System #endif // !SKIP_<#= type.NSName #> } <# } #> + +#endif // !NET diff --git a/src/ObjCRuntime/NFloat.cs b/src/ObjCRuntime/NFloat.cs new file mode 100644 index 000000000000..e873f1a0e4e7 --- /dev/null +++ b/src/ObjCRuntime/NFloat.cs @@ -0,0 +1,7 @@ +#if NET + +#if !(MTOUCH || MMP || BUNDLER) +global using nfloat = System.Runtime.InteropServices.NFloat; +#endif + +#endif // NET diff --git a/src/ObjCRuntime/Registrar.cs b/src/ObjCRuntime/Registrar.cs index c3e51b2f4bb1..56df5844da85 100644 --- a/src/ObjCRuntime/Registrar.cs +++ b/src/ObjCRuntime/Registrar.cs @@ -89,9 +89,9 @@ abstract partial class Registrar { #endif #if MMP || MTOUCH || BUNDLER - static string NFloatTypeName { get => Driver.IsDotNet ? "ObjCRuntime.nfloat" : "System.nfloat"; } + static string NFloatTypeName { get => Driver.IsDotNet ? "System.Runtime.InteropServices.NFloat" : "System.nfloat"; } #elif NET - const string NFloatTypeName = "ObjCRuntime.nfloat"; + const string NFloatTypeName = "System.Runtime.InteropServices.NFloat"; #else const string NFloatTypeName = "System.nfloat"; #endif diff --git a/src/ObjCRuntime/Stret.cs b/src/ObjCRuntime/Stret.cs index 9868edbbca02..2a7e36501c20 100644 --- a/src/ObjCRuntime/Stret.cs +++ b/src/ObjCRuntime/Stret.cs @@ -229,12 +229,18 @@ static bool IsBuiltInType (Type type, bool is_64_bits, out int type_size) #if NET if (type.Namespace == "ObjCRuntime") { switch (type.Name) { - case "nfloat": case "NativeHandle": type_size = is_64_bits ? 8 : 4; return true; } return false; + } else if (type.Namespace == "System.Runtime.InteropServices") { + switch (type.Name) { + case "NFloat": + type_size = is_64_bits ? 8 : 4; + return true; + } + return false; } #endif diff --git a/src/README.md b/src/README.md index cef8d3d63470..e0bab7d651f1 100644 --- a/src/README.md +++ b/src/README.md @@ -106,8 +106,9 @@ We have introduced 6 new types to make this possible: | `CGRect` | `System.Drawing.RectangleF` | `CoreGraphics.CGRect` | In the Classic assembly, the `System.Drawing` types are backed by the 32-bit -`System.Single` type. In the Unified assemblies, the `CoreGraphics` types -are backed by 32/64-bit `System.nfloat` type (`ObjCRuntime.nfloat` in .NET). +`System.Single` type. In the Unified assemblies, the `CoreGraphics` types are +backed by 32/64-bit `System.nfloat` type +(`System.Runtime.InteropServices.NFloat` in .NET). #### Enums #### diff --git a/src/SceneKit/SCNMatrix4_dotnet.cs b/src/SceneKit/SCNMatrix4_dotnet.cs index 0668a00fda40..0bc1f3151650 100644 --- a/src/SceneKit/SCNMatrix4_dotnet.cs +++ b/src/SceneKit/SCNMatrix4_dotnet.cs @@ -45,7 +45,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #if PFLOAT_SINGLE using pfloat = System.Single; #else -using pfloat = ObjCRuntime.nfloat; +using pfloat = System.Runtime.InteropServices.NFloat; #endif #nullable enable diff --git a/src/SceneKit/SCNQuaternion.cs b/src/SceneKit/SCNQuaternion.cs index 62326b229025..38bdf73f8724 100644 --- a/src/SceneKit/SCNQuaternion.cs +++ b/src/SceneKit/SCNQuaternion.cs @@ -39,7 +39,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #if MONOMAC #if NET -using pfloat = ObjCRuntime.nfloat; +using pfloat = System.Runtime.InteropServices.NFloat; #else using pfloat = System.nfloat; #endif diff --git a/src/SceneKit/SCNVector3.cs b/src/SceneKit/SCNVector3.cs index 2a8f3065b9bd..3c04c332182b 100644 --- a/src/SceneKit/SCNVector3.cs +++ b/src/SceneKit/SCNVector3.cs @@ -42,7 +42,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #if MONOMAC #if NET -using pfloat = ObjCRuntime.nfloat; +using pfloat = System.Runtime.InteropServices.NFloat; #else using pfloat = System.nfloat; #endif diff --git a/src/SceneKit/SCNVector4.cs b/src/SceneKit/SCNVector4.cs index db84cc85c287..159479bd7e95 100644 --- a/src/SceneKit/SCNVector4.cs +++ b/src/SceneKit/SCNVector4.cs @@ -43,7 +43,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #if MONOMAC #if NET -using pfloat = ObjCRuntime.nfloat; +using pfloat = System.Runtime.InteropServices.NFloat; #else using pfloat = System.nfloat; #endif diff --git a/src/btouch.cs b/src/btouch.cs index 7066090ac2a7..5bfd4e00ae2c 100644 --- a/src/btouch.cs +++ b/src/btouch.cs @@ -229,6 +229,7 @@ int Main3 (string [] args) var defines = new List (); string? generate_file_list = null; bool process_enums = false; + bool noNFloatUsing = false; ErrorHelper.ClearWarningLevels (); @@ -316,6 +317,10 @@ int Main3 (string [] args) } } }, + { "no-nfloat-using:", "If a global using alias directive for 'nfloat = System.Runtime.InteropServices.NFloat' should automatically be created.", (v) => { + noNFloatUsing = string.Equals ("true", v, StringComparison.OrdinalIgnoreCase) || string.IsNullOrEmpty (v); + } + }, new Mono.Options.ResponseFileSource (), }; @@ -466,6 +471,14 @@ int Main3 (string [] args) if (!string.IsNullOrEmpty (Path.GetDirectoryName (baselibdll))) cargs.Add ("-lib:" + Path.GetDirectoryName (baselibdll)); +#if NET + var tmpusing = Path.Combine (tmpdir, "GlobalUsings.g.cs"); + if (!noNFloatUsing) { + File.WriteAllText (tmpusing, "global using nfloat = global::System.Runtime.InteropServices.NFloat;\n"); + cargs.Add (tmpusing); + } +#endif + Compile (cargs, 2); universe = new MetadataLoadContext ( @@ -592,6 +605,11 @@ int Main3 (string [] args) if (!string.IsNullOrEmpty (Path.GetDirectoryName (baselibdll))) cargs.Add ("-lib:" + Path.GetDirectoryName (baselibdll)); +#if NET + if (!noNFloatUsing) + cargs.Add (tmpusing); +#endif + Compile (cargs, 1000); } finally { if (delete_temp) diff --git a/src/frameworks.sources b/src/frameworks.sources index 3f0f9913f0dc..0c95939405ed 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1859,6 +1859,7 @@ SHARED_CORE_SOURCES = \ ObjCRuntime/LinkWithAttribute.cs \ ObjCRuntime/NativeAttribute.cs \ ObjCRuntime/NativeHandle.cs \ + ObjCRuntime/NFloat.cs \ ObjCRuntime/ObsoleteConstants.cs \ ObjCRuntime/PlatformAvailability.cs \ ObjCRuntime/PlatformAvailability2.cs \ diff --git a/src/generator-typemanager.cs b/src/generator-typemanager.cs index a2da5344a701..a436a8e5ad6a 100644 --- a/src/generator-typemanager.cs +++ b/src/generator-typemanager.cs @@ -194,7 +194,8 @@ public void Initialize (BindingTouch binding_touch, Assembly api, Assembly corli #if NET System_nint = Lookup (corlib_assembly, "System", "IntPtr"); System_nuint = Lookup (corlib_assembly, "System", "UIntPtr"); - System_nfloat = Lookup (platform_assembly, "ObjCRuntime", "nfloat"); + var interop_assembly = binding_touch.universe.LoadFromAssemblyName ("System.Runtime.InteropServices"); + System_nfloat = Lookup (interop_assembly, "System.Runtime.InteropServices", "NFloat"); #else System_nint = Lookup (platform_assembly, "System", "nint"); System_nuint = Lookup (platform_assembly, "System", "nuint"); diff --git a/src/generator.cs b/src/generator.cs index 6da0ab735197..d223d1fbcd54 100644 --- a/src/generator.cs +++ b/src/generator.cs @@ -1128,6 +1128,8 @@ public string PrimitiveType (Type t, bool formatted = false) return "bool"; if (t == TypeManager.System_Char) return "char"; + if (t == TypeManager.System_nfloat) + return "nfloat"; return formatted ? FormatType (null, t) : t.Name; } @@ -3628,6 +3630,8 @@ public string FormatTypeUsedIn (string usedInNamespace, Type type, bool protocol return "nuint"; if (type == TypeManager.System_Char) return "char"; + if (type == TypeManager.System_nfloat) + return "nfloat"; if (type.IsArray) return FormatTypeUsedIn (usedInNamespace, type.GetElementType ()) + "[" + new string (',', type.GetArrayRank () - 1) + "]"; diff --git a/src/glkit.cs b/src/glkit.cs index ee496e1c041d..ca60ff05cf6e 100644 --- a/src/glkit.cs +++ b/src/glkit.cs @@ -47,7 +47,7 @@ #if MONOMAC #if NET -using pfloat = ObjCRuntime.nfloat; +using pfloat = System.Runtime.InteropServices.NFloat; #else using pfloat = System.nfloat; #endif diff --git a/src/spritekit.cs b/src/spritekit.cs index 1223f0d2555b..052c2e6f5f9b 100644 --- a/src/spritekit.cs +++ b/src/spritekit.cs @@ -54,7 +54,7 @@ using UIImage = global::AppKit.NSImage; using UIView = global::AppKit.NSView; #if NET -using pfloat = ObjCRuntime.nfloat; +using pfloat = System.Runtime.InteropServices.NFloat; #else using pfloat = System.nfloat; #endif diff --git a/tests/generator/BGenTests.cs b/tests/generator/BGenTests.cs index 0735cfcae6aa..85e39eca2298 100644 --- a/tests/generator/BGenTests.cs +++ b/tests/generator/BGenTests.cs @@ -878,6 +878,17 @@ public void NativeIntDelegates () verifyDelegate ("NSTableViewColumnRowPredicate"); } + [Test] + public void NFloatType () + { + var bgen = BuildFile (Profile.iOS, "tests/nfloat.cs"); + + var messaging = bgen.ApiAssembly.MainModule.Types.FirstOrDefault (v => v.Name == "Messaging"); + Assert.IsNotNull (messaging, "Messaging"); + var pinvoke = messaging.Methods.FirstOrDefault (v => v.Name == "xamarin_nfloat_objc_msgSend_exception"); + Assert.IsNotNull (pinvoke, "PInvoke"); + } + BGenTool BuildFile (Profile profile, params string [] filenames) { return BuildFile (profile, true, false, filenames); diff --git a/tests/generator/tests/nfloat.cs b/tests/generator/tests/nfloat.cs new file mode 100644 index 000000000000..636548d3b4d4 --- /dev/null +++ b/tests/generator/tests/nfloat.cs @@ -0,0 +1,18 @@ +using System; + +using Foundation; +using ObjCRuntime; + +namespace NS { + [BaseType (typeof (NSObject))] + interface MyObject { + [Export ("something:")] + nfloat Something (nfloat something); + + [Export ("someProperty")] + nfloat SomeProperty { get; set; } + + [Export ("exceptionyProperty")] + nfloat ExceptionyProperty { [MarshalNativeExceptions] get; [MarshalNativeExceptions] set; } + } +} diff --git a/tests/introspection/ApiSignatureTest.cs b/tests/introspection/ApiSignatureTest.cs index 9f01f52cb682..c629c6dd01f1 100644 --- a/tests/introspection/ApiSignatureTest.cs +++ b/tests/introspection/ApiSignatureTest.cs @@ -38,7 +38,7 @@ namespace Introspection { public abstract class ApiSignatureTest : ApiBaseTest { #if NET - const string NFloatTypeName = "ObjCRuntime.nfloat"; + const string NFloatTypeName = "System.Runtime.InteropServices.NFloat"; #else const string NFloatTypeName = "System.nfloat"; #endif diff --git a/tests/monotouch-test/SceneKit/SCNMatrixTest.cs b/tests/monotouch-test/SceneKit/SCNMatrixTest.cs index 418d2316c657..7f10d5a9d829 100644 --- a/tests/monotouch-test/SceneKit/SCNMatrixTest.cs +++ b/tests/monotouch-test/SceneKit/SCNMatrixTest.cs @@ -30,7 +30,7 @@ #if __MACOS__ #if NET -using pfloat = ObjCRuntime.nfloat; +using pfloat = System.Runtime.InteropServices.NFloat; #else using pfloat = System.nfloat; #endif diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.todo index c069583f22fc..6f690b3b07d5 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.todo @@ -1,7 +1,7 @@ !extra-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewDataSource::GetIndexPath(UIKit.UICollectionView,System.String,System.IntPtr)' has a extraneous [NullAllowed] on return type -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2 -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #3 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #3 !extra-null-allowed! 'System.Boolean UIKit.UIApplication::CanOpenUrl(Foundation.NSUrl)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.IntPtr Foundation.NSAttributedString::InitWithURL(Foundation.NSUrl,Foundation.NSDictionary,Foundation.NSDictionary&,Foundation.NSError&)' has a extraneous [NullAllowed] on parameter #1 !extra-null-allowed! 'System.Void Foundation.NSAttributedString::.ctor(Foundation.NSData,Foundation.NSDictionary,Foundation.NSDictionary&,Foundation.NSError&)' has a extraneous [NullAllowed] on parameter #1 @@ -177,7 +177,7 @@ !missing-null-allowed! 'System.Void UIKit.UIResponder::PressesChanged(Foundation.NSSet`1,UIKit.UIPressesEvent)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIResponder::PressesEnded(Foundation.NSSet`1,UIKit.UIPressesEvent)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIScene::set_Title(System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingEnded(UIKit.UIScrollView,UIKit.UIView,ObjCRuntime.nfloat)' is missing an [NullAllowed] on parameter #1 +!missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingEnded(UIKit.UIScrollView,UIKit.UIView,System.Runtime.InteropServices.NFloat)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingStarted(UIKit.UIScrollView,UIKit.UIView)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UISearchBar::_SetScopeBarButtonTitle(Foundation.NSDictionary,UIKit.UIControlState)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void UIKit.UISearchTextField::set_TokenBackgroundColor(UIKit.UIColor)' is missing an [NullAllowed] on parameter #0 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-MetalKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-MetalKit.ignore index 3536a0d8136d..6c43ee878db6 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-MetalKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-MetalKit.ignore @@ -1,7 +1,7 @@ # Initial result from new rule missing-release-attribute-on-return-value !missing-release-attribute-on-return-value! Metal.IMTLTexture MetalKit.MTKTextureLoader::FromCGImage(CoreGraphics.CGImage,Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTextureWithCGImage:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! Metal.IMTLTexture MetalKit.MTKTextureLoader::FromData(Foundation.NSData,Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTextureWithData:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. -!missing-release-attribute-on-return-value! Metal.IMTLTexture MetalKit.MTKTextureLoader::FromName(System.String,ObjCRuntime.nfloat,Foundation.NSBundle,Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTextureWithName:scaleFactor:bundle:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. +!missing-release-attribute-on-return-value! Metal.IMTLTexture MetalKit.MTKTextureLoader::FromName(System.String,System.Runtime.InteropServices.NFloat,Foundation.NSBundle,Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTextureWithName:scaleFactor:bundle:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! Metal.IMTLTexture MetalKit.MTKTextureLoader::FromTexture(ModelIO.MDLTexture,Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTextureWithMDLTexture:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! Metal.IMTLTexture MetalKit.MTKTextureLoader::FromUrl(Foundation.NSUrl,Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTextureWithContentsOfURL:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! Metal.IMTLTexture[] MetalKit.MTKTextureLoader::FromUrls(Foundation.NSUrl[],Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTexturesWithContentsOfURLs:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore index 4e8f0696f026..9db642bc8b2f 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore @@ -56,9 +56,9 @@ # Initial result from new rule extra-null-allowed !extra-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewDataSource::GetIndexPath(UIKit.UICollectionView,System.String,System.IntPtr)' has a extraneous [NullAllowed] on return type -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2 -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #3 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #3 !extra-null-allowed! 'System.Boolean UIKit.UIApplication::CanOpenUrl(Foundation.NSUrl)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.IntPtr Foundation.NSAttributedString::InitWithURL(Foundation.NSUrl,Foundation.NSDictionary,Foundation.NSDictionary&,Foundation.NSError&)' has a extraneous [NullAllowed] on parameter #1 !extra-null-allowed! 'System.Void Foundation.NSAttributedString::.ctor(Foundation.NSData,Foundation.NSDictionary,Foundation.NSDictionary&,Foundation.NSError&)' has a extraneous [NullAllowed] on parameter #1 @@ -236,7 +236,7 @@ !missing-null-allowed! 'System.Void UIKit.UIResponder::PressesChanged(Foundation.NSSet`1,UIKit.UIPressesEvent)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIResponder::PressesEnded(Foundation.NSSet`1,UIKit.UIPressesEvent)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIScene::set_Title(System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingEnded(UIKit.UIScrollView,UIKit.UIView,ObjCRuntime.nfloat)' is missing an [NullAllowed] on parameter #1 +!missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingEnded(UIKit.UIScrollView,UIKit.UIView,System.Runtime.InteropServices.NFloat)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingStarted(UIKit.UIScrollView,UIKit.UIView)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UISearchBar::_SetScopeBarButtonTitle(Foundation.NSDictionary,UIKit.UIControlState)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void UIKit.UISearchTextField::set_TokenBackgroundColor(UIKit.UIColor)' is missing an [NullAllowed] on parameter #0 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore index c2a1f98e2cc0..faab434d5697 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore @@ -242,9 +242,9 @@ !extra-null-allowed! 'AppKit.NSView AppKit.NSSharingServiceDelegate::CreateAnchoringView(AppKit.NSSharingService,CoreGraphics.CGRect&,AppKit.NSRectEdge&)' has a extraneous [NullAllowed] on parameter #2 !extra-null-allowed! 'AppKit.NSView AppKit.NSTableView::MakeView(System.String,Foundation.NSObject)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'Foundation.NSString AppKit.NSTableViewDelegate::GetToolTip(AppKit.NSTableView,AppKit.NSCell,CoreGraphics.CGRect&,AppKit.NSTableColumn,System.IntPtr,CoreGraphics.CGPoint)' has a extraneous [NullAllowed] on parameter #2 -!extra-null-allowed! 'System.Boolean AppKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(AppKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,AppKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Boolean AppKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(AppKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,AppKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2 -!extra-null-allowed! 'System.Boolean AppKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(AppKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,AppKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #3 +!extra-null-allowed! 'System.Boolean AppKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(AppKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,AppKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1 +!extra-null-allowed! 'System.Boolean AppKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(AppKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,AppKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2 +!extra-null-allowed! 'System.Boolean AppKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(AppKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,AppKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #3 !extra-null-allowed! 'System.Boolean AppKit.NSView::KnowsPageRange(Foundation.NSRange&)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.UIntPtr AppKit.NSTypesetter::LayoutParagraphAtPoint(CoreGraphics.CGPoint&)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.String AppKit.NSOutlineViewDelegate::ToolTipForCell(AppKit.NSOutlineView,AppKit.NSCell,CoreGraphics.CGRect&,AppKit.NSTableColumn,Foundation.NSObject,CoreGraphics.CGPoint)' has a extraneous [NullAllowed] on parameter #2 @@ -259,9 +259,9 @@ !extra-null-allowed! 'System.Void AppKit.NSFilePromiseProviderDelegate::WritePromiseToUrl(AppKit.NSFilePromiseProvider,Foundation.NSUrl,System.Action`1)' has a extraneous [NullAllowed] on parameter #2 !extra-null-allowed! 'System.Void AppKit.NSFontManager::set_Action(ObjCRuntime.Selector)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void AppKit.NSSegmentedControl::SetLabel(System.String,System.IntPtr)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void AppKit.NSTypesetter::WillSetLineFragment(CoreGraphics.CGRect&,Foundation.NSRange,CoreGraphics.CGRect&,ObjCRuntime.nfloat&)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void AppKit.NSView::AdjustPageHeightNew(ObjCRuntime.nfloat&,ObjCRuntime.nfloat,ObjCRuntime.nfloat,ObjCRuntime.nfloat)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void AppKit.NSView::AdjustPageWidthNew(ObjCRuntime.nfloat&,ObjCRuntime.nfloat,ObjCRuntime.nfloat,ObjCRuntime.nfloat)' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void AppKit.NSTypesetter::WillSetLineFragment(CoreGraphics.CGRect&,Foundation.NSRange,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&)' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void AppKit.NSView::AdjustPageHeightNew(System.Runtime.InteropServices.NFloat&,System.Runtime.InteropServices.NFloat,System.Runtime.InteropServices.NFloat,System.Runtime.InteropServices.NFloat)' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void AppKit.NSView::AdjustPageWidthNew(System.Runtime.InteropServices.NFloat&,System.Runtime.InteropServices.NFloat,System.Runtime.InteropServices.NFloat,System.Runtime.InteropServices.NFloat)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void AppKit.NSView::DidAddSubview(AppKit.NSView)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void AppKit.NSView::set_BackgroundFilters(CoreImage.CIFilter[])' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void AppKit.NSView::set_ContentFilters(CoreImage.CIFilter[])' has a extraneous [NullAllowed] on parameter #0 @@ -295,12 +295,12 @@ !missing-null-allowed! 'AppKit.NSCell[] AppKit.NSBrowser::SelectedCells()' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSColor AppKit.NSBitmapImageRep::ColorAt(System.IntPtr,System.IntPtr)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSColor AppKit.NSBrowserCell::HighlightColorInView(AppKit.NSView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::BlendedColor(ObjCRuntime.nfloat,AppKit.NSColor)' is missing an [NullAllowed] on return type +!missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::BlendedColor(System.Runtime.InteropServices.NFloat,AppKit.NSColor)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::FromCatalogName(System.String,System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::FromCGColor(CoreGraphics.CGColor)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::FromPasteboard(AppKit.NSPasteboard)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::HighlightWithLevel(ObjCRuntime.nfloat)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::ShadowWithLevel(ObjCRuntime.nfloat)' is missing an [NullAllowed] on return type +!missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::HighlightWithLevel(System.Runtime.InteropServices.NFloat)' is missing an [NullAllowed] on return type +!missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::ShadowWithLevel(System.Runtime.InteropServices.NFloat)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSColor AppKit.NSColor::UsingColorSpace(AppKit.NSColorSpace)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSColor AppKit.NSColorList::ColorWithKey(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSColor AppKit.NSTextBlock::GetBorderColor(AppKit.NSRectEdge)' is missing an [NullAllowed] on return type @@ -325,7 +325,7 @@ !missing-null-allowed! 'AppKit.NSEvent AppKit.NSWindow::NextEventMatchingMask(System.UIntPtr)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSEvent AppKit.NSWindow::NextEventMatchingMask(System.UIntPtr,Foundation.NSDate,System.String,System.Boolean)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSFont AppKit.NSFontManager::ConvertFont(AppKit.NSFont,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'AppKit.NSFont AppKit.NSFontManager::FontWithFamily(System.String,AppKit.NSFontTraitMask,System.IntPtr,ObjCRuntime.nfloat)' is missing an [NullAllowed] on return type +!missing-null-allowed! 'AppKit.NSFont AppKit.NSFontManager::FontWithFamily(System.String,AppKit.NSFontTraitMask,System.IntPtr,System.Runtime.InteropServices.NFloat)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSFont AppKit.NSFontManager::get_SelectedFont()' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSFontCollection AppKit.NSFontCollection::FromLocale(Foundation.NSLocale)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSFontCollection AppKit.NSFontCollection::FromName(System.String)' is missing an [NullAllowed] on return type @@ -441,7 +441,7 @@ !missing-null-allowed! 'AppKit.NSTextInputContext AppKit.NSTextInputContext::get_CurrentInputContext()' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSTextInputContext AppKit.NSView::get_InputContext()' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSTextStorage AppKit.NSTextView::get_TextStorage()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'AppKit.NSTextTab AppKit.NSTypesetter::GetTextTab(ObjCRuntime.nfloat,Foundation.NSWritingDirection,ObjCRuntime.nfloat)' is missing an [NullAllowed] on return type +!missing-null-allowed! 'AppKit.NSTextTab AppKit.NSTypesetter::GetTextTab(System.Runtime.InteropServices.NFloat,Foundation.NSWritingDirection,System.Runtime.InteropServices.NFloat)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSTextView AppKit.NSCell::FieldEditorForView(AppKit.NSView)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSTouchBar AppKit.NSResponder_NSTouchBarProvider::MakeTouchBar(AppKit.NSResponder)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSTrackingArea AppKit.NSEvent::get_TrackingArea()' is missing an [NullAllowed] on return type @@ -1138,8 +1138,8 @@ !extra-null-allowed! 'System.Void AppKit.NSControl::EditWithFrame(CoreGraphics.CGRect,AppKit.NSText,Foundation.NSObject,AppKit.NSEvent)' has a extraneous [NullAllowed] on parameter #1 !extra-null-allowed! 'System.Void AppKit.NSControl::SelectWithFrame(CoreGraphics.CGRect,AppKit.NSText,Foundation.NSObject,System.IntPtr,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1 !extra-null-allowed! 'System.Void AppKit.NSDraggingSession::EnumerateDraggingItems(AppKit.NSDraggingItemEnumerationOptions,AppKit.NSView,System.IntPtr,Foundation.NSDictionary,AppKit.NSDraggingEnumerator)' has a extraneous [NullAllowed] on parameter #3 -!extra-null-allowed! 'System.Void AppKit.NSTypesetter::WillSetLineFragment(CoreGraphics.CGRect&,Foundation.NSRange,CoreGraphics.CGRect&,ObjCRuntime.nfloat&)' has a extraneous [NullAllowed] on parameter #2 -!extra-null-allowed! 'System.Void AppKit.NSTypesetter::WillSetLineFragment(CoreGraphics.CGRect&,Foundation.NSRange,CoreGraphics.CGRect&,ObjCRuntime.nfloat&)' has a extraneous [NullAllowed] on parameter #3 +!extra-null-allowed! 'System.Void AppKit.NSTypesetter::WillSetLineFragment(CoreGraphics.CGRect&,Foundation.NSRange,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&)' has a extraneous [NullAllowed] on parameter #2 +!extra-null-allowed! 'System.Void AppKit.NSTypesetter::WillSetLineFragment(CoreGraphics.CGRect&,Foundation.NSRange,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&)' has a extraneous [NullAllowed] on parameter #3 !missing-null-allowed! 'AppKit.NSEvent AppKit.NSWindow::NextEventMatchingMask(System.UIntPtr,Foundation.NSDate,System.String,System.Boolean)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'AppKit.NSPrintOperation AppKit.NSPrintOperation::EpsFromView(AppKit.NSView,CoreGraphics.CGRect,Foundation.NSMutableData)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'Foundation.NSObject AppKit.NSAccessibilityElement::CreateElement(Foundation.NSString,CoreGraphics.CGRect,Foundation.NSString,Foundation.NSObject)' is missing an [NullAllowed] on parameter #2 @@ -1152,7 +1152,7 @@ !missing-null-allowed! 'Foundation.NSSet AppKit.NSEvent::TouchesMatchingPhase(AppKit.NSTouchPhase,AppKit.NSView)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean AppKit.NSImage::HitTestRect(CoreGraphics.CGRect,CoreGraphics.CGRect,AppKit.NSGraphicsContext,Foundation.NSDictionary,System.Boolean)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.Boolean AppKit.NSImage::HitTestRect(CoreGraphics.CGRect,CoreGraphics.CGRect,AppKit.NSGraphicsContext,Foundation.NSDictionary,System.Boolean)' is missing an [NullAllowed] on parameter #3 -!missing-null-allowed! 'System.Boolean AppKit.NSImageRep::DrawInRect(CoreGraphics.CGRect,CoreGraphics.CGRect,AppKit.NSCompositingOperation,ObjCRuntime.nfloat,System.Boolean,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #5 +!missing-null-allowed! 'System.Boolean AppKit.NSImageRep::DrawInRect(CoreGraphics.CGRect,CoreGraphics.CGRect,AppKit.NSCompositingOperation,System.Runtime.InteropServices.NFloat,System.Boolean,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #5 !missing-null-allowed! 'System.Boolean AppKit.NSTextAttachmentCell::TrackMouse(AppKit.NSEvent,CoreGraphics.CGRect,AppKit.NSView,System.Boolean)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.Boolean AppKit.NSTextAttachmentCell::TrackMouse(AppKit.NSEvent,CoreGraphics.CGRect,AppKit.NSView,System.UIntPtr,System.Boolean)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.Boolean AppKit.NSTextAttachmentCell::WantsToTrackMouse(AppKit.NSEvent,CoreGraphics.CGRect,AppKit.NSView,System.UIntPtr)' is missing an [NullAllowed] on parameter #2 @@ -1164,9 +1164,9 @@ !missing-null-allowed! 'System.String[] AppKit.NSSpellChecker::CompletionsForPartialWordRange(Foundation.NSRange,System.String,System.String,System.IntPtr)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.String[] AppKit.NSSpellChecker::GuessesForWordRange(Foundation.NSRange,System.String,System.String,System.IntPtr)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.Void AppKit.NSApplication::DiscardEvents(System.UIntPtr,AppKit.NSEvent)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.Void AppKit.NSBitmapImageRep::Colorize(ObjCRuntime.nfloat,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.Void AppKit.NSBitmapImageRep::Colorize(ObjCRuntime.nfloat,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor)' is missing an [NullAllowed] on parameter #2 -!missing-null-allowed! 'System.Void AppKit.NSBitmapImageRep::Colorize(ObjCRuntime.nfloat,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor)' is missing an [NullAllowed] on parameter #3 +!missing-null-allowed! 'System.Void AppKit.NSBitmapImageRep::Colorize(System.Runtime.InteropServices.NFloat,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor)' is missing an [NullAllowed] on parameter #1 +!missing-null-allowed! 'System.Void AppKit.NSBitmapImageRep::Colorize(System.Runtime.InteropServices.NFloat,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor)' is missing an [NullAllowed] on parameter #2 +!missing-null-allowed! 'System.Void AppKit.NSBitmapImageRep::Colorize(System.Runtime.InteropServices.NFloat,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor)' is missing an [NullAllowed] on parameter #3 !missing-null-allowed! 'System.Void AppKit.NSCell::EditWithFrame(CoreGraphics.CGRect,AppKit.NSView,AppKit.NSText,Foundation.NSObject,AppKit.NSEvent)' is missing an [NullAllowed] on parameter #4 !missing-null-allowed! 'System.Void AppKit.NSDocumentController::ReviewUnsavedDocuments(System.String,System.Boolean,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.Void AppKit.NSDocumentController::ReviewUnsavedDocuments(System.String,System.Boolean,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' is missing an [NullAllowed] on parameter #3 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalKit.ignore index 1b7ae0d2d700..bc582157b582 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalKit.ignore @@ -1 +1 @@ -!missing-release-attribute-on-return-value! Metal.IMTLTexture MetalKit.MTKTextureLoader::FromName(System.String,ObjCRuntime.nfloat,AppKit.NSDisplayGamut,Foundation.NSBundle,Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTextureWithName:scaleFactor:displayGamut:bundle:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. +!missing-release-attribute-on-return-value! Metal.IMTLTexture MetalKit.MTKTextureLoader::FromName(System.String,System.Runtime.InteropServices.NFloat,AppKit.NSDisplayGamut,Foundation.NSBundle,Foundation.NSDictionary,Foundation.NSError&)'s selector's ('newTextureWithName:scaleFactor:displayGamut:bundle:options:error:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore index 73ee7cd09389..0b6c193cf92a 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore @@ -97,9 +97,9 @@ # Initial result from new rule extra-null-allowed !extra-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewDataSource::GetIndexPath(UIKit.UICollectionView,System.String,System.IntPtr)' has a extraneous [NullAllowed] on return type -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2 -!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,ObjCRuntime.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #3 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2 +!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.Runtime.InteropServices.NFloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #3 !extra-null-allowed! 'System.Boolean UIKit.UIApplication::CanOpenUrl(Foundation.NSUrl)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void Foundation.NSAttributedString::.ctor(Foundation.NSData,Foundation.NSDictionary,Foundation.NSDictionary&,Foundation.NSError&)' has a extraneous [NullAllowed] on parameter #1 !extra-null-allowed! 'System.Void Foundation.NSAttributedString::.ctor(Foundation.NSUrl,Foundation.NSDictionary,Foundation.NSDictionary&,Foundation.NSError&)' has a extraneous [NullAllowed] on parameter #1 @@ -215,7 +215,7 @@ !missing-null-allowed! 'System.Void UIKit.UIResponder::PressesChanged(Foundation.NSSet`1,UIKit.UIPressesEvent)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIResponder::PressesEnded(Foundation.NSSet`1,UIKit.UIPressesEvent)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIScene::set_Title(System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingEnded(UIKit.UIScrollView,UIKit.UIView,ObjCRuntime.nfloat)' is missing an [NullAllowed] on parameter #1 +!missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingEnded(UIKit.UIScrollView,UIKit.UIView,System.Runtime.InteropServices.NFloat)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UIScrollViewDelegate::ZoomingStarted(UIKit.UIScrollView,UIKit.UIView)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Void UIKit.UISearchBar::_SetScopeBarButtonTitle(Foundation.NSDictionary,UIKit.UIControlState)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void UIKit.UISegmentedControl::.ctor(Foundation.NSArray)' is missing an [NullAllowed] on parameter #0 diff --git a/tools/common/StaticRegistrar.cs b/tools/common/StaticRegistrar.cs index 1621702ccd10..4e4f826b9df9 100644 --- a/tools/common/StaticRegistrar.cs +++ b/tools/common/StaticRegistrar.cs @@ -213,7 +213,7 @@ public override string ToString () class StaticRegistrar : Registrar { - static string NFloatTypeName { get => Driver.IsDotNet ? "ObjCRuntime.nfloat" : "System.nfloat"; } + static string NFloatTypeName { get => Driver.IsDotNet ? "System.Runtime.InteropServices.NFloat" : "System.nfloat"; } Dictionary protocol_member_method_map; diff --git a/tools/mmp/Makefile b/tools/mmp/Makefile index 38b5c122ce04..c25780030392 100644 --- a/tools/mmp/Makefile +++ b/tools/mmp/Makefile @@ -80,11 +80,11 @@ Xamarin.Mac.registrar.mobile.arm64.m: $(TOP)/src/build/mac/mobile-64/Xamarin.Mac $(Q) touch Xamarin.Mac.registrar.mobile.arm64.m Xamarin.Mac.registrar.mobile.arm64.h Microsoft.macOS.registrar.x86_64.m: $(TOP)/src/build/dotnet/macos/64/Microsoft.macOS.dll $(LOCAL_MMP) - $(GENERATE_PART_REGISTRAR) --arch=x86_64 --target-framework .NETCoreApp,Version=6.0,Profile=macos -a:$(DOTNET6_BCL_DIR)/System.Runtime.dll + $(GENERATE_PART_REGISTRAR) --arch=x86_64 --target-framework .NETCoreApp,Version=6.0,Profile=macos -a:$(DOTNET6_BCL_DIR)/System.Runtime.dll -a:$(DOTNET_SYSTEM_RUNTIME_INTEROPSERVICES_REF_ASSEMBLY_DIR)/System.Runtime.InteropServices.dll $(Q) touch $@ $(basename $@).h Microsoft.macOS.registrar.coreclr.x86_64.m: $(TOP)/src/build/dotnet/macos/64/Microsoft.macOS.dll $(LOCAL_MMP) - $(GENERATE_PART_REGISTRAR) --arch=x86_64 --target-framework .NETCoreApp,Version=6.0,Profile=macos -a:$(DOTNET6_BCL_DIR)/System.Runtime.dll --xamarin-runtime CoreCLR + $(GENERATE_PART_REGISTRAR) --arch=x86_64 --target-framework .NETCoreApp,Version=6.0,Profile=macos -a:$(DOTNET6_BCL_DIR)/System.Runtime.dll -a:$(DOTNET_SYSTEM_RUNTIME_INTEROPSERVICES_REF_ASSEMBLY_DIR)/System.Runtime.InteropServices.dll --xamarin-runtime CoreCLR $(Q) touch $@ $(basename $@).h Xamarin.Mac.registrar.full.x86_64.m: $(TOP)/src/build/mac/full-64/Xamarin.Mac.dll $(LOCAL_MMP) @@ -92,11 +92,11 @@ Xamarin.Mac.registrar.full.x86_64.m: $(TOP)/src/build/mac/full-64/Xamarin.Mac. $(Q) touch Xamarin.Mac.registrar.full.x86_64.m Xamarin.Mac.registrar.full.x86_64.h Microsoft.macOS.registrar.arm64.m: $(TOP)/src/build/dotnet/macos/64/Microsoft.macOS.dll $(LOCAL_MMP) - $(GENERATE_PART_REGISTRAR) --arch=arm64 --target-framework .NETCoreApp,Version=6.0,Profile=macos -a:$(DOTNET6_BCL_DIR)/System.Runtime.dll + $(GENERATE_PART_REGISTRAR) --arch=arm64 --target-framework .NETCoreApp,Version=6.0,Profile=macos -a:$(DOTNET6_BCL_DIR)/System.Runtime.dll -a:$(DOTNET_SYSTEM_RUNTIME_INTEROPSERVICES_REF_ASSEMBLY_DIR)/System.Runtime.InteropServices.dll $(Q) touch $@ $(basename $@).h Microsoft.macOS.registrar.coreclr.arm64.m: $(TOP)/src/build/dotnet/macos/64/Microsoft.macOS.dll $(LOCAL_MMP) - $(GENERATE_PART_REGISTRAR) --arch=arm64 --target-framework .NETCoreApp,Version=6.0,Profile=macos -a:$(DOTNET6_BCL_DIR)/System.Runtime.dll --xamarin-runtime CoreCLR + $(GENERATE_PART_REGISTRAR) --arch=arm64 --target-framework .NETCoreApp,Version=6.0,Profile=macos -a:$(DOTNET6_BCL_DIR)/System.Runtime.dll -a:$(DOTNET_SYSTEM_RUNTIME_INTEROPSERVICES_REF_ASSEMBLY_DIR)/System.Runtime.InteropServices.dll --xamarin-runtime CoreCLR $(Q) touch $@ $(basename $@).h Xamarin.Mac.registrar.full.arm64.m: $(TOP)/src/build/mac/full-64/Xamarin.Mac.dll $(LOCAL_MMP) diff --git a/tools/mtouch/Makefile b/tools/mtouch/Makefile index 38693983c845..e5fd915f5b5a 100644 --- a/tools/mtouch/Makefile +++ b/tools/mtouch/Makefile @@ -230,7 +230,7 @@ define RunRegistrar $$(Q) touch $$(basename $$@).m $$(basename $$@).h .libs/Microsoft.$(9).registrar.$(10)%m .libs/Microsoft.$(9).registrar.$(10)%h: $(TOP)/src/build/dotnet/$(1)/$(3)/Microsoft.$(9).dll $(LOCAL_MTOUCH) | .libs - $$(Q_GEN) $$(LOCAL_MTOUCH_COMMAND) --xamarin-framework-directory=$$(IOS_DESTDIR)/$$(MONOTOUCH_PREFIX) $$(MTOUCH_VERBOSITY) --runregistrar:$$(abspath $$(basename $$@).m) --sdkroot $$(XCODE_DEVELOPER_ROOT) --sdk $(4) $$< --registrar:static --target-framework .NETCoreApp,Version=6.0,Profile=$(1) --abi $(2) -r:$(DOTNET6_BCL_DIR)/System.Runtime.dll --rid $(10) + $$(Q_GEN) $$(LOCAL_MTOUCH_COMMAND) --xamarin-framework-directory=$$(IOS_DESTDIR)/$$(MONOTOUCH_PREFIX) $$(MTOUCH_VERBOSITY) --runregistrar:$$(abspath $$(basename $$@).m) --sdkroot $$(XCODE_DEVELOPER_ROOT) --sdk $(4) $$< --registrar:static --target-framework .NETCoreApp,Version=6.0,Profile=$(1) --abi $(2) -r:$(DOTNET6_BCL_DIR)/System.Runtime.dll -r:$(DOTNET_SYSTEM_RUNTIME_INTEROPSERVICES_REF_ASSEMBLY_DIR)/System.Runtime.InteropServices.dll --rid $(10) $$(Q) touch $$(basename $$@).m $$(basename $$@).h %.registrar.$(1).$(2).a: %.registrar.$(1).$(2).m %.registrar.$(1).$(2).h