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

witty-crayon-22786

07/29/2020, 8:43 PM
the
Engine traceback
currently includes only rules with human readable names. should it include all of them?
Copy code
Engine traceback:
  in `dependencies` goal
Traceback (most recent call last):
  ..
^ we’re quite a bit deeper in the rule stack then that
h

hundreds-father-404

07/29/2020, 8:45 PM
Yeah, imo
That sounds really useful for us to debug
w

witty-crayon-22786

07/29/2020, 8:52 PM
yea, it has some nice properties. but one of the issues with that was that it would allow exception handling, which i’m not sure that we want to do.
a

aloof-angle-91616

07/29/2020, 8:52 PM
yes
i agree that that is not determined yet and that that is important
i will still want to clean it up i think so it’s easier to discuss later
thanks
h

hundreds-father-404

07/29/2020, 8:53 PM
How feasible would it be to split out the nice properties like line numbers from the exception handling decision?
a

aloof-angle-91616

07/29/2020, 8:54 PM
it would be possible
it might not even be that hacky to do that’s what i was worried about
w

witty-crayon-22786

07/29/2020, 8:54 PM
it’s also possible that not making it possible to handle exceptions isn’t worth it if we set the right conventions
👍 1
…double negative, but yea.
a

aloof-angle-91616

07/29/2020, 8:56 PM
yes, that’s what i was thinking too. i think it would be good for me to try updating it first past the cpython PR and then i can have a better idea of the ways we can address exception handling
i think focusing on getting the stacktrace first is a very useful goal to start with
👍 1
w

witty-crayon-22786

07/29/2020, 8:56 PM
we have the stacktrace, we just don’t render all the frames
s/the/a/
it’s not a python stacktrace, so no line numbers as in your patch
a

aloof-angle-91616

07/29/2020, 8:57 PM
yes
w

witty-crayon-22786

07/29/2020, 8:58 PM
but yea, i could imagine that allowing for exception handling would be fine, as long as we continued to not use them in pants’ own APIs
👍 1
a

aloof-angle-91616

07/29/2020, 8:58 PM
there’s also another way to implement getting the python stacktrace that may avoid having to touch exception handling mechanics as well
w

witty-crayon-22786

07/29/2020, 9:05 PM
this was the same stack as i opened the thread with, but with all frames rendered:
Copy code
Engine traceback:
  in select
  in `dependencies` goal
  in pants.engine.internals.graph.resolve_targets
  in pants.engine.internals.graph.resolve_target
  in pants.engine.internals.graph.generate_subtargets
  in pants.engine.internals.build_files.find_target_adaptor
👍 1
h

hundreds-father-404

07/29/2020, 9:05 PM
Yeah that is helpful imo
I would never have guessed that it was related to
find_target_adaptor
w

witty-crayon-22786

07/29/2020, 9:06 PM
well, that part is in the python stacktrace below... but yea, all the intermediate stuff is lost