mbeddr.core
mbeddr.core copied to clipboard
Provide organize imports function for modules and build configurations
When having worked in an mbeddr project for a while a lot of stuff in gets accumulated in "imports" section of modules and "included modules" section of build configuration. It'd be cool if mbeddr would do some automatic housekeeping here and throw away included modules that are no longer needed.
Some more details about this: I actually don't want to have to edit the module import list at all. What I want is that mbeddr automatically inserts the necessary imports as I start using new types in a module. The import list should also be sorted alphabetically to keep it easier to oversee.
As a consequence, the code completion behavior must be enhanced in the following way:
- When I'm about to use a type that comes from the modules that are already imported it should work as now, i.e., its scope is equal to the union of the imported modules
I think your second option is currently not possible (with reasonable effort)
moved the second requirement to another feature request: https://github.com/mbeddr/mbeddr.core/issues/717
There's still a bug with imported units: when organizing the imports, modules that only provide units are removed from the list of import. This behavior leads to an inconsistent build configuration and a failing code generation.
Modules can contain "main function" abstractions, therefore the import organizer should not check for functions with name "main", but for instances of type IActAsMainFunction.
is this finished? can we close that?
When I tried to use it a month ago, it messed up the imports of a great number of modules in my project.
So, we should schedule a thorough test session, ideally on smart meter, to be sure that there are no side effects before closing this bug.