https://pantsbuild.org/ logo
#development
Title
# development
h

happy-kitchen-89482

07/13/2021, 8:13 PM
Is there no guarantee that a WorkunitsCallback will be called once with
finished=True
?
w

witty-crayon-22786

07/13/2021, 8:15 PM
there is. but if
pantsd
is being used, they will finish asynchronously.
check your
.pants.d/pants.log
h

happy-kitchen-89482

07/13/2021, 8:20 PM
Ah, so the issue is that that part of that callback's job is to log
so possibly the logs are being swallowed by pantsd?
w

witty-crayon-22786

07/13/2021, 8:21 PM
after the console has gone away, output goes to the pants.log, yes
h

happy-kitchen-89482

07/13/2021, 8:23 PM
hrmph
w

witty-crayon-22786

07/13/2021, 8:24 PM
i mean: necessarily. if we finished the run 500ms before the plugin gets around to completing, we don’t tie up your console that whole time (and you can’t render something to the console once the console has been given back)
seems like that validation needs to move to the beginning of the run
i.e., on first call
sorry i missed this in review. not sure when it was made async vs when the logging was added
…or into the constructor of the callback
constructor of the callback is the only way to guarantee it always renders, but “first run” of the callback would work for any runs longer than 1 second