-
Notifications
You must be signed in to change notification settings - Fork 67
Refactor module system #73
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #73 +/- ##
==========================================
+ Coverage 57.81% 62.70% +4.88%
==========================================
Files 70 73 +3
Lines 6427 7197 +770
==========================================
+ Hits 3716 4513 +797
+ Misses 2424 2384 -40
- Partials 287 300 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
eb45738 to
042e6b4
Compare
|
@meling I decided to drop the explicit |
33da9e6 to
65ace61
Compare
|
@meling I have myself reviewed all the changes and am happy with what is here. If you think that the changes to the module system look okay, then I think that we can merge it |
65ace61 to
4dc32c9
Compare
This removes the need to declare what "interface" or type a module provides to the module system, thus being more in line with the "Go way" of implicit interfaces. The module system looks for a module with a compatible type. If multiple modules implement the same type, the module system chooses the one that was added to the builder last.
e622d02 to
040b049
Compare
This PR changes how the module system works. Modules can no longer directly access a module through the "Core" object in this manner:
mods.Eventloop(). Instead, modules are expected to declare a local variable that should hold the module, and then call one of the newGetmethods to retrieve the module. For example:Additionally, this PR adds a document that describes the ideas behind the module system and why it is necessary, and fixes a couple of mistakes.