-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to load multiple modules of the same type #110
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
==========================================
+ Coverage 85.85% 88.03% +2.18%
==========================================
Files 45 47 +2
Lines 1392 1470 +78
==========================================
+ Hits 1195 1294 +99
+ Misses 197 176 -21
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
… if one goes out of scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the improvements here @Supereg; looks great!
Allow to load multiple modules of the same type
♻️ Current situation & Problem
Currently, Spezi enforces that there is maximum one module of the same type loaded at a time. By allowing the Module system to used much more dynamically via #105, we found that certain types of Modules might exist multiple times in the system (e.g., a Bluetooth device type modeled as a Spezi Module might have two physical devices connected at the same time).
This PR makes the necessary infrastructure changes to support loading multiple modules of the same type. A check that the same module can only be loaded once is still in place.
Restructuring the
@Dependency
to support multiple modules of the same type is not trivial and will be addressed in a follow-up PR which is tracked in #111.⚙️ Release Notes
📚 Documentation
--
✅ Testing
Additional unit testing was added to verify behavior.
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: