Skip to content

Conversation

@Paul-Licameli
Copy link

@Paul-Licameli Paul-Licameli commented Aug 21, 2024

Untangle the include dependency graph of Amalgam, to produce a good summary overview diagram of its parts.

The "before" picture of dependencies, with a big strongly connected component of 25 compilation units:

graph dot

The picture after the cleanup:

graph dot

Now no two files outside 3rdparty are in an include dependency cycle, and the folder structure of files is also reorganized. Boxes in the diagram correspond to folders. It is not immediately evident from the picture but the quotient graph of include dependencies by folders is also acyclic.

... SBFDSColumnData is free from it,

as are EvaluableNode, EvaluableNodeManagement, PerformanceProfiler, but those
three are still in a small s.c.c.
... It is needed only there and this removes direct (but not transitive)
dependency of EvaluableNodeTreeFunctions on Interpreter
... This frees Parser and EvaluableNodeTreeFunctions from the s.c.c but the
new file EntityTreeFunctions remains in it
... This frees FileSupportCAML from the big s.c.c
... Because there is another struct LoadEntityStatus also in the global
namespace used for the C api, which I don't want to change.
... so Entity does not depend directly on Interpreter, however EntityExecution
becomes part of the big s.c.c
... so compiler assures that the .h file has no omitted, hidden dependencies
... before factoring it into two classes
... freeing it and  GeneralizedDistance and EvaluableNodeTreeDifference from the
big s.c.c.
 ... Freeing AssetManager, EntityExecution, EntityQueryBuilder, and Interpreter
 from cycles
... Conviction, EntityManipulation, EntityQueries, EntityQueryCaches, KnnCache,
SeparableBoxFilterDataStore are free from cycles.

Entity, EntityTreeFunctions, and EntityWriteListener remain
in the s.c.c.
... which breaks up the last remaining s.c.c larger than one, in
non-third-party code.
... No cycles broken, but some unnecessary edges removed
... so that EntityManipulation does not depend on DistanceReferencePair
... Ideally each source code file should be in some folder, which is boxed in
the generated graphs, and the quotient graph of folders is acyclic.
@Paul-Licameli Paul-Licameli requested a review from a team as a code owner August 21, 2024 19:12
@Paul-Licameli Paul-Licameli marked this pull request as draft August 21, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant