Deprecate `Package.load`, use `PackageManager.load` instead
In order for the dependency injection approach to work, we need to be able to override every single instance of `Package.load`. We could not override `Package.load` itself as it is a static function. However, in the process of adding support for path-based dependencies to the test suite, it became obvious that the functionality offered by `Package.load` is actually better suited for the `PackageManager`. Deprecating `Package.load` confirms this: Not a single call was outside of `PackageManager`, and no extra parameter had to be provided anywhere to make this work. This also nicely simplifies the `TestPackageManager` implementation, as we can now overload `load` and let `getPackage` alone. |
---|
|
source/dub/package_.d |
---|
source/dub/packagemanager.d |
---|
source/dub/test/base.d |
---|