<@U0N6C2Q9F> What's the deal with `AdhocProcessReq...
# plugins
a
@fast-nail-55400 What's the deal with
AdhocProcessRequest
and
AdhocProcessResult
- what's different about them vs regular process and process result? Trying to build an adhoc packaging tool to do some filepath manipulation before the packaged output of a dependecy is passed downstream. As far as I can tell, there's no existing way to do this.
f
They are the request/response building block for
shell_command
,
adhoc_tool
, and related targets.
so the rules for
shell_command
and
adhoc_tools
make use of
AdhocProcessRequest
to do the "heavy lifting"
so logic like capturing outputs and checking the globs are matched, capturing stdout and stdin into files in the digest
Process
is used by the
AdhocProcessRequest
logic to actually run the process
so think of it as an intermediate internal helper API
for example,
PreparedAdhocProcessRequest
contains the
Process
resulting from an
AdhocProcessRequest
a
So I don't have the shell or adhoc tool backends in my current env and I'm getting rule graph errors, even though I'm just using the stuff from
pants.core
- does that sound feasible?
Unrelated to the above, the adhoc versions might be overkill for what I'm trying to do, which is to just propagate my path variable into my process.
f
AdhocProcessRequest
is in
pants.core.util_rules.adhoc_process_support
. It wouldn't be too far fetched for it to (unintentionally) to rely on stuff in the adhoc backend. It'd be interesting to know if this is the case so we can properly fix.
If you just want to propagate a PATH variable, maybe just use the
prepare_env_vars
helper directly?