Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Xamarin.Android.Build.Tasks] fix $DOTNET_MODIFIABLE_ASSEMBLIES when FastDev is off#9451

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jonpryor merged 2 commits intomainfromdev/peppers/FastDeployEnvironmentFiles
Oct 25, 2024

Conversation

@jonathanpeppers
Copy link
Member

Context:https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10431207&view=ms.vss-test-web.build-test-results-tab&runId=114098346&resultId=100000&paneView=debug

TheFastDeployEnvironmentFiles(false) test fails on PRs from forks, because the "Fast Deployment" feature is not included in OSS builds.

The problem appears to be related to target ordering:

  • _GetGenerateJavaStubsInputs : uses@(AndroidEnvironment) to set@(_EnvironmentFiles)

  • _GetGenerateJavaStubs : must have sameInputs as_GeneratePackageManagerJava

  • _GeneratePackageManagerJava: actually uses@(_EnvironmentFiles)

  • _GenerateEnvironmentFiles : creates a new@(AndroidEnvironment) file, that won't be used!

But when using either aRelease build orDebug build withFastDev enabled, everything works fine.

To fix this, we can rework the target ordering:

  • _GetGenerateJavaStubsInputs depends on_GenerateEnvironmentFiles

  • Unfortunately, this is now a circular dependency that causes an MSBuild error.

  • _GenerateEnvironmentFiles no longer depends on_ReadAndroidManifest to break the cycle.

I does not appear that_ReadAndroidManifest is needed, as no properties created there are used.

…FastDev is offContext:https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10431207&view=ms.vss-test-web.build-test-results-tab&runId=114098346&resultId=100000&paneView=debugThe `FastDeployEnvironmentFiles(false)` test fails on PRs from forks,because the "Fast Deployment" feature is not included in OSS builds.The problem appears to be related to target ordering:* `_GetGenerateJavaStubsInputs` : uses `@(AndroidEnvironment)` to set  `@(_EnvironmentFiles)`* `_GetGenerateJavaStubs` : must have same `Inputs` as  `_GeneratePackageManagerJava`* `_GeneratePackageManagerJava`: actually uses `@(_EnvironmentFiles)`* `_GenerateEnvironmentFiles` : creates a new `@(AndroidEnvironment)`  file, that won't be used!But when using either a `Release` build or `Debug` build with`FastDev` enabled, everything works fine.To fix this, we can rework the target ordering:* `_GetGenerateJavaStubsInputs` depends on `_GenerateEnvironmentFiles`* Unfortunately, this is now a circular dependency that causes an  MSBuild error.* `_GenerateEnvironmentFiles` no longer depends on  `_ReadAndroidManifest` to break the cycle.I does not appear that `_ReadAndroidManifest` is needed, as noproperties created there are used.
@jonpryor
Copy link
Contributor

[Xamarin.Android.Build.Tasks] $DOTNET_MODIFIABLE_ASSEMBLIES & FastDev (#9451)Context:https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10431207&view=ms.vss-test-web.build-test-results-tab&runId=114098346&resultId=100000&paneView=debugThe`FastDeployEnvironmentFiles(false)` test fails on PRs from forks,because the "Fast Deployment" feature is not included in OSS builds:The Environment variable "DOTNET_MODIFIABLE_ASSEMBLIES" was not set.Expected: String containing "DOTNET_MODIFIABLE_ASSEMBLIES=Debug"But was:  "--------- beginning of main …The problem appears to be related to target ordering:*`_GetGenerateJavaStubsInputs` : uses`@(AndroidEnvironment)` to    set`@(_EnvironmentFiles)`*`_GetGenerateJavaStubs` : must have same`Inputs` as`_GeneratePackageManagerJava`*`_GeneratePackageManagerJava`: actually uses`@(_EnvironmentFiles)`*`_GenerateEnvironmentFiles` : creates a new`@(AndroidEnvironment)` file that won't be used!But when using either a`Release` build or`Debug` build with`FastDev` enabled, everything works fine.To fix this, rework the target ordering:*`_GetGenerateJavaStubsInputs` depends on`_GenerateEnvironmentFiles`    Unfortunately, this is now a circular dependency that causes an    MSBuild error.* Break the cycle by updating`_GenerateEnvironmentFiles` to no    longer depend upon`_ReadAndroidManifest`.    It does not appear that`_ReadAndroidManifest` is needed by`_GenerateEnvironmentFiles`, as no properties created there are    used.
jonathanpeppers reacted with thumbs up emoji

@jonpryorjonpryor merged commitee7c73e intomainOct 25, 2024
56 of 58 checks passed
@jonpryorjonpryor deleted the dev/peppers/FastDeployEnvironmentFiles branchOctober 25, 2024 17:04
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 25, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@dellis1972dellis1972dellis1972 approved these changes

@jonpryorjonpryorAwaiting requested review from jonpryor

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@jonathanpeppers@jonpryor@dellis1972

[8]ページ先頭

©2009-2025 Movatter.jp