Commit e7b4e868 authored by Mattias Gaertner's avatar Mattias Gaertner 🙃
Browse files

IDE: open package dependency: try provides, issue #17960

git-svn-id: trunk@37619 -
parent d1893619
......@@ -4584,6 +4584,7 @@ var
PreferredFilename: string;
PkgLink: TPackageLink;
IgnoreFiles: TFilenameToStringTree;
i: Integer;
begin
if Dependency.LoadPackageResult=lprUndefined then begin
//debugln(['TLazPackageGraph.OpenDependency ',Dependency.PackageName,' ',Dependency.DefaultFilename,' Prefer=',Dependency.PreferDefaultFilename]);
......@@ -4658,6 +4659,17 @@ begin
end;
end;
end;
// try a package that provides this package
if Dependency.LoadPackageResult=lprNotFound then begin
for i:=0 to Count-1 do begin
APackage:=Packages[i];
if APackage=Dependency.Owner then continue;
if APackage.ProvidesPackage(Dependency.PackageName) then begin
Dependency.RequiredPackage:=APackage;
Dependency.LoadPackageResult:=lprSuccess;
end;
end;
end;
end else begin
// there is already a package with this name, but wrong version open
// -> unable to load this dependency due to conflict
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment