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

[Xamarin] Uno 4.6 and later makes the linker step longer to run #10286

Closed
Marc-Antoine-Soucy opened this issue Oct 28, 2022 · 7 comments · Fixed by #10770
Closed

[Xamarin] Uno 4.6 and later makes the linker step longer to run #10286

Marc-Antoine-Soucy opened this issue Oct 28, 2022 · 7 comments · Fixed by #10770
Labels
area/code-generation Categorizes an issue or PR as relevant to code generation difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools

Comments

@Marc-Antoine-Soucy
Copy link

Marc-Antoine-Soucy commented Oct 28, 2022

Current behavior

When building the basic uno app template with the latest Uno.Ui nugget, it takes around 10-15 minutes to deploy the app on a physical device

Expected behavior

It should take around the same time than the latest stable nugget (1-2min)

How to reproduce it (as minimally and precisely as possible)

BuildTimeTest.zip
(this is the basic uno app template with IOS deployment enabled and with latest prerelease uno nuggets)

Build on an IOS physical device with latest stable. Notice it take around 1-2 minutes.

Update nugget to latest unstable and delete bin & obj, notice it takes around 10-15 minutes to build the same app

Workaround

I don't know any

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

<PackageReference Include="Uno.UI" Version="4.6.0-dev.984" /> <PackageReference Include="Uno.UI.RemoteControl" Version="4.6.0-dev.984" Condition="'$(Configuration)'=='Debug'" /> <PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.6.0-dev.984" />

Affected platforms

iOS

IDE

Visual Studio 2022

IDE version

17.3.6

Relevant plugins

No response

Anything else we need to know?

The build seems to be stuck at
build4dd42f8392a87d32eb8552348c66f5efa9b4477561d104008d50d6b5cf21697818528masou/+/xma/ping/Broker (TaskId:235)
1> [xma][info]: The client 'Broker' has acknowledged the ping (TaskId:235)
1> [xma][info]: Pinging client 'Broker'... (TaskId:235)
1> [xma][info]: Sending Request Xamarin.Messaging.PingMessage to topic xma/ping/Broker (TaskId:235)
1> [xma][info]: Received Response of Xamarin.Messaging.PingMessage to topic

which it repeats for most of the time of the build

@Marc-Antoine-Soucy Marc-Antoine-Soucy added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Oct 28, 2022
@Marc-Antoine-Soucy Marc-Antoine-Soucy changed the title [IOS][Physical device] Latest prerelease uno nuggets take a lot longer to deploy on a physical device [IOS][Physical device] Latest prerelease uno nuggets take a lot longer to deploy on an IOS physical device Oct 28, 2022
@Marc-Antoine-Soucy Marc-Antoine-Soucy changed the title [IOS][Physical device] Latest prerelease uno nuggets take a lot longer to deploy on an IOS physical device [IOS] Latest prerelease uno nuggets take a lot longer to deploy on an IOS physical device Oct 28, 2022
@jeromelaban
Copy link
Member

Thanks. Can you provide a binlog?

@Marc-Antoine-Soucy
Copy link
Author

buildLog1.zip
Are the logs from the problematic build sufficient? Or do you also want the log with the latest stable release nuggets?

@jeromelaban
Copy link
Member

Yes, if you can include the faster build it will help, thanks.

@Marc-Antoine-Soucy
Copy link
Author

buildlog2.zip
this is the normal one

@jeromelaban jeromelaban changed the title [IOS] Latest prerelease uno nuggets take a lot longer to deploy on an IOS physical device [IOS] Latest prerelease take a lot longer to deploy on an iOS physical device Oct 28, 2022
@jeromelaban jeromelaban changed the title [IOS] Latest prerelease take a lot longer to deploy on an iOS physical device [iOS] Latest prerelease take a lot longer to deploy on an physical device Oct 28, 2022
@vincentcastagna
Copy link

vincentcastagna commented Dec 19, 2022

I would add that we don't face this issue only for physical device (deploy) .The build increases regardless the target (simulator etc), without deploying

@jeromelaban
Copy link
Member

jeromelaban commented Dec 19, 2022

This issue is the result of #9808, where forcibly roslyn-based generatiopn was enabled for all targets which in turn is causing dotnet/linker#1409 in older linker implementations (used by Xamarin).

The fix will likely be to use EmbedAllSources to false during Uno.UI's own build for Xamarin targets, so generated files don't get embedded into the symbols.

A mitigation is currently to disable the linker entirely, but the build time is still higher because there's lots more code to compile.

@jeromelaban jeromelaban added area/code-generation Categorizes an issue or PR as relevant to code generation and removed platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform labels Dec 19, 2022
@jeromelaban jeromelaban changed the title [iOS] Latest prerelease take a lot longer to deploy on an physical device [Xamarin] Uno 4.6 and later linker step takes a long time to run Dec 19, 2022
@jeromelaban jeromelaban changed the title [Xamarin] Uno 4.6 and later linker step takes a long time to run [Xamarin] Uno 4.6 and later makes the linker step longer to run Dec 19, 2022
@vincentcastagna
Copy link

vincentcastagna commented Dec 23, 2022

FYI : The fix was backported in Uno 4.6.39 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-generation Categorizes an issue or PR as relevant to code generation difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools
Projects
None yet
3 participants