Skip to content

Commit

Permalink
VCST-2474: solve module dependencies before calling Initialize (#2870)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksavosteev authored Dec 17, 2024
1 parent a4758e7 commit 27d9900
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public static IServiceCollection AddModules(this IServiceCollection services, IM
// Ensure all modules are loaded
ConsoleLog.BeginOperation("Registering API controllers");

var modules = moduleCatalog.Modules.OfType<ManifestModuleInfo>().Where(x => x.State == ModuleState.NotStarted).ToArray();
var notStartedModules = moduleCatalog.Modules.Where(x => x.State == ModuleState.NotStarted);
var modules = moduleCatalog.CompleteListWithDependencies(notStartedModules)
.OfType<ManifestModuleInfo>()
.ToArray();

for (var i = 0; i < modules.Length; i++)
{
var module = modules[i];
Expand Down

0 comments on commit 27d9900

Please sign in to comment.