[SNAP FORK][UPSTREAMED] Implement namespaced R class#66
Open
mauriciogg wants to merge 1 commit intobazelbuild:pre-alphafrom
Open
[SNAP FORK][UPSTREAMED] Implement namespaced R class#66mauriciogg wants to merge 1 commit intobazelbuild:pre-alphafrom
mauriciogg wants to merge 1 commit intobazelbuild:pre-alphafrom
Conversation
0d3b435 to
a142f45
Compare
The native version of the rules have this optimization (in our internal fork). This is that implementationm, but in starlark. See https://github.sc-corp.net/Snapchat/bazel/pull/126 for more details
a142f45 to
3153e3d
Compare
ted-xie
requested changes
Mar 21, 2023
| args.add("--androidJar", android_jar) | ||
| optional_inputs.append(android_jar) | ||
|
|
||
| _disable_warnings(args) |
Contributor
There was a problem hiding this comment.
disable_warnings() doesn't seem to exist on my end. Where is this function from?
ted-xie
reviewed
Mar 21, 2023
|
|
||
| optional_outputs = [] | ||
| if out_class_jar: | ||
| args.add("--classJarOutput", out_class_jar) |
Contributor
There was a problem hiding this comment.
This is throwing the following error on internal tests:
Error parsing command line: Unrecognized option: --classJarOutput
Which is kind of surprising. I'll look into this a bit.
Contributor
There was a problem hiding this comment.
You need something like this, I think:
optional_outputs = []
optional_args = []
if out_class_jar:
optional_args.add("--classJarOutput", out_class_jar)
optional_outputs.append(out_class_jar)
if out_r_txt:
optional_args.add("--rTxtOut", out_r_txt)
optional_outputs.append(out_r_txt)
if len(optional_outputs) > 1:
args.extend(["--"], optional_args)
Contributor
|
In addition to changes above, would you mind rebasing this PR? |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The native version of the rules have this optimization (in our internal fork).
native version uptreamed: bazelbuild/bazel#11385
Enable rudimentary R class namespacing where each library only contains
references to the resources it declares instead of declarations plus all
transitive dependency references.
i think this addresses #10