-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
PackageManager: Support directly loading a sub-package via path-based getOrLoadPackage()
#2977
base: master
Are you sure you want to change the base?
Conversation
✅ PR OK, no changes in deprecations or warnings Total deprecations: 8 Total warnings: 0 Build statistics: statistics (-before, +after)
-executable size=5297464 bin/dub
+executable size=5301560 bin/dub
rough build time=64s Full build output
|
@@ -271,7 +271,8 @@ class PackageManager { | |||
foreach (ovr; repo.overrides) | |||
if (ovr.package_ == name.toString() && ovr.source.matches(ver)) { |
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.
I guess the overrides should only apply to base packages as a whole, not on a sub-package basis. I.e., ovr.package_ == name.main.toString()
.
f2d1fed
to
c6c8a6b
Compare
… getOrLoadPackage() To avoid a costly full packages scan to resolve the sub-package later.
c6c8a6b
to
8aec744
Compare
mode = Whether to issue errors, warning, or ignore unknown keys in dub.json | ||
|
||
Returns: The packages loaded from the given path | ||
Throws: Throws an exception if no package can be loaded | ||
*/ | ||
Package getOrLoadPackage(NativePath path, NativePath recipe_path = NativePath.init, | ||
bool allow_sub_packages = false, StrictMode mode = StrictMode.Ignore) | ||
PackageName name = PackageName.init, StrictMode mode = StrictMode.Ignore) |
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.
The breaking API change is in a separate 2nd commit, in case we cannot/don't want to break it.
To avoid a costly full packages scan to resolve the sub-package later.