Thread overview
Visual D and 'Find all references' broke
Jun 04, 2016
Pie?
Jun 05, 2016
Rainer Schuetze
Jun 05, 2016
Pie?
Jun 05, 2016
Pie?
Jun 06, 2016
Rainer Schuetze
Jun 07, 2016
Pie?
Jun 08, 2016
Rainer Schuetze
June 04, 2016
Find all references doesn't work in visual D. It just returns the selected text. Would be nice if it worked, even if it just did a match on the current file. Is this possible?
June 05, 2016

On 04.06.2016 17:17, Pie? wrote:
> Find all references doesn't work in visual D. It just returns the
> selected text. Would be nice if it worked, even if it just did a match
> on the current file. Is this possible?

Unfortunately, the implementation of "Find all references" is rather incomplete (In my short experiments it worked for local variables, but that's not a really its purpose). It uses the same semantic engine as Mono-D which seems to perform much better. So it could just be a matter of fixing some bugs, but I didn't have time to get back to it recently...

Pull requests welcome :D
June 05, 2016
On Sunday, 5 June 2016 at 15:36:15 UTC, Rainer Schuetze wrote:
>
>
> On 04.06.2016 17:17, Pie? wrote:
>> Find all references doesn't work in visual D. It just returns the
>> selected text. Would be nice if it worked, even if it just did a match
>> on the current file. Is this possible?
>
> Unfortunately, the implementation of "Find all references" is rather incomplete (In my short experiments it worked for local variables, but that's not a really its purpose). It uses the same semantic engine as Mono-D which seems to perform much better. So it could just be a matter of fixing some bugs, but I didn't have time to get back to it recently...
>
> Pull requests welcome :D

How difficult is it to setup an maintain? Can I open the project in Visual Studio, make a change, compile and restart a VS test project and check the changes? Or have you already setup everything to play nice?


June 05, 2016
On Sunday, 5 June 2016 at 22:19:17 UTC, Pie? wrote:
> On Sunday, 5 June 2016 at 15:36:15 UTC, Rainer Schuetze wrote:
>>
>>
>> On 04.06.2016 17:17, Pie? wrote:
>>> [...]
>>
>> Unfortunately, the implementation of "Find all references" is rather incomplete (In my short experiments it worked for local variables, but that's not a really its purpose). It uses the same semantic engine as Mono-D which seems to perform much better. So it could just be a matter of fixing some bugs, but I didn't have time to get back to it recently...
>>
>> Pull requests welcome :D
>
> How difficult is it to setup an maintain? Can I open the project in Visual Studio, make a change, compile and restart a VS test project and check the changes? Or have you already setup everything to play nice?

What I mean is, am I going to have to do a lot of work to make it work on my system or can I just dive in and make changes and it work ;) (I'm lazy/don't have a lot of time)
June 07, 2016

On 06.06.2016 00:25, Pie? wrote:
> On Sunday, 5 June 2016 at 22:19:17 UTC, Pie? wrote:
>> On Sunday, 5 June 2016 at 15:36:15 UTC, Rainer Schuetze wrote:
>>>
>>>
>>> On 04.06.2016 17:17, Pie? wrote:
>>>> [...]
>>>
>>> Unfortunately, the implementation of "Find all references" is rather
>>> incomplete (In my short experiments it worked for local variables,
>>> but that's not a really its purpose). It uses the same semantic
>>> engine as Mono-D which seems to perform much better. So it could just
>>> be a matter of fixing some bugs, but I didn't have time to get back
>>> to it recently...
>>>
>>> Pull requests welcome :D
>>
>> How difficult is it to setup an maintain? Can I open the project in
>> Visual Studio, make a change, compile and restart a VS test project
>> and check the changes? Or have you already setup everything to play nice?
>
> What I mean is, am I going to have to do a lot of work to make it work
> on my system or can I just dive in and make changes and it work ;) (I'm
> lazy/don't have a lot of time)

Unfortunately it's not super-easy, but if you only want to work on the semantic engine, it might be not too complicated as you don't have to build Visual D itself:

- make a clone of the Visual D repository
- make sure you also update D_Parser as a submodule in vdc/abothe/Parser
- load solution vdc/abothe/VDserver.sln
- make sure there is no other process DParserCOMServer.exe running, e.g. by closing all Visual Studio processes that have D files loaded
- build and run DParserCOMServer
- set a breakpoint in GetReferences() in vdc\abothe\comserver\VDServer.cs
- start another instance of VS, it should attach to your DParserCOMServer process and call GetReferences() if you issue "Find all References"
- you should be able to step through the code and fix all bugs ;-)

Good luck!
June 07, 2016
On Monday, 6 June 2016 at 22:21:04 UTC, Rainer Schuetze wrote:
>
>
> On 06.06.2016 00:25, Pie? wrote:
>> On Sunday, 5 June 2016 at 22:19:17 UTC, Pie? wrote:
>>> On Sunday, 5 June 2016 at 15:36:15 UTC, Rainer Schuetze wrote:
>>>> [...]
>>>
>>> How difficult is it to setup an maintain? Can I open the project in
>>> Visual Studio, make a change, compile and restart a VS test project
>>> and check the changes? Or have you already setup everything to play nice?
>>
>> What I mean is, am I going to have to do a lot of work to make it work
>> on my system or can I just dive in and make changes and it work ;) (I'm
>> lazy/don't have a lot of time)
>
> Unfortunately it's not super-easy, but if you only want to work on the semantic engine, it might be not too complicated as you don't have to build Visual D itself:
>
> - make a clone of the Visual D repository
> - make sure you also update D_Parser as a submodule in vdc/abothe/Parser
> - load solution vdc/abothe/VDserver.sln
> - make sure there is no other process DParserCOMServer.exe running, e.g. by closing all Visual Studio processes that have D files loaded
> - build and run DParserCOMServer
> - set a breakpoint in GetReferences() in vdc\abothe\comserver\VDServer.cs
> - start another instance of VS, it should attach to your DParserCOMServer process and call GetReferences() if you issue "Find all References"
> - you should be able to step through the code and fix all bugs ;-)
>
> Good luck!

Thanks, I'll give work on getting it setup in the near future. can I accomplish the following in the semantic engine?

1. search and replace
2. Debug helpers: e.g., .net's ToString() and debugger qualifiers like ,ac(re-evaluates expression each time), etc...
3. mixin debugging helpers. (e.g., show the mixin expression to the user and possibly the line that is failing).




June 08, 2016

On 07.06.2016 23:41, Pie? wrote:
> Thanks, I'll give work on getting it setup in the near future. can I
> accomplish the following in the semantic engine?
>
> 1. search and replace

I guess you mean renaming some symbol and replace all references? This is "Find References" (this is in the semantic engine) plus changing the source (this needs to be done by Visual D itself).

> 2. Debug helpers: e.g., .net's ToString() and debugger qualifiers like
> ,ac(re-evaluates expression each time), etc...

No, the debug engine is a different component (see mago).

> 3. mixin debugging helpers. (e.g., show the mixin expression to the user
> and possibly the line that is failing).

This could be possible, e.g. by presenting the mixin string in the tooltip.