Skip to content
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

[.NET 6] The (dynamic) registrar isn't removed when enabling all the optimizations #10512

Closed
Tracked by #10249
rolfbjarne opened this issue Jan 25, 2021 · 2 comments · Fixed by #11527
Closed
Tracked by #10249
Labels
dotnet An issue or pull request related to .NET (6) dotnet-pri2 .NET 6: want to have for stable release enhancement The issue or pull request is an enhancement estimate-3d iOS Issues affecting iOS
Milestone

Comments

@rolfbjarne
Copy link
Member

The MonoTouchFixtures.ObjCRuntime.RegistrarTest.RegistrarRemoval test fails when all optimizations are enabled.

Also see https://github.com/xamarin/maccore/issues/2380.

@rolfbjarne rolfbjarne added enhancement The issue or pull request is an enhancement iOS Issues affecting iOS dotnet An issue or pull request related to .NET (6) labels Jan 25, 2021
@rolfbjarne rolfbjarne added this to the .NET 6 milestone Jan 25, 2021
@rolfbjarne rolfbjarne added dotnet-pri2 .NET 6: want to have for stable release estimate-3d labels Feb 3, 2021
@spouliot
Copy link
Contributor

The dynamic registrar can be removed in some cases, e.g. the tests/dotnet/size-comparison works fine.
However the mentioned test, in the description, still fails.

@spouliot
Copy link
Contributor

Looks like a project side issue...

Warnings
    ILLINK warning MT2003: Option '--optimize=remove-uithread-checks' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=dead-code-elimination' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=inline-isdirectbinding' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=inline-intptr-size' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=inline-runtime-arch' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=blockliteral-setupblock' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=register-protocols' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=inline-dynamic-registration-supported' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=remove-dynamic-registrar' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=inline-is-arm64-calling-convention' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=seal-and-devirtualize' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=cctor-beforefieldinit' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=custom-attributes-removal' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=experimental-xforms-product-type' will be ignored since linking is disabled [/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3290/monotouch-test.csproj]
    ILLINK warning MT2003: Option '--optimize=force-rejected-types-removal' will be ignored since linking is disabled 

spouliot added a commit to spouliot/xamarin-macios that referenced this issue May 13, 2021
The registrar removal was fixed recently but the test was still failing.
Turns out xharness modify the linker setting for this test (as the
linker is required for this optimization) but the newer dotnet csproj
did not have an entry (to modify).

Fixes xamarin#10512
spouliot added a commit that referenced this issue May 13, 2021
The registrar removal was fixed recently but the test was still failing.
Turns out xharness modify the linker setting for this test (as the
linker is required for this optimization) but the newer dotnet csproj
did not have an entry (to modify).

Fixes #10512

[xharness] Fix monotouch-test build when LinkSdk is used for dotnet projects

Skip failing assertion, issue filled
@ghost ghost locked as resolved and limited conversation to collaborators Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dotnet An issue or pull request related to .NET (6) dotnet-pri2 .NET 6: want to have for stable release enhancement The issue or pull request is an enhancement estimate-3d iOS Issues affecting iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants