diff options
author | 2017-08-15 23:21:25 +0200 | |
---|---|---|
committer | 2017-08-16 11:06:03 +0200 | |
commit | 59f1d889f71d6d203ca061787d4ea16465df1916 (patch) | |
tree | d0e52ac5be0fe8eed9c0e6886127919e156a2c85 /src/main/java/com/google/devtools/build/lib/rules/objc/AppleStubBinary.java | |
parent | ff746b4aaa5bb7109ff543a72c165fa6e785916f (diff) |
Add more type safety to CustomCommandLine.
Allowing add(Object) is too loose and can easily lead to programmer mistakes.
Because of type erasure, we can't use the same overload name for (eg.) add(NestedSet<String>) and add(NestedSet<Artifact>). The API is overhauled to use the same terms everywhere, eg. "add", "addPaths", "addExecPaths". This is similar to how it used to be a few CLs ago.
The API is overhauled to make sure it's consistent for all types. While tedious, the facade methods immediately dispatch to internal helpers, so implementation wise it's not too heavy.
While large, this CL is almost entirely an automated refactor.
PiperOrigin-RevId: 165358287
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/AppleStubBinary.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/AppleStubBinary.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleStubBinary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleStubBinary.java index 5880a7f280..70556f01ce 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleStubBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleStubBinary.java @@ -156,7 +156,7 @@ public class AppleStubBinary implements RuleConfiguredTargetFactory { new Builder() .add("/bin/cp") .addDynamicString(resolveXcenvBasedPath(ruleContext, platform)) - .add(ImmutableList.of(outputBinary)) + .addExecPaths(ImmutableList.of(outputBinary)) .build(); ruleContext.registerAction( |