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

_GeneratePackageManagerJava runs on every incremental build #9212

Closed
jonathanpeppers opened this issue Aug 16, 2024 · 1 comment · Fixed by #9223
Closed

_GeneratePackageManagerJava runs on every incremental build #9212

jonathanpeppers opened this issue Aug 16, 2024 · 1 comment · Fixed by #9223
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Milestone

Comments

@jonathanpeppers
Copy link
Member

jonathanpeppers commented Aug 16, 2024

Android framework version

net9.0-android

Affected platform version

.NET 9

Description

I was testing our incremental build and noticed:

  1. An incremental build of a MAUI project, where I changed either C# or XAML

  2. This value changes each time:

image

image

This generates a new obj\Debug\net9.0-android\android\environment.arm64-v8a.ll each time, causing us to run _CompileNativeAssemblySources each time.

Could we use the same Guid for most Debug builds? Would only Release builds need a unique Guid?

/cc @grendello

Steps to Reproduce

  1. dotnet new maui
  2. F5 in VS
  3. Make a small code changes
  4. F5 in VS

Did you find any workaround?

No

Relevant log output

hellomaui_Debug_AnyCPU_Build_2024-08-16T11_28_53.1332631-05_00.binlog.zip

@jonathanpeppers jonathanpeppers added the Area: App+Library Build Issues when building Library projects or Application projects. label Aug 16, 2024
@jonathanpeppers jonathanpeppers added this to the .NET 9 milestone Aug 16, 2024
@dotnet-policy-service dotnet-policy-service bot added the needs-triage Issues that need to be assigned. label Aug 16, 2024
@jonathanpeppers jonathanpeppers removed the needs-triage Issues that need to be assigned. label Aug 16, 2024
@grendello
Copy link
Contributor

grendello commented Aug 19, 2024

I don't think even Release builds need a unique build id, as far as we are concerned. The Guids we care about are the assembly MVIDs, and that only in Release builds when marshal methods are enabled. So we should be fine forcing the same build id in Debug (I wouldn't force it in Release, as something else somewhere may expect the id to be different).

jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this issue Aug 19, 2024
Fixes: dotnet#9212

`$XAMARIN_BUILD_ID` was a value that was only used by the
`mono-symbolicate` feature from Xamarin. In .NET 6+,
`mono-symbolicate` is not supported (and unfortunately, no
replacement yet):

* dotnet/runtime#106395

Likely, a new solution would use some new tool like `dotnet-symbol`,
which is able to locate symbol information based on existing
information inside managed `.dll`'s or even native libraries.

Remove `$XAMARIN_BUILD_ID`, in order to delete unused code, and
improve incremental build times mentioned in dotnet#9212.
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 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

Successfully merging a pull request may close this issue.

3 participants