Xamarin-macios: Incremental builds is disabled when there are more than one binding projects

Created on 8 Jan 2018  路  7Comments  路  Source: xamarin/xamarin-macios

As a workaround for bug #52727 we automatically disable incremental builds when there are more than one binding projects.

We should look into fixing this somehow.

One option was discussed (allowing third-party binding projects to opt out of incremental builds), but it was discarded:

enhancement iOS

Most helpful comment

I believe this problem still occurs when the packages are from nuget packages.

Yes, this still happens if the native library comes from a NuGet package.

is there any internal progress on this or know how we can get it moving.

As always this is a question of prioritization relative to available manpower. Adding a +1 to this issue is the best way to make your voice heard.

All 7 comments

+1. We multiple native binding projects and therefore have incremental building disabled which slows down development significantly.

We try to move binding projects out as soon as possible and reference then through NuGet package. Less hassle and faster builds.

@alexsorokoletov I believe this problem still occurs when the packages are from nuget packages.

@rolfbjarne is there any internal progress on this or know how we can get it moving. I had hoped faster build times would be a priority thing to help support developers and would be triaged higher.

Referring back to my comment in the bug tracker that is the same as linked above, now that bug 43689 is resolved we can surely just remove this limitation and everything magically works. Nope :( I compiled d15-7 and removed that line that disables fastdev but to also output the values for App.OnlyStaticLibraries, the number of Assemblies.Count whereto assembly itself HasLinkWithAttributes set, and the name of each of these assemblies. You can see the specific commit over here.

When I attempt to build our current major project this is what is output.

MTOUCH : warning MT0127: Test Start
MTOUCH : warning MT0127: App.OnlyStaticLibraries: False
MTOUCH : warning MT0127: Assemblies.Count ((v) => v.HasLinkWithAttributes): 7
MTOUCH : warning MT0127: SkiaSharp.dll
MTOUCH : warning MT0127: WebP.Touch.dll
MTOUCH : warning MT0127: Microsoft.AppCenter.Crashes.iOS.Bindings.dll
MTOUCH : warning MT0127: Microsoft.AppCenter.iOS.Bindings.dll
MTOUCH : warning MT0127: MixpanelBindings.dll
MTOUCH : warning MT0127: Microsoft.AppCenter.Analytics.iOS.Bindings.dll
MTOUCH : warning MT0127: Microsoft.AppCenter.Push.iOS.Bindings.dll
MTOUCH : warning MT0127: Test End
clang : error : linker command failed with exit code 1 (use -v to see invocation)
clang : error : linker command failed with exit code 1 (use -v to see invocation)
clang : error : linker command failed with exit code 1 (use -v to see invocation)
MTOUCH : error MT5216: Native linking failed for '/projectPath/obj/iPhone/Debug/device-builds/iphone10.3-11.4.1/mtouch-cache/arm64/libMicrosoft.AppCenter.Crashes.iOS.Bindings.dll.dylib'. Please file a bug report at http://bugzilla.xamarin.com

In theory this should be easy to repo as according to this adding Microsofts own AppCenter causes a project to not be compatible with incremental builds (just a little ironic :P).

I don't know enough about linkers and how to interact with them to be able to debug or try and improve upon Xamarin for this particular issue.

I believe this problem still occurs when the packages are from nuget packages.

Yes, this still happens if the native library comes from a NuGet package.

is there any internal progress on this or know how we can get it moving.

As always this is a question of prioritization relative to available manpower. Adding a +1 to this issue is the best way to make your voice heard.

For what it's worth, I see 22 +1's on this post, but only 12 on the original issue post. I would hazard to guess that most people clicking on the "this is how to make your voice heard" would have meant to click the original issue :-)

Is there a way to list the binding projects that cause it? I suspect that adding a second library from Microsoft triggered it but can't see anything in the app output console.

@ivmirx

Is there a way to list the binding projects that cause it?

You can add -vvvv to the additional mtouch arguments in the project's iOS Build options, and something like `Extracted third-party ..." will show up in the build log.

Was this page helpful?
0 / 5 - 0 ratings