McManning / BlueGraph

Visual Scripting Framework for Unity
MIT License
237 stars 30 forks source link

Improve hot reload / migration support for breaking changes #20

Open McManning opened 3 years ago

McManning commented 3 years ago

Improve migration/stability when code changes are hot reloaded.

Areas to be improved:

If we can't magically resolve changes to a node - it'd be nice to insert an "Error Node" placeholder into the graph to indicate what the old node was, what the errors are, and solutions on how to solve it. I can see situations where someone accidentally changes a field type - the "magic" migration code fixes it by deleting all the edges - and then that developer has a hell of a time trying to reconnect everything. And with sufficiently complex graphs, that would be a nightmare.

I think it'd be nice to start off with a graph scanning / validator on hot reload, and then swapping broken nodes for this error node and reporting back the errors for the developer to fix. Once that's in place, we can then identify what errors should be automatically resolved, if any.