sofa icon indicating copy to clipboard operation
sofa copied to clipboard

Discuss the merge of DAGNode, Node, BaseNode and Context and BaseContext

Open alxbilger opened this issue 5 months ago • 3 comments

alxbilger avatar Jun 23 '25 16:06 alxbilger

Happy to see a revival of this topic and I agree having 4 layers of abstraction is over-engineering. (for the record, BaseNode made sense a long time ago when there was a DAGNode and TreeNode)...

... To me all that should be merged:

  • probably first merge DAGNode -> Node
  • then BaseNode -> Node (with an alias to keep BaseNode)
  • then BaseContext in Context (with an alias to keep BaseContext)

damienmarchal avatar Jun 27 '25 07:06 damienmarchal

About simplifying the Node code: there is also:

  • https://github.com/sofa-framework/sofa/pull/1737

damienmarchal avatar Jun 27 '25 08:06 damienmarchal

Additional cleaning related is the refactor of DAGSimulation and Simulation

damienmarchal avatar Jun 27 '25 10:06 damienmarchal

So the merging of Node & DAGNode in https://github.com/sofa-framework/sofa/pull/5566 is now passing unit tests. So it is ready for review and finalization.

What could could be the next doable step ?

  • merge Context in BaseContext and make an alias from BaseContex to Context (DONE in #5608)
  • remove the in-heritance on Node to Context
  • remove DAGSimulation (DONE in #5610)
  • remove the singleton in Simulation ...

damienmarchal avatar Jul 14 '25 07:07 damienmarchal

Now that https://github.com/sofa-framework/sofa/pull/5566 has been merge, maybe we can try the next step.

damienmarchal avatar Sep 05 '25 22:09 damienmarchal