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

[bazel.build] Problem with /rules/lib/builtins/repository_ctx description of default working_directory for execute() #21897

Closed
dws opened this issue Apr 4, 2024 · 2 comments
Labels
help wanted Someone outside the Bazel team could own this P2 We'll consider working on this in future. (Assignee optional) team-Documentation Documentation improvements that cannot be directly linked to other team labels team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: documentation (cleanup)

Comments

@dws
Copy link
Contributor

dws commented Apr 4, 2024

Page link:

https://bazel.build/rules/lib/builtins/repository_ctx

Problem description (include actual vs expected text, if applicable):

The description of working_directory for repository_ctx.execute() says:

default is ""
Working directory for command execution. Can be relative to the repository root or absolute.

but this does not actually state what the default of "" means. I'm guessing that the default of "" means that the default working directory for command execution is the root of the repository since it does not begin with a "/" that would mark it as an absolute path.

Where do you see this issue? (include link to specific section of the page, if applicable)

https://bazel.build/rules/lib/builtins/repository_ctx#parameters_3

Any other information you'd like to share?

No response

@dws dws added team-Documentation Documentation improvements that cannot be directly linked to other team labels type: documentation (cleanup) untriaged labels Apr 4, 2024
@sgowroji sgowroji added the team-Configurability platforms, toolchains, cquery, select(), config transitions label Apr 5, 2024
@gregestren gregestren added team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts and removed team-Configurability platforms, toolchains, cquery, select(), config transitions labels Apr 29, 2024
@comius comius added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts labels May 3, 2024
@meteorcloudy
Copy link
Member

Thanks for reporting!

That should mean default to the repository root, can you please send a PR to fix this issue?
https://cs.opensource.google/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java;l=1563

@meteorcloudy meteorcloudy added P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. help wanted Someone outside the Bazel team could own this and removed team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged labels May 28, 2024
dws added a commit to dws/bazel that referenced this issue Jun 7, 2024
dws added a commit to dws/bazel that referenced this issue Jun 7, 2024
dws added a commit to dws/bazel that referenced this issue Jun 7, 2024
@dws
Copy link
Contributor Author

dws commented Jun 7, 2024

@meteorcloudy Done; please see #22669

dws added a commit to dws/bazel that referenced this issue Jun 10, 2024
fmeum pushed a commit to fmeum/bazel that referenced this issue Aug 22, 2024
…king_directory for execute()

Fixes bazelbuild#21897 per feedback from @meteorcloudy.

Closes bazelbuild#22669.

PiperOrigin-RevId: 642185332
Change-Id: I188efa9bf0567d14fdd1b67583f51bebd65af295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Someone outside the Bazel team could own this P2 We'll consider working on this in future. (Assignee optional) team-Documentation Documentation improvements that cannot be directly linked to other team labels team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: documentation (cleanup)
Projects
None yet
7 participants