dlang-community / DCD

The D Completion Daemon is an auto-complete program for the D programming language
GNU General Public License v3.0
349 stars 71 forks source link

`std.range.assumeSorted` doesn't complete anymore in 0.12.0/0.13.0 #620

Closed WebFreak001 closed 4 years ago

WebFreak001 commented 4 years ago

a.d

import std.range;

void main()
{
    assume
}
dcd-client -c 43 a.d

now yields

identifiers
assumeSafeAppend        f

before (in 0.11.1) it used to be

identifiers
assumeSafeAppend        f
assumeSorted    f

This was introduced with 0.12.0

WebFreak001 commented 4 years ago

for some reason this is only completion, go to definition still works

Hackerpilot commented 4 years ago

for some reason this is only completion, go to definition still works

Very strange.

Hackerpilot commented 4 years ago

mightBeRelevantInCompletionScope is returning false for assumeSorted and therefore it's getting filtered out here: https://github.com/dlang-community/DCD/blob/808460a678d9c993d393c36e7eb06601a157efcf/src/dcd/server/autocomplete/complete.d#L532

Hackerpilot commented 4 years ago

...And that's happening because the symbol for assumeSorted is marked private.

Hackerpilot commented 4 years ago

Actually the protection is messed up on a lot of the symbols. Several of them are wrong and several others are unset.

Hackerpilot commented 4 years ago

I think I fixed it. There will be a pull request to dsymbol soon.

Edit: Fixed part of it... Still working on a related issue.