-
Notifications
You must be signed in to change notification settings - Fork 520
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
BI1055 error is thrown for iOS Binding project after migrating to .NET6 #11497
Labels
bug
If an issue is a bug or a pull request a bug fix
dotnet-pri0
.NET 6: required for stable release
Milestone
Comments
Complete stack trace
|
spouliot
added a commit
to spouliot/xamarin-macios
that referenced
this issue
May 12, 2021
Internally the generator uses `AvailabilityBaseAttribute` to make its decisions. For `dotnet` we generated the newer `[SupportedOSPlatform]` and `[UnsupportedOSPlatform]`. A 3rd-party (dotnet) binding might refer to members decorated with the newer attributes and fail the build with an error [1]. Avoiding the error is easy (first block of the diff) but it does not make the _right_ decisions (e.g. if a member is unavailable for the platform) when generating the code. To fix this we need to be able to convert the new attributes into the well know `AvailabilityBaseAttribute` subclasses. We have not spotted such cases yet because * the bindings pass our tests (good but extra code would not fail) * API diff across legacy and dotnet is not yet done [2] [1] dotnet#11497 [2] dotnet#10210
spouliot
added a commit
that referenced
this issue
May 12, 2021
Internally the generator uses `AvailabilityBaseAttribute` to make its decisions. For `dotnet` we generated the newer `[SupportedOSPlatform]` and `[UnsupportedOSPlatform]`. A 3rd-party (dotnet) binding might refer to members decorated with the newer attributes and fail the build with an error [1]. Avoiding the error is easy (first block of the diff) but it does not make the _right_ decisions (e.g. if a member is unavailable for the platform) when generating the code. To fix this we need to be able to convert the new attributes into the well know `AvailabilityBaseAttribute` subclasses. We have not spotted such cases yet because * the bindings pass our tests (good but extra code would not fail) * API diff across legacy and dotnet is not yet done [2] [1] #11497 [2] #10210
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bug
If an issue is a bug or a pull request a bug fix
dotnet-pri0
.NET 6: required for stable release
Steps to Reproduce
I am currently migrating our iOS Binding project to .NET6. One of the APIs I am binding is a protocol that inherits from the native UIScrollViewDelegate protocol. When I try to build the project the an error is thrown.
Expected Behavior
The binding should be built.
Actual Behavior
An error is thrown.
BTOUCH : error BI1055: bgen: Internal error: failed to convert type 'System.Runtime.Versioning.SupportedOSPlatformAttribute, System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
Environment
MacOS Big Sur 11.3.1
dotner version - 6.0.100-preview.4.21255.9
Build Logs
log.txt
Example Project (If Possible)
Net6Binding.zip
The text was updated successfully, but these errors were encountered: