Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up the semantics of Command.arguments[0] #210

Merged
merged 1 commit into from
Apr 12, 2022

Commits on Feb 16, 2022

  1. Tidy up the semantics of Command.arguments[0]

    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.
    EdSchouten committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    3d0b812 View commit details
    Browse the repository at this point in the history