jazzfool / reclutch

Rust UI Core
Other
157 stars 4 forks source link

What's the purpose of VerbGraphContext? #20

Closed fogti closed 4 years ago

fogti commented 4 years ago

I looked through the reclutch_verbgraph source code and found an practically-unit struct VerbGraphContext, which currently doesn't seem to have a real usage which would benefit from it. To test my assumption, I created a branch (no-ctx-needed) which got rid of it and replaced it with a freestanding function which provides a similiar interface.

@jazzfool What's the purpose and intent of VerbGraphContext?

jazzfool commented 4 years ago

I'm still not certain on the design of verbgraph. Also, it could allow for back-tracing the graph for debugging purposes.

jazzfool commented 4 years ago

Actually, it could be used to detect infinite loops (as in two procedures bouncing between each other), but I'm not sure how to implement that for anything other that trivial dependencies, since it could be tricked by making a bogus dependency right before the actual circular dependency.

jazzfool commented 4 years ago

Fixed in a70d187f2b1592611ee20b301de7a10d2210e583