-
Notifications
You must be signed in to change notification settings - Fork 564
[Xamarin.Android.Build.Tasks] Reduce rebuild cascades #549
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why you have to Touch this file, and I believe unnecessary touching is bad because it can cause possible later rebuild cascades, but anyhow changes in this code path will be simply lost because it will be killed because it is jack!
https://github.com/xamarin/xamarin-android/pull/514/files#diff-77c7d22cbe4c79b8f43dd2e97eb81688
It should have been actually already killed (I was totally unaware that jack could be used outside our MSBuild tasks).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And from what I observed, these _GenerateMonoAndroidDex targets are not in use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Losing changes here is fine; i just want to speed up a specific local rebuild, and I encountered this target constantly re-running.
If you'd prefer, I can just kill this target and integrate the appropriate changes from PR #514?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either is fine, but the more important question here is: what is triggering this target? Could you check the diagnostic build output and see which targets depend on these _GenerateMonoAndroidDex* targets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The e.g.
_GenerateMonoAndroidDex18target isAfterTargets="GenerateJavaCallableWrappers", andGenerateJavaCallableWrappersis -- forMono.Android.csproj--AfterTargets="CoreBuild".Yes, there are circumstances where
AfterTargetsworks! :-)Not that the use of
AfterTargetsis immediately apparent from diagnostic build output:I think the message has it backwards, but the actual ordering is correct (truncated output):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why am I NOT seeing any references to those targets?
/sources/monodroid/xamarin-android$ grep -R GenerateMonoAndroidDex
/sources/monodroid/xamarin-android$ cd ../monodroid
/sources/monodroid/monodroid$ grep -R GenerateMonoAndroidDex
/sources/monodroid/monodroid$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atsushieno: Something is very fishy with that
grep, as it's not finding the target definitions within the repo:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I was running it from my o-preview tree where I removed them by myself. Your grep results also say that they are not REFERENCED.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're not explicitly referenced. They're implicitly referenced, via
AfterTargets.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. We should completely eliminate those use of "AfterTargets", but that can be done in different commits.