acoustic-librarian-29560
10/09/2024, 11:55 AMwide-midnight-78598
10/09/2024, 12:18 PMwide-midnight-78598
10/09/2024, 12:19 PMwide-midnight-78598
10/09/2024, 12:20 PMacoustic-librarian-29560
10/09/2024, 12:20 PMawait get_git_worktree(GitWorktreeRequest(...), implicitly(MaybeGitBinary))
wide-midnight-78598
10/09/2024, 12:22 PMwide-midnight-78598
10/09/2024, 12:24 PM**implicitly
But, sometimes you have information which is ambiently pulled in by the rule engine.
And then, in the strangest case, sometimes the whole call is wrapped - if there is the need to chain rule calls - these should be rare, as I think Benjy added one of the missing "Process" calls, which reduces the need for these types of callswide-midnight-78598
10/09/2024, 12:28 PMrequest = GitWorktreeRequest(...)
git_binary = ... #somehow you have access to the binary
result = await get_git_worktree(request, gitbinary) # Like any other call
The nuance happens when we don't have the git_binary
request = GitWorktreeRequest(...)
result = await get_git_worktree(request, **implicitly()) # Implicitly tells Pants to figure this out
Generally, if you know the Get
syntax, then the mapping to call-by-name becomes slightly more obvioushappy-psychiatrist-90774
10/09/2024, 1:33 PMacoustic-librarian-29560
10/09/2024, 1:42 PMimplicitly
seems to be trying to provide both the request and the maybe_git_binary
but when I remove the request it complains it doesn't have a rule for it - any ideas?acoustic-librarian-29560
10/09/2024, 1:42 PMGet
and use the migrate goal and see what it spits out.acoustic-librarian-29560
10/09/2024, 1:48 PM09:47:56.82 [ERROR] '/Users/nicholas.dellosa/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/backend/docker/subsystems/dockerfile_parser.py' is not in the subpath of '/Users/nicholas.dellosa/Projects/data-platform' OR one path is relative and the other is absolute.
Use --print-stacktrace for more error details and/or -ldebug for more logs.
See <https://www.pantsbuild.org/2.21/docs/using-pants/troubleshooting-common-issues> for common issues.
Consider reaching out for help: <https://www.pantsbuild.org/community/getting-help>
😞acoustic-librarian-29560
10/09/2024, 1:49 PMawait get_git_worktree(**implicitly(GitWorktreeRequest(".git")))
This worked thoughwide-midnight-78598
10/09/2024, 1:58 PMawait get_git_worktree(**implicitly(GitWorktreeRequest(".git")))
Just less efficient.
This is strange, assuming that GitWorktreeRequest is what get_git_worktree wants, then that should workwide-midnight-78598
10/09/2024, 1:59 PMwide-midnight-78598
10/09/2024, 2:01 PMresult = await get_git_worktree(request, **implicitly())
-> whats the error?acoustic-librarian-29560
10/11/2024, 12:45 PMTypeError: get_git_worktree() got multiple values for argument 'git_worktree_request'
@wide-midnight-78598 Seems like it's trying to fill in both parameters, but there's no rule that generates a GitWorktreeRequest
from nothing since I get a rule graph error if I just do await get_git_worktree(**implicitly())
.wide-midnight-78598
10/11/2024, 3:44 PMrequest = GitWorktreeRequest()
result = await get_git_worktree(request, **implicitly())
wide-midnight-78598
10/11/2024, 3:45 PMacoustic-librarian-29560
10/11/2024, 3:45 PMawait get_git_worktree(GitWorktreeRequest(".git"), **implicitly())
? I'm on pants 2.21wide-midnight-78598
10/11/2024, 3:45 PMacoustic-librarian-29560
10/11/2024, 3:45 PMwide-midnight-78598
10/11/2024, 3:46 PMacoustic-librarian-29560
10/11/2024, 3:46 PMwide-midnight-78598
10/11/2024, 3:46 PMwide-midnight-78598
10/11/2024, 3:49 PMwide-midnight-78598
10/11/2024, 3:49 PMacoustic-librarian-29560
10/28/2024, 4:15 PMQueryRule
passed to the rule runner look like? Getting the following rule graph error with QueryRule(MaybeGitWorktree, [GitWorktreeRequest])
No source of dependency pants.vcs.git.get_git_worktree(, **implicitly(GitWorktreeRequest)) -> MaybeGitWorktree for @rule(plugins.docker_image_tagger.plugin:31:tag_with_git_meta(GitMetaDockerImageTagsRequest, DockerImageTaggerSubsystem) -> DockerImageTags, gets=[pants.vcs.git.get_git_worktree(, **implicitly(GitWorktreeRequest)) -> MaybeGitWorktree]). All potential sources were eliminated: []