Conversation
…FastDev is off 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 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 no properties created there are used.
dellis1972
reviewed
Oct 23, 2024
dellis1972
approved these changes
Oct 25, 2024
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=debug
The `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. |
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
Sign up for free
to 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.