hundreds-breakfast-49010
10/02/2019, 8:26 PMhundreds-breakfast-49010
10/02/2019, 8:26 PMhundreds-breakfast-49010
10/02/2019, 8:26 PMhundreds-breakfast-49010
10/02/2019, 8:26 PMhundreds-breakfast-49010
10/02/2019, 8:27 PMExecuteProcessRequest
-> ExecuteProcessResult
hundreds-breakfast-49010
10/02/2019, 8:28 PMExecuteProcessRequest
(maybe LocalExecuteProcessRequest
?) that never caches the result (since a user program should be completely nondeterministic from pants' perspective)witty-crayon-22786
10/02/2019, 8:29 PMwitty-crayon-22786
10/02/2019, 8:30 PMwitty-crayon-22786
10/02/2019, 8:30 PMwitty-crayon-22786
10/02/2019, 8:31 PMwitty-crayon-22786
10/02/2019, 8:31 PMwitty-crayon-22786
10/02/2019, 8:32 PMhundreds-breakfast-49010
10/02/2019, 8:32 PMwitty-crayon-22786
10/02/2019, 8:32 PMwitty-crayon-22786
10/02/2019, 8:32 PMwitty-crayon-22786
10/02/2019, 8:32 PMwitty-crayon-22786
10/02/2019, 8:34 PMwitty-crayon-22786
10/02/2019, 8:34 PMhundreds-breakfast-49010
10/02/2019, 8:36 PMwitty-crayon-22786
10/02/2019, 8:36 PMhundreds-breakfast-49010
10/02/2019, 8:36 PMpython3 <whatever>
witty-crayon-22786
10/02/2019, 8:37 PMhundreds-breakfast-49010
10/02/2019, 8:41 PMExecuteProcessRequest
(rahter than making a new type)hundreds-breakfast-49010
10/02/2019, 8:41 PMhundreds-breakfast-49010
10/02/2019, 8:42 PM@rule
that takes as one of its inputs an ExecuteProcessRequest
with that flag, will act like a @console_rule
in terms of not running concurrently with any other @console_rules
witty-crayon-22786
10/02/2019, 8:45 PMwitty-crayon-22786
10/02/2019, 8:45 PMwitty-crayon-22786
10/02/2019, 8:47 PMhundreds-breakfast-49010
10/02/2019, 8:47 PMpants run
hundreds-breakfast-49010
10/02/2019, 8:48 PMExecuteProcessRequest
rule is currently implementedwitty-crayon-22786
10/02/2019, 8:48 PM./pants repl
could go either way.. in a sandbox could be totally fine.hundreds-breakfast-49010
10/02/2019, 8:48 PMrepl
is a different story (maybe)witty-crayon-22786
10/02/2019, 8:48 PMhundreds-breakfast-49010
10/02/2019, 8:49 PMwitty-crayon-22786
10/02/2019, 8:49 PMhundreds-breakfast-49010
10/02/2019, 8:49 PMrun
methodhundreds-breakfast-49010
10/02/2019, 8:49 PMrun
is doing I believewitty-crayon-22786
10/02/2019, 8:50 PMwitty-crayon-22786
10/02/2019, 8:50 PMwitty-crayon-22786
10/02/2019, 8:51 PMwitty-crayon-22786
10/02/2019, 8:52 PM$HERE/my-pex
hundreds-breakfast-49010
10/02/2019, 8:52 PMwitty-crayon-22786
10/02/2019, 8:52 PMhundreds-breakfast-49010
10/02/2019, 8:52 PMExecuteProcessRequest
it took the argv
string and digest that it puts into the ExectuteProcessRequest
object, and just ran it with python subprocess?hundreds-breakfast-49010
10/02/2019, 8:53 PMExecuteProcessRequest
, and was also marked as a @console_rule
?)witty-crayon-22786
10/02/2019, 8:54 PM@console_rule
is only at the top of the graphwitty-crayon-22786
10/02/2019, 8:55 PMWorkspace
and running synchronously in the foreground would be an option. but the downside of that is that it doesn't address the "debug a pytest
in the foreground" case i don't think.hundreds-breakfast-49010
10/02/2019, 8:55 PMExecuteProcessRequest
with a local flag, and then the @console_rule\ndef run()
rule that the PR also defines could be in charge of running it in the foreground, as a python subprocesswitty-crayon-22786
10/02/2019, 8:56 PMExecuteProcessRequest
... something else that is run
specific, maybehundreds-breakfast-49010
10/02/2019, 8:56 PMRunner
(that only @console_rule
would be able to access, eventually) - that takes in an ExecuteProcessRequest
+ local flag, and runs ithundreds-breakfast-49010
10/02/2019, 8:56 PMExecuteProcessRequest
witty-crayon-22786
10/02/2019, 8:57 PMwitty-crayon-22786
10/02/2019, 8:57 PMWorkspace
to materialize something into the dist
directory, and then expose a simpler API for running itwitty-crayon-22786
10/02/2019, 8:58 PMwitty-crayon-22786
10/02/2019, 8:58 PMhundreds-breakfast-49010
10/02/2019, 8:58 PMWorkspace
itself could have a method on it that does this runninghundreds-breakfast-49010
10/02/2019, 8:58 PMwitty-crayon-22786
10/02/2019, 8:59 PMwitty-crayon-22786
10/02/2019, 8:59 PMrun/repl/binary/test
cases in the doc... it was a big oversight to forget about run
like that, sorrryhundreds-breakfast-49010
10/02/2019, 9:38 PMhundreds-breakfast-49010
10/02/2019, 9:38 PMpytest
case that you're talking about actually would entailwitty-crayon-22786
10/02/2019, 9:46 PMpdb.set_breakpoint()
or whatever, and then using the repl that that launcheswitty-crayon-22786
10/02/2019, 9:46 PMwitty-crayon-22786
10/02/2019, 9:48 PMhundreds-breakfast-49010
10/02/2019, 9:59 PMsubprocess
, and that process spawns a repl, that repl will be available from the python process that called subprocess.run
hundreds-breakfast-49010
10/02/2019, 10:00 PMpdb.set_trace
, and also with ghci
, which spawns its own replhundreds-breakfast-49010
10/02/2019, 10:01 PM