- Notifications
You must be signed in to change notification settings - Fork564
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
…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.
Uh oh!
There was an error while loading.Please reload this page.
dellis1972 approved these changesOct 25, 2024
Contributor
jonpryor commentedOct 25, 2024
[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. |
ee7c73e intomain 56 of 58 checks passed
Uh oh!
There was an error while loading.Please reload this page.
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
The
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 sameInputsas_GeneratePackageManagerJava_GeneratePackageManagerJava: actually uses@(_EnvironmentFiles)_GenerateEnvironmentFiles: creates a new@(AndroidEnvironment)file, that won't be used!But when using either a
Releasebuild orDebugbuild withFastDevenabled, everything works fine.To fix this, we can rework the target ordering:
_GetGenerateJavaStubsInputsdepends on_GenerateEnvironmentFilesUnfortunately, this is now a circular dependency that causes an MSBuild error.
_GenerateEnvironmentFilesno longer depends on_ReadAndroidManifestto break the cycle.I does not appear that
_ReadAndroidManifestis needed, as no properties created there are used.