I've found an interesting issue. Haven't quite fig...
# development
g
I've found an interesting issue. Haven't quite figured out what is happening; but if I take my pants-backends repo and add
pants.backend.shell
as a backend, it crashes with rule graph errors on all unreleased versions I can test. Without the shell backend it works fine. Without the OCI backend it works fine. The combo itself is toxic. This repros on 2.16.0rc5, 2.17.0rc0. Wondering if this is related to
RunInSandboxBehavior
, just unexpected that it explodes like that. 2.16.0.dev2 is the last one that works.
b
Likely. We're ooching towards a world where for unions you're expected to register the rule using
*(subclass).rules()
. (which contains maybe some "inner rules"). From your
RunInSandboxBehavior
hint, it might be that it's missing the relevant rule for sandbox running
g
Yeah; maybe. I'll have to debug later; this'd be a blocker for upgrading to 2.16 so hopefully not too hard to resolve. Seems a bit iffy in general if two backends can explode each other like that. I only found this by accident because I wanted to test a quick thing with go-code in my prod repo... Thus using PANTS_VERSION=2.16.
b
If the current thinking is true, you can hide the import/attribute behind
if PANTS_VERSION
flags
g
Yeah; I do that in so many places already 😄
b
ðŸŠĶ
That's my fault. I'll take that one
the upside is that the Pants future is continually more expressive and powerful 😅
g
Oh yeah for sure. I'm happy things are changing... But rule graph errors are one of my least favourite things to debug.
That, or syntax errors that lead to a rust backtrace that doesn't tell me where. One of those. 😄
b
You are in very good company
h
Yeah, having two backends explode together is very ungood
p
"ungood" â„Ēïļ
g
So; this is related to the
RunFieldSet.rules()
change, not the one I thought. I'm going to guess the shell backend consumes some Union that I wasn't properly setting since I had the old
UnionRule
setup.
I wonder how many of these timebombs might exist in third-party plugins... 😄
From a sample size of "things I build" I had 2/6 triggered on the same bug.