Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tidy up the semantics of Command.arguments[0] (#210)
Bazel Buildfarm, Buildgrid and Buildbarn all perform resolution relative to the working directory of an action; not the input root directory. Instead of requiring that all implementations are updated, we should consider just altering the spec. Performing resolution relative to the input root directory can also be very tricky, as it means that argv[0] as visible to the calling process must also be rewritten. Applications may get confused otherwise. For example, consider the case where the working directory is "foo" and argv[0] is "bar/baz". In that case argv[0] as visible to the calling process must become "../bar/baz" or be made absolute. Making it absolute is inconsistent with what Bazel does right now. Attempting to keep it relative can be complex when symbolic links are involved. Furthermore, the specification doesn't mention what kind of path separators are used for argv[0]. The only reasonable solution here is to use path separators that are native to the host, as successive arguments also need to be provided in that form.
- Loading branch information