fix #29 - DUB dependencies specified by path are not recognized and passed to DCD

This commit is contained in:
Basile Burg 2020-04-20 18:59:01 +02:00
parent 26110d6df3
commit 9550af9711
4 changed files with 14 additions and 2 deletions

3
.gitmodules vendored
View File

@ -7,3 +7,6 @@
[submodule "etc/stdx-allocator"]
path = etc/stdx-allocator
url = https://github.com/dlang-community/stdx-allocator.git
[submodule "etc/pegged"]
path = etc/pegged
url = https://github.com/PhilippeSigaud/Pegged.git

View File

@ -1,5 +1,9 @@
# v3.9.0-dev
## Bugs fixed
- DUB projects: dependencies specified with _path_ were not available for auto-completion, also improved the detection patterns so that the _path_ property work with more packages. (#29)
## Other
- Toolchain: removed the background tool _dastworx_ and replaced it with a library called _libdexed-d_. Although this will not change the user experience:

1
etc/pegged Submodule

@ -0,0 +1 @@
Subproject commit 146e9e0c31d86bd8fd6450f43713e04589378e93

View File

@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, fpjson, jsonparser, jsonscanner, process, strutils,
LazFileUtils, RegExpr, fgl,
u_common, u_interfaces, u_observer, u_dialogs, u_processes,
u_common, u_interfaces, u_observer, u_dialogs, u_processes, u_projutils,
u_writableComponent, u_compilers, u_semver, u_stringrange;
type
@ -1567,10 +1567,14 @@ procedure TDubProject.updateImportPathsFromJson;
// local path specified
if deps.findObject(n, c) and c.findAny('path', j) then
begin
s := expandFilenameEx(fBasePath, j.AsString);
s := expandFilenameEx(fBasePath, j.AsString) + DirectorySeparator;
// as auto detected by DUB
if (s + 'source').dirExists then
fImportPaths.Add(s)
else if (s + 'src').dirExists then
fImportPaths.Add(s)
// when standard src content is directly in the repo root
else if (s + n).dirExists then
fImportPaths.Add(s);
continue;
end;