Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR moves most
Feature
s' state (e.g. variables/collections used to track the state of aFunctionGraph
) to theFunctionGraph
upon which theFeature
s are operating, instead of dedicating oneFeature
and its state to a singleFunctionGraph
—as is currently done. With these changes, a few complications surroundingFunctionGraph
pickle
ing and the general dynamic addition/attachment ofFeature
s are more easily addressed and/or avoided altogether.Some more details:
Feature
s aren't truly stateful in a way that makes the relevant state specific to theFeature
as much as theFunctionGraph
. In other words, mostFeature
s really only care about the state of theFunctionGraph
s on which they operate, so, if that state is held by theFunctionGraph
s themselves,Feature
s can be more versatile.Feature
s from oneFunctionGraph
to another (e.g. as is attempted inFunctionGraph.clone_get_equiv
), because manyFeature
s are unnecessarily dedicated to a singleFunctionGraph
.