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

AddBindingsToCompile is sometimes not run, breaking _GenerateCompileDependencyCache and incremental builds #8871

Closed
Youssef1313 opened this issue Apr 14, 2024 · 10 comments
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects.

Comments

@Youssef1313
Copy link
Member

Youssef1313 commented Apr 14, 2024

Android application type

.NET Android (net7.0-android, net8.0-android, etc.)

Affected platform version

MSBuild 17.7

Description

msbuild.zip

In the above binlog, see the build for Uno.UI.BindingHelper.Android.netcoremobile.csproj (ID 1387).

image

Here, some generated files (e.g, Java.Interop.__TypeRegistrations) aren't included in the hash.

And, for some reason, ResolveReferences is run, but GenerateBindings and AddBindingsToCompile are not.

image

Steps to Reproduce

Did you find any workaround?

No response

Relevant log output

No response

@Youssef1313 Youssef1313 added the needs-triage Issues that need to be assigned. label Apr 14, 2024
@Youssef1313 Youssef1313 changed the title AddBindingsToCompile is run late, after _GenerateCompileDependencyCache, breaking incremental builds AddBindingsToCompile is sometimes not run, breaking _GenerateCompileDependencyCache and incremental builds Apr 14, 2024
@Youssef1313
Copy link
Member Author

@dellis1972 Do you think this is related to #8706 ? The version I'm running on doesn't seem to have this fix.

@dellis1972
Copy link
Contributor

Probably, the issue is probably that the .cs files in the generated folder are missing, so they never get included.

@jpobst jpobst assigned dellis1972 and jonathanpeppers and unassigned jpobst Apr 14, 2024
@jpobst jpobst added Area: App+Library Build Issues when building Library projects or Application projects. and removed needs-triage Issues that need to be assigned. labels Apr 14, 2024
@Youssef1313
Copy link
Member Author

@dellis1972 Assuming that PR fixes it, could it be backported?

and which .NET 8 SDK contains the fix (if released already)?

@dellis1972
Copy link
Contributor

Looks like its been back ported to 8.0.2 via 20d9605. Note sure the release date for 8.0.2 though.

@Youssef1313
Copy link
Member Author

Regarding backporting, I meant to 7.x, if possible

@dellis1972
Copy link
Contributor

I don't think we can, according to https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core. 7 is going out of support in a month.

@jpobst
Copy link
Contributor

jpobst commented May 17, 2024

Seems like this is fixed in supported versions (.NET 8+).

@jpobst jpobst closed this as completed May 17, 2024
@Youssef1313
Copy link
Member Author

@jpobst It's still an issue for me. What I found so far is that AddBindingsToCompile and GenerateBindings are not run because _ComputeFilesToPublishForRuntimeIdentifiers is true in the specific broken build, causing Microsoft.Android.Sdk.BuildOrder.targets to not be imported. Still not sure if it's an issue in our side or on your side though.

@dellis1972
Copy link
Contributor

Hmm this might be an inner build issue then. Afaik _ComputeFilesToPublishForRuntimeIdentifiers is only set when we do an inner build to collect outputs, it should not be running targets which delete files.

cc @jonathanpeppers what do you think?

@Youssef1313
Copy link
Member Author

I opened #9007 with binlog and all info I could find.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Projects
None yet
Development

No branches or pull requests

4 participants