-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Load modules sorted by dependencies #923
base: dev
Are you sure you want to change the base?
Conversation
@@ -300,7 +300,10 @@ public class ModuleService : GameService { | |||
Logger.Warn("Failed to load module from path {modulePath}.", ApplicationSettings.Instance.DebugModulePath); | |||
} | |||
|
|||
debugModule?.TryEnable(); | |||
if (debugModule != null) { | |||
debugModule.State.Enabled = true; |
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.
This impacts the state even after we're no longer using --module
, which is a change in behavior we'll just want to keep in mind.
Before: when no longer using --module
, a module would adhere to the state it was previously in.
After: when no longer using --module
, the module will be enabled until disabled again.
@@ -5,7 +5,7 @@ | |||
}, | |||
"PowerShell HUD": { | |||
"commandName": "Project", | |||
"commandLineArgs": "-p powershell -w ConsoleWindowClass" | |||
"commandLineArgs": " --process WindowsTerminal --window \"Windows PowerShell\" " |
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.
This appears to be completely unrelated.
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.
That's true.. not sure how that got in here. How do I remove that again?
I did a first-pass lookover. Other things that need answering:
Regarding your use case, it's still unclear to me why the dependent module has a different implementation of an assembly being loaded, making the load order important. Can you provide a minimal code example that exhibits this issue so that I can see it?
|
|
BlishHUD Module Load Order Test.zip ModuleB registers a context and ModuleA is dependent on B as it wants to use it. Steps:
|
Kudos, SonarCloud Quality Gate passed!
|
This PR implements module loading sorted by dependencies.
This is needed for contexts to work properly if the context class is contained inside the module.
Discussion Reference
All new features must be discussed prior to code review. This is to ensure that the implementation aligns with other design considerations. Please link to the Discord discussion:
https://discord.com/channels/531175899588984842/599270434642460753/1160999293361061979
Is this a breaking change?
Breaking changes require additional review prior to merging. If you answer yes, please explain what breaking changes have been made.
No