https://pantsbuild.org/ logo
#general
Title
# general
a

ancient-france-42909

01/17/2023, 8:19 PM
Hey! I'm trying to upgrade to 2.15 and our custom plugin is failing because of a rule graph error. The tips for debugging this I should activate some rules in
register.py
, but I'm trying to find out whether doing it in there is the same as just adding it to
pants.toml
(to rule that out). The docs aren't very clear (or, well, at all, there are very few mentions of activation in the docs).
w

wide-midnight-78598

01/17/2023, 8:37 PM
Could you share the rule graph error? It's a challenging one to fix - a little while ago, I was trying to help a pretty wild one in unit tests: https://pantsbuild.slack.com/archives/C01CQHVDMMW/p1671246723464619
"usually" the problem is missing rules in the
def rules
of your file of interest, or in
register.py
but it can sometimes be a pain to narrow down
w

wide-midnight-78598

01/17/2023, 8:56 PM
whoaaaa
That looks like the rule graph just gave up. I can't say for certain without going through each of them, but they -shouldn't- be related to
pants.toml
- they look more like the typical missing rules. Is it failing in a unit test, or at runtime
cc @witty-crayon-22786 re: rule graph errors
w

witty-crayon-22786

01/17/2023, 9:03 PM
yea, unfortunately the answer is usually to work backward from what changed in the graph to locate an error, rather than attempting to consume the errors: sorry for the trouble. this is a large part of why the
@rule
api isn’t stable.
have you taken a look at https://www.pantsbuild.org/v2.15/docs/plugin-upgrade-guide for this version?
a

ancient-france-42909

01/18/2023, 10:23 AM
I have. Nothing really seems to apply, unless I'm misunderstanding something. The
EnvironmentName
changes should just log a deprecation error, no/
5 Views