Skip to content
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

Master regression fixes #2481

Merged
merged 2 commits into from
Sep 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/dub/dub.d
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ class Dub {
{
const vrange = dep.visit!(
(VersionRange range) => range,
(any) => throw new Exception("Cannot call `dub.fetch` with a " ~ typeof(any).stringof ~ " dependency"),
function VersionRange (any) { throw new Exception("Cannot call `dub.fetch` with a " ~ typeof(any).stringof ~ " dependency"); }
);
return this.fetch(packageId, vrange, location, options, reason);
}
Expand Down
3 changes: 2 additions & 1 deletion source/dub/packagemanager.d
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,11 @@ private struct Location {
// loaded by the user (e.g. the project and its subpackages),
// so don't clean it.
this.fromPath = null;
this.scanPackageFolder(this.packagePath, mgr, existing);
}
foreach (path; this.searchPath)
this.scanPackageFolder(path, mgr, existing);
if (this.packagePath !is NativePath.init)
this.scanPackageFolder(this.packagePath, mgr, existing);
Comment on lines +1144 to +1145
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scan order shouldn't matter, the iteration order is done in getPackageIterator, which IIUC is where you want to shift things.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that both, search path packages and package path packages end up in the same array (fromPath) and the order within this array matters.

}

/**
Expand Down