--[BE] Merge most habitat libraries into a single library to get rid of circular deps.#2511
--[BE] Merge most habitat libraries into a single library to get rid of circular deps.#2511
Conversation
aclegg3
left a comment
There was a problem hiding this comment.
Thanks @jturner65 , given that most 2nd order users are installing from conda these days and full install isn't that much of a drag, this simplifying refactor seems like a good move.
We can break things back up later if we feel there is value.
Just to clarify, there's no increase, as this happened before as well. In other words, there's no negative effect of this PR whatsoever, only ✨ positives ✨. Before, if you modified something in the, say, Incremental building of just a single unit test is doable the same way as before, by running As Alex says, if a certain part of the codebase gets iterated on a lot in isolation, the library can be broken up again. Which is already the case for |
| endif() #BUILD_WITH_BULLET | ||
|
|
||
| # enable when finished? Slows compilation substantially | ||
| # set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON) |
There was a problem hiding this comment.
That fix we talked about is in mosra/corrade@280e6b6. But again, there's quite a few breaking changes in Magnum since the last update, so I'm not sure when it would be the best time to update here.
There was a problem hiding this comment.
We can discuss the breaking changes in slack. TBH I would think it worthwhile to investigate updating Habitat to the most recent Magnum so any future Magnum growth will be more easily incorporated should it be useful, but of course that would depend on the scope of the changes.
There was a problem hiding this comment.
What I wanted to say is that I unfortunately don't currently have the bandwidth to adapt to the changes. In C++ the changed APIs are just emitting deprecation warnings, so that's fine (you can upgrade gradually as necessary, for example), but for Python there's no such deprecation workflow in place, and so all the code needs to be adapted immediately.
For example there are no application mouse events anymore, it's a PointerEvent now, to have a single abstraction for a mouse, pen and touch. Again, in C++ the old MouseEvent interface is deprecated, but in Python it's just gone.
If you'd have time to do these changes, however, that's a way... :)
0mdc
left a comment
There was a problem hiding this comment.
Nice! Thanks for doing this!
This intermediate step is to get rid of all the per-directory CMLs (we're keeping gfx_batch separate for now).
and into shared libraries, tests and applications as needed
..instead of assimp!
898f943 to
2628850
Compare
Motivation and Context
Habitat has long suffered from circular dependencies since every separate namespace was built as a separate library. Although having these individual libraries sped up compilation time for developers, it forced link multiplicity of up to 4 for certain libraries to link correctly.
This PR merges most of these separate libraries (except for bindings and gfx_batch) into a single library, habsim, that gets rid of the issues with circular dependencies. Developer compilation time will increase a little since the entire library will have to be rebuilt for any changes to any non-bindings/non-gfx_batch subsystem, but the benefits of no longer having circular dependencies.
This PR also removes all Plugins (except for PrimitiveImporter) from the main library and instead has shared libraries (i.e. bindings), applications and tests link to the ones they use.
Lastly, this PR introduces support for using Magnum::UfbxImporter for Obj and Fbx files, in an effort to diminish our reliance on Assimp. I think the only support we require from Assimp right now is ascii ply files (StanfordImporter handles binary plys).
How Has This Been Tested
Types of changes
Locally c++ tests pass
Checklist