[Xamarin.Android.Build.Tasks] fix _CompileJava running too often#2207
Merged
dellis1972 merged 1 commit intodotnet:masterfrom Sep 21, 2018
Merged
[Xamarin.Android.Build.Tasks] fix _CompileJava running too often#2207dellis1972 merged 1 commit intodotnet:masterfrom
dellis1972 merged 1 commit intodotnet:masterfrom
Conversation
Context: dotnet#2088 Context: dotnet#2129 Context: dotnet#2199 In 4deec52, I fixed the #deletebinobj problem we discovered. However... I introduced a regression to incremental builds, I noticed that the `_CompileJava` target is now running on a second build with no changes. Third build? oddly it gets skipped... It seems to be due to our use of flag files: 1. `_UpdateAndroidResgen` updates `R.cs.flag` and uses the file as an output 2. `_GenerateJavaDesignerForComponent` now uses `R.cs.flag` as an input 3. `_GenerateJavaStubs` *also* updates the timestamp on `R.cs.flag`. This was added in 970da9e, as a workaround for our two instances of `ConvertResourcesCases`. 4. `_GenerateJavaDesignerForComponent` will now run again on the next build. Since 1886e6f eliminated the second call to `ConvertResourcesCases`, we don't need to update `R.cs.flag` in no. 3 any longer. Removing the call to `<Touch />` `R.cs.flag` in `_GenerateJavaStubs` fixed the issue, and I added some assertions in relevant tests to check that the `_CompileJava` and `_GenerateJavaDesignerForComponent` targets aren't running on incremental builds.
dellis1972
approved these changes
Sep 21, 2018
Contributor
|
Mac Failure is un related. If the windows build passes I will merge this |
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: #2088
Context: #2129
Context: #2199
In 4deec52, I fixed the #deletebinobj problem we discovered.
However...
I introduced a regression to incremental builds, I noticed that the
_CompileJavatarget is now running on a second build with nochanges. Third build? oddly it gets skipped...
It seems to be due to our use of flag files:
_UpdateAndroidResgenupdatesR.cs.flagand uses the file as anoutput
_GenerateJavaDesignerForComponentnow usesR.cs.flagas aninput
_GenerateJavaStubsalso updates the timestamp onR.cs.flag.This was added in 970da9e, as a workaround for our two instances
of
ConvertResourcesCases._GenerateJavaDesignerForComponentwill now run again on the nextbuild.
Since 1886e6f eliminated the second call to
ConvertResourcesCases,we don't need to update
R.cs.flagin no. 3 any longer.Removing the call to
<Touch />R.cs.flagin_GenerateJavaStubsfixed the issue, and I added some assertions in relevant tests to
check that the
_CompileJavaand_GenerateJavaDesignerForComponenttargets aren't running on incremental builds.