Skip to content

Fix compile errors in 02e48afd8b (arg_replacements scrubbing)#42

Merged
azad-uber-2 merged 1 commit into
uber/android/8.1.1from
azad/fix-arg-replacements-compile-errors
Jul 2, 2026
Merged

Fix compile errors in 02e48afd8b (arg_replacements scrubbing)#42
azad-uber-2 merged 1 commit into
uber/android/8.1.1from
azad/fix-arg-replacements-compile-errors

Conversation

@azad-uber-2

@azad-uber-2 azad-uber-2 commented Jul 2, 2026

Copy link
Copy Markdown

Commit 02e48af ("Apply arg_replacements scrubbing to params file cache key hashing") introduced two compile errors in the Uber fork:

  1. CommandLines.java — getCharset() referenced a nonexistent charset field. The ParamFileActionInput constructor stores charset only in the superclass (ParameterFile) via super(), so there is no local field to return. Fixed by removing the getCharset() method entirely per author guidance.
  2. DirectoryTreeBuilder.java — called .stream() on paramFile.getArguments(), which returns Iterable, not Collection. Iterable has no .stream() method. Fixed by using Guava's Streams.stream() instead. Also updated the ParamFileActionInput constructor call to use the 3-arg version (dropping the charset argument).

Commit 02e48af ("Apply arg_replacements scrubbing to params file
cache key hashing") introduced two compile errors in the Uber fork:

1. CommandLines.java — getCharset() referenced a nonexistent `charset`
   field. The ParamFileActionInput constructor stores charset only in the
   superclass (ParameterFile) via super(), so there is no local field to
   return. Fixed by returning ISO_8859_1 directly (matching the existing
   ParameterFile default) and adding the required import. Also added a
   4-arg constructor (PathFragment, Iterable<String>, ParameterFileType,
   Charset) that the new DirectoryTreeBuilder call site needs — it
   delegates to the existing 3-arg constructor.

2. DirectoryTreeBuilder.java — called .stream() on
   paramFile.getArguments(), which returns Iterable<String>, not
   Collection. Iterable has no .stream() method. Fixed by using
   Guava's Streams.stream() instead.

Both errors prevented the Bazel binary from compiling on the
uber/android/8.1.1 branch.
@azad-uber-2 azad-uber-2 force-pushed the azad/fix-arg-replacements-compile-errors branch from 1f9c1ef to 5759fc1 Compare July 2, 2026 15:38
@azad-uber-2 azad-uber-2 merged commit 7632f91 into uber/android/8.1.1 Jul 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant