I have some custom rules and goal_rules. We're see...
# plugins
d
I have some custom rules and goal_rules. We're seeing behavior to indicate that in some situations some of these rules are executing multiple times. I've not been able to come up with a 100% deterministic way to reproduce the problem though. My current working theory is something like this: 1. The user runs the goal 2. The goal starts 3. The user's IDE saves a change to the filesystem 4. The goal restarts Is there a way to prevent the goal from automatically restarting in these scenarios?
b
If you wanted to debug,
.pants.d/pants.log
usually has some helpful information. Especially around restarts
Also, for rules executing multiple times, that can occur if the data at the rule boundary isn't completely deterministic. Usually that means somehow things were put into a
set
, then converted to a frozen data type (like
tuple
). Since `set`s dont have a deterministic order across process runs, you'll see the cache key changes
(Within a single process they are deterministic though)
d
That's good to know. I don't see an usages of
set
right now that would result in that behavior
And I'll check the pants log the next time this issue pops up
c
if the logs shows changes to files that is not relevant to pants operation, you can ignore them so pants no longer cares about changes to them: https://www.pantsbuild.org/docs/reference-global#pants_ignore
👍 1