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

fast-nail-55400

02/22/2022, 8:55 PM
In a
BuiltinGoal
, how do you retrieve the
OptionsBoostrapper
used?
w

witty-crayon-22786

02/22/2022, 8:58 PM
no explicit way right now, afaict.
f

fast-nail-55400

02/22/2022, 8:59 PM
.new_session
doesn’t duplicate
SessionValues
into the new session
and I have a BSP rule that indirectly wants
OptionsBoostrapper
(via wanting
JvmSubsystem
or
ScalaSubsystem
)
w

witty-crayon-22786

02/22/2022, 9:00 PM
mm, yea.
f

fast-nail-55400

02/22/2022, 9:00 PM
should I add a method to
PySession
to allow access to the
SessionValues
?
w

witty-crayon-22786

02/22/2022, 9:00 PM
that, or modify
new_session
to optionally keep them?
f

fast-nail-55400

02/22/2022, 9:01 PM
It doesn’t have access to them currently.
w

witty-crayon-22786

02/22/2022, 9:01 PM
…but let’s maybe re-evaluate the assumptions around creating a new session. maybe the
bsp
goal should continue to use the original session.
f

fast-nail-55400

02/22/2022, 9:01 PM
SessionValues
is passed to the Rust side and not kept on the Python side.
easy enough to expose them for now
w

witty-crayon-22786

02/22/2022, 9:02 PM
@fast-nail-55400: or, maybe just switch back to using the original session.
f

fast-nail-55400

02/22/2022, 9:03 PM
could do that as well, but don’t we want to keep the whatever isolation is provided by making a new session?
w

witty-crayon-22786

02/22/2022, 9:03 PM
we should always detect that the client doesn’t have a TTY, and thus never actually render the dynamic UI. even if we did though, it would be on stderr
f

fast-nail-55400

02/22/2022, 9:03 PM
how does inter-session locking work?
w

witty-crayon-22786

02/22/2022, 9:03 PM
@fast-nail-55400: i think that it’s mostly about the UI… it’s already a dedicated session for the connection/run
f

fast-nail-55400

02/22/2022, 9:04 PM
ah got it. I’ll get rid of the
.new_session
for now.
w

witty-crayon-22786

02/22/2022, 9:06 PM
@fast-nail-55400: there mostly isn’t any inter-session locking. multiple sessions interact with the
Graph
, which has internal locking. but the server itself has a lock for concurrent connections near the top of the stack (see): before shipping
bsp
that will need to be moved a bit probably (so that the
bsp
connection doesn’t hold that lock even when it is idling), since i don’t think we’ll resolve #7654 soon enough. but it’s not affected by session count.
ah got it. I’ll get rid of the 
.new_session
 for now.
👍 sorry for the distraction there.