-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[runtime] Remove ObjCRuntime.nfloat in favor of System.Runtime.InteropServices.NFloat. #14197
Conversation
…arin#12922. We can't execute mono's C# compiler when using .NET, so we need to tell bgen where csc is in that case. Fixes xamarin#12922.
… to get the new nfloat API.
…loat.Internal so that the new System.Runtime.InteropServices.NFloat API can be used. This is only for .NET 6, once we switch to .NET 7 we don't need this anymore.
…ct it into compilations. This can be turned off by passing /no-nfloat-using:true to bgen (which can be done by setting NoNFloatUsing=true in the project file).
…eCLR runtime pack selection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
@@ -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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NFloat
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed now.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
❌ [PR Build] Tests failed on Build ❌Tests failed on Build. API diff✅ API Diff from stable View dotnet API diffView dotnet legacy API diffAPI Current PR diffℹ️ API Diff (from PR only) (please review changes) View dotnet API diffView dotnet legacy API diffGenerator diffℹ️ Generator Diff (please review changes) GitHub pagesResults can be found in the following github pages (it might take some time to publish): Test results1 tests failed, 234 tests passed.Failed tests
Pipeline on Agent XAMBOT-1094.BigSur' |
Test failure is unrelated (https://github.com/xamarin/maccore/issues/2542) |
…pServices.NFloat. (xamarin#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: xamarin#13087
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).
System.Runtime.InteropServices.NFloat -> nfloat. This is not behind the
usual
ImplicitUsings
condition our other implicit usings are, becausethey're off by default for existing projects, and the main target for the
global using alias for nfloat is upgraded projects.
for all code the generator compiles.
instead of ObjCRuntime.nfloat.
wrong runtime pack is selected otherwise (without the new NFloat API, so
nothing works at runtime).
Ref: #13087