aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

Autocompletions only scans immediate DUB dependencies. #568

Open ColonelThirtyTwo opened 9 years ago

ColonelThirtyTwo commented 9 years ago

Mono-D doesn't seem to scan DUB dependencies recursively when autocompleting. Only dependencies listed in the main project's dub.json appear. In addition, subpackages never seem to be scanned, even if directly specified in the main project's dub.json file.

Although the issue can be mitigated by adding the dependencies manually to the main project's dub.json file, this effectively disables autocompletion for some subpackage-heavy packages, such as GFM.

Example setup here: https://dl.dropboxusercontent.com/u/10658954/mono-d-test.zip

Tested on Windows 7 x64, though GFM doesn't autocomplete on XUbuntu x64 either.

aBothe commented 9 years ago

In the project you sent me, there aren't any dependencies neither in test1 nor test2. When adding e.g. 'gtk-d' to test1, I indeed have to reload the entire solution by explicitly reopening the dub.json, but then, said dependency gtk-d has become loaded into the project pad. Completion etc. should be [edit: It is] there as well, so I can't find any bug there.

ColonelThirtyTwo commented 9 years ago

I've re-downloaded the example I posted, and test2 does have a dependency on test1 (maintest should also depend on test2):

{
    "name": "test2",
    "description": "A minimal D application.",
    "copyright": "Copyright © 2014, ColonelThirtyTwo",
    "authors": ["ColonelThirtyTwo"],
    "dependencies": {
        "test1": {"path": "../test1/"}
    },
    "targetType": "library"
}

I've also created a test project with gtk-d, and autocompletion does work on that. I'll see if I can compare gtk-d's dub.json file with gfw's, and try to find a difference that might be causing an issue.

I should clarify that gfw's subpackages are added to the project pad, but the autocompletion still doesn't pick them up.