CloudNet icon indicating copy to clipboard operation
CloudNet copied to clipboard

module loading improvements

Open DasBabyPixel opened this issue 2 years ago • 0 comments

Motivation

#1301 Also there is no cyclic dependency detection (not included in issue)

Modification

Rewrote DefaultModuleProvider#loadAll() to respect dependencies Changed methods in ModuleDependencyUtil to use ModuleConfiguration rather than ModuleWrapper to allow using the methods without instantiating any classes of the module Modified tests to work again after changes to ModuleDependencyUtil Added an exception for cyclic dependencies. I haven't added a test for cyclic dependency detection, because there wasn't a nice way to do so

Result

Fixes modules being loaded onto the classpath before their dependency modules are loaded. There is now a cyclic dependency detection.

Other context

Fixes #1301 I tested the PR with my demo project (master and cyclic branch).

DasBabyPixel avatar Aug 27 '23 02:08 DasBabyPixel