curved-television-6568
01/31/2022, 3:53 PMcurved-television-6568
01/31/2022, 3:54 PM^C^CInterrupted by user:
(on the second <ctrl>+<c>
) but nothing from what I can tell on the Python side (at least no output/cleanup)curved-television-6568
01/31/2022, 3:55 PMcurved-television-6568
01/31/2022, 3:56 PMtry:
server.run()
except KeyboardInterrupt:
print("Closing...")
except Exception as e:
print("Something else", e)
server.should_exit = True
but doesn’t seem to do what I want 😉hundreds-father-404
01/31/2022, 3:58 PM--no-pantsd
if you haven't tried thatcurved-television-6568
01/31/2022, 3:59 PMcurved-television-6568
01/31/2022, 3:59 PMcurved-television-6568
01/31/2022, 4:01 PMcurved-television-6568
01/31/2022, 4:04 PM{
"data": {
"targets": [
"//.gitignore:files",
"//BUILD_ROOT:files",
"//cargo:scripts",
"//pants.toml:files",
"//pants:scripts",
"3rdparty/jvm/com/fasterxml/jackson/core:jackson-databind",
"3rdparty/jvm/com/fasterxml/jackson/datatype:jackson-datatype-jdk8",
"3rdparty/jvm/com/github/javaparser:javaparser-symbol-solver-core",
"3rdparty/jvm/io/circe:circe-generic",
....
witty-crayon-22786
01/31/2022, 6:05 PMwitty-crayon-22786
01/31/2022, 6:05 PMwitty-crayon-22786
01/31/2022, 6:06 PMSession
curved-television-6568
01/31/2022, 6:09 PMwitty-crayon-22786
01/31/2022, 6:14 PMSession
witty-crayon-22786
01/31/2022, 6:15 PMcurved-television-6568
01/31/2022, 6:39 PMcurved-television-6568
01/31/2022, 8:05 PMis_canceled()
right? But if I never get to check that flag… what then? (trying to follow the startup sequence, but loose my trail going over the nailgun border to Rust land). Where do we enter Python land on the other side of the nailgun invocation?curved-television-6568
01/31/2022, 8:06 PMwitty-crayon-22786
01/31/2022, 8:07 PMSchedulerSession.execute
consumes the cancellation latchwitty-crayon-22786
01/31/2022, 8:07 PMwitty-crayon-22786
01/31/2022, 8:08 PMwitty-crayon-22786
01/31/2022, 8:09 PMbut loose my trail going over the nailgun border to Rust landnailgun shouldn’t be important in this case: when the nailgun session is closing, the
Session
should get cancellation signaled, and then tear down in a few different placeswitty-crayon-22786
01/31/2022, 8:09 PMBuiltinGoal
, unless the cancellation latch is not being propagated into the LocalPantsRunner to where the BuiltinGoal
is being createdcurved-television-6568
01/31/2022, 8:10 PMcurved-television-6568
01/31/2022, 8:10 PMwitty-crayon-22786
01/31/2022, 8:11 PMcurved-television-6568
01/31/2022, 8:11 PMwitty-crayon-22786
01/31/2022, 8:12 PMpantsd
witty-crayon-22786
01/31/2022, 8:12 PMpantsd
all `Session`s are cancelled… and with pantsd
, only the Session
for a particular client is canceledcurved-television-6568
01/31/2022, 8:13 PMcurved-television-6568
01/31/2022, 8:14 PMwitty-crayon-22786
01/31/2022, 8:14 PMLocalPantsRunner.create
sets things up. it is either called without its optional args (in which case it creates things from scratch), or with them (in which case it uses stuff from pantsd
)witty-crayon-22786
01/31/2022, 8:15 PMwitty-crayon-22786
01/31/2022, 8:15 PMcurved-television-6568
01/31/2022, 8:15 PMwitty-crayon-22786
01/31/2022, 8:16 PMSession
then probably.curved-television-6568
01/31/2022, 8:16 PMwitty-crayon-22786
01/31/2022, 8:16 PMsession.is_cancelled()
witty-crayon-22786
01/31/2022, 8:17 PMKeyboardInterrupt
in arbitrary code, because it only raises on “the main thread”. it’s only raised while actually poking into code we control, e.g. scheduler.execute
curved-television-6568
01/31/2022, 8:17 PMuvicorn
execution inside out, or somehow interrupt it’s main loop…curved-television-6568
01/31/2022, 8:18 PMwitty-crayon-22786
01/31/2022, 8:18 PMcurved-television-6568
01/31/2022, 8:31 PM