Skip to content
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

Permit turning off android resource merging #8577

Closed
cgruber opened this issue Jun 6, 2019 · 9 comments
Closed

Permit turning off android resource merging #8577

cgruber opened this issue Jun 6, 2019 · 9 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Android Issues for Android team

Comments

@cgruber
Copy link
Contributor

cgruber commented Jun 6, 2019

Description of the problem / feature request:

Now that name-spaced resources are supported, teams that exclusively use this feature have no need for the expensive resource merging work.

Feature requests: what underlying problem are you trying to solve with this feature?

Reduce unnecessary work during an android build.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Write any trivial app which consumes .aars, and depend on a namespaced resource directly (rather than in the local R.class). Then build. All the resources are merged into the current library, even though the current library doesn't require local references to these.

What operating system are you running Bazel on?

Mac OS X 10.14.5

What's the output of bazel info release?

release 0.25.2

Have you found anything relevant by searching the web?

Discussion with @jin has confirmed that the resource merging is (presently) mandatory.

@jin jin added team-Android Issues for Android team untriaged labels Jun 7, 2019
@ahumesky ahumesky added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Jun 11, 2019
@cgruber
Copy link
Contributor Author

cgruber commented Jun 24, 2019

I want to put some weight on this one - based on our profiles, we're doing immense amounts of resource merging, and we've turned it off in Gradle, which is making clean builds of gradle 1/4 or less of the time of a bazel clean build. While that's not the normal case we imagine (low incrementality) it occurs in a variety of situations, and it's probably a quality-of-life blocker to our bazel adoption.

@jin
Copy link
Member

jin commented Jun 26, 2019

@cgruber are your comparisons with remote caching enabled?

@cgruber
Copy link
Contributor Author

cgruber commented Jul 1, 2019

Yeah. That helps a lot, but we have lots of scenarios where there's invalidation of a good chunk of the graph, and in those cases, it really hurts.

@jin jin removed their assignment Jul 13, 2019
@jin
Copy link
Member

jin commented Jul 13, 2019

Unassigning myself as I don't have the bandwidth to work on this, and I'm refocusing on other areas in Bazel.

@cgruber
Copy link
Contributor Author

cgruber commented Jul 15, 2019

Ok that's concerning given that this is, hands down, a migration blocker for us. We have enough work that invalidates enough of the graph, that we simply cannot take the hit vs. gradle that this extra work imposes on us. It's pure-waste, from our perspective, given that we use name-spaced resources now.

@jin
Copy link
Member

jin commented Jul 15, 2019

It's unlikely that we'll add this functionality to the native Android rules, since they're on their way out. We'll need to discuss this with the owners of the Starlark rules_android to see how we can move this forward.

@cgruber
Copy link
Contributor Author

cgruber commented Jul 15, 2019

Should I move this issue (well, replicate it) over as a feature request on rules_android?

@cgruber
Copy link
Contributor Author

cgruber commented Jul 15, 2019

I am totally ok with this happening within the starlark rules, as long as it happens.

@cgruber
Copy link
Contributor Author

cgruber commented Nov 6, 2019

Meant to close this, as it migrated to bazelbuild/rules_android#10

@cgruber cgruber closed this as completed Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Android Issues for Android team
Projects
None yet
Development

No branches or pull requests

3 participants