Skip to content

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

Closed

Description

@Youssef1313

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

Activity

  1. changed the title [-]`AddBindingsToCompile` is run late, after `_GenerateCompileDependencyCache`, breaking incremental builds[/-] [+]`AddBindingsToCompile` is sometimes not run, breaking `_GenerateCompileDependencyCache` and incremental builds[/+] on Apr 14, 2024
  2. Youssef1313 commented on Apr 14, 2024

    @Youssef1313
    MemberAuthor

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

  3. dellis1972 commented on Apr 14, 2024

    @dellis1972
    Contributor

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

  4. added
    Area: App+Library BuildIssues when building Library projects or Application projects.
    and removed
    needs-triageIssues that need to be assigned.
    on Apr 14, 2024
  5. Youssef1313 commented on Apr 14, 2024

    @Youssef1313
    MemberAuthor

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

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

  6. dellis1972 commented on Apr 15, 2024

    @dellis1972
    Contributor

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

  7. Youssef1313 commented on Apr 15, 2024

    @Youssef1313
    MemberAuthor

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

  8. dellis1972 commented on Apr 15, 2024

    @dellis1972
    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.

  9. jpobst commented on May 17, 2024

    @jpobst
    Contributor

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

  10. Youssef1313 commented on Jun 6, 2024

    @Youssef1313
    MemberAuthor

    @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.

  11. dellis1972 commented on Jun 6, 2024

    @dellis1972
    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?

  12. Youssef1313 commented on Jun 6, 2024

    @Youssef1313
    MemberAuthor

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

  13. locked and limited conversation to collaborators on Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions