bazelbuild / bazelbuild/rules_android
Data Binding shell script to fix resources is not cross-platform
- Dominant language
- Java
- Stars
- 203
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
[This section](https://github.com/bazelbuild/rules_android/blob/main/rules/resources.bzl#L376-L420) is _only_ Linux (GNU) compatible. Issues with macOS:
* BSD head won't take a negative int as its argument (GNU does).
* BSD sed requires passsing an argument to the -i flag for a file extension to use when writing a back-up. A file without a back-up must be explicitly signaled by using an empty argument, i.e. `sed -i '' file`.
* Using sed to change a string in an otherwise binary file requires changing the localization variables. At least, it does on standard BSD/macOS: otherwise, sed assumes files are encoded as text, and the class files contain invalid bytes.
Contributor guide
Assessment
This issue has not been assessed yet.