Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-09-09 Thread James via Digitalmars-d-announce

On Tuesday, 8 September 2020 at 19:38:17 UTC, mw wrote:

On Tuesday, 8 September 2020 at 19:36:51 UTC, mw wrote:

On Tuesday, 8 September 2020 at 18:42:28 UTC, James wrote:

how is the dub support work?

i don't understand how to load it in visual studio

is there any guide?


given you have dub.json build already,

```
C:\\ dub.exe generate visuald
```


then open the generated `proj.sln` file with VisualD



https://dub.pm/commandline


thanks a lot!


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-09-08 Thread mw via Digitalmars-d-announce

On Tuesday, 8 September 2020 at 19:36:51 UTC, mw wrote:

On Tuesday, 8 September 2020 at 18:42:28 UTC, James wrote:

how is the dub support work?

i don't understand how to load it in visual studio

is there any guide?


given you have dub.json build already,

```
C:\\ dub.exe generate visuald
```


then open the generated `proj.sln` file with VisualD



https://dub.pm/commandline




Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-09-08 Thread mw via Digitalmars-d-announce

On Tuesday, 8 September 2020 at 18:42:28 UTC, James wrote:

how is the dub support work?

i don't understand how to load it in visual studio

is there any guide?


given you have dub.json build already,

```
C:\\ dub.exe generate visuald
```

https://dub.pm/commandline


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-09-08 Thread James via Digitalmars-d-announce

how is the dub support work?

i don't understand how to load it in visual studio

is there any guide?

thanks!


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-20 Thread Rainer Schuetze via Digitalmars-d-announce



On 21/01/2020 00:07, kinke wrote:
> On Monday, 20 January 2020 at 22:10:58 UTC, Rainer Schuetze wrote:
>> That can happen when the semantic analysis asserts and crashes the
>> background process.
>>
>> It works better if you also configure the LDCshared project to define
>> version identifiers MARS and IN_LLVM (separated by a ';' as in
>> "MARS;IN_LLVM"), set the string import path "../ldc/res" and disable
>> warnings for deprecations.
> 
> Thx again, now I'm finally getting somewhere! Wrt. earlier,
> dmdserver.exe was still running in the background (but had only consumed
> 3 secs of CPU time and didn't seem to do anything anymore). Btw nice
> that that's a 64-bit executable, lots of memory for huge projects...

I could avoid the crashes with this change to dmd:
https://github.com/rainers/dmd/commit/2b3fc197bd86fc358f349182798d8142f1564177

BTW: Don't miss to enable "Colorize identifiers from semantic analysis"
for more colorful editing. This also helps the debugger a bit by
identifying compile time entities that should not be displayed in a data
tooltip, but the regular one which can show aliases and enum values not
found in the debug information.


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-20 Thread kinke via Digitalmars-d-announce

On Monday, 20 January 2020 at 22:10:58 UTC, Rainer Schuetze wrote:
That can happen when the semantic analysis asserts and crashes 
the background process.


It works better if you also configure the LDCshared project to 
define version identifiers MARS and IN_LLVM (separated by a ';' 
as in "MARS;IN_LLVM"), set the string import path "../ldc/res" 
and disable warnings for deprecations.


Thx again, now I'm finally getting somewhere! Wrt. earlier, 
dmdserver.exe was still running in the background (but had only 
consumed 3 secs of CPU time and didn't seem to do anything 
anymore). Btw nice that that's a 64-bit executable, lots of 
memory for huge projects...


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-20 Thread Rainer Schuetze via Digitalmars-d-announce



On 20/01/2020 14:48, kinke wrote:
> On Sunday, 19 January 2020 at 07:04:35 UTC, Rainer Schuetze wrote:
>> If you switch "Item Type" of one of the D files to use the "D
>> Compiler", you can set the import path to "..\ldc" so the engine can
>> find imported files.
> 
> After figuring that one has to open the file properties via right-click
> (i.e., not available in the quick properties or however they are
> called), that worked, thx.
> 
> It doesn't get past the 'Analyzing...' stage though (in tooltips), no
> [IntelliSense] errors show up in the errors pane.

That can happen when the semantic analysis asserts and crashes the
background process.

It works better if you also configure the LDCshared project to define
version identifiers MARS and IN_LLVM (separated by a ';' as in
"MARS;IN_LLVM"), set the string import path "../ldc/res" and disable
warnings for deprecations.


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-20 Thread kinke via Digitalmars-d-announce

On Sunday, 19 January 2020 at 07:04:35 UTC, Rainer Schuetze wrote:
If you switch "Item Type" of one of the D files to use the "D 
Compiler", you can set the import path to "..\ldc" so the 
engine can find imported files.


After figuring that one has to open the file properties via 
right-click (i.e., not available in the quick properties or 
however they are called), that worked, thx.


It doesn't get past the 'Analyzing...' stage though (in 
tooltips), no [IntelliSense] errors show up in the errors pane.


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-19 Thread Robert M. Münch via Digitalmars-d-announce

On 2020-01-18 14:22:41 +, Rainer Schuetze said:


I'm happy to announce the release of Visual D 0.51.0.


Great stuff! Especially the debugging support.

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread Rainer Schuetze via Digitalmars-d-announce



On 19/01/2020 04:32, kinke wrote:
> On Saturday, 18 January 2020 at 22:32:00 UTC, Rainer Schuetze wrote:
>> It's not in the project configuration, but the global options
>> "Tools->Options->Text Editor->D->Intellisense"
> 
> Thx! I've immediately stumbled on an apparent missing import dir with
> the LDC solution, i.e., the project's src dir root doesn't seem to get
> added - no problem with the old engine.
> 
> To reproduce:
> * cmake -G "Visual Studio 16 2019" -A x64 -DLLVM_ROOT_DIR=...
> -DD_COMPILER=...\ldmd2 ...\ldc-src
> * Open solution
> * Open any .d file in the LDCShared project and notice that all imports
> fail with the new engine

It seems the problem is that LDC doesn't use the Visual D integration
into msbuild, but custom build rules. That hides the import settings.

If you switch "Item Type" of one of the D files to use the "D Compiler",
you can set the import path to "..\ldc" so the engine can find imported
files.

The old engine scans the source folder for any D files, but that can
also cause problems if there are multiple versions of the same module in
some subdirectory.


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread kinke via Digitalmars-d-announce
On Saturday, 18 January 2020 at 22:32:00 UTC, Rainer Schuetze 
wrote:
It's not in the project configuration, but the global options 
"Tools->Options->Text Editor->D->Intellisense"


Thx! I've immediately stumbled on an apparent missing import dir 
with the LDC solution, i.e., the project's src dir root doesn't 
seem to get added - no problem with the old engine.


To reproduce:
* cmake -G "Visual Studio 16 2019" -A x64 -DLLVM_ROOT_DIR=... 
-DD_COMPILER=...\ldmd2 ...\ldc-src

* Open solution
* Open any .d file in the LDCShared project and notice that all 
imports fail with the new engine


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread Rainer Schuetze via Digitalmars-d-announce



On 18/01/2020 22:25, kinke wrote:
> On Saturday, 18 January 2020 at 14:22:41 UTC, Rainer Schuetze wrote:
>> It is still considered experimental and has to be enabled on the
>> respective language options page.
> 
> Is there a way to enforce it, e.g., via registry or by hacking the
> project files, for regular VS projects (such as the VS solution for LDC
> generated by CMake)? I can't find any such options page.
> 

It's not in the project configuration, but the global options
"Tools->Options->Text Editor->D->Intellisense" or via the Visual D menu
"Open Language Options...".


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread kinke via Digitalmars-d-announce
On Saturday, 18 January 2020 at 14:22:41 UTC, Rainer Schuetze 
wrote:
It is still considered experimental and has to be enabled on 
the respective language options page.


Is there a way to enforce it, e.g., via registry or by hacking 
the project files, for regular VS projects (such as the VS 
solution for LDC generated by CMake)? I can't find any such 
options page.




Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread Rainer Schuetze via Digitalmars-d-announce



On 18/01/2020 17:43, Sebastiaan Koppe wrote:
> On Saturday, 18 January 2020 at 14:22:41 UTC, Rainer Schuetze wrote:
>> This version features a first version of an intellisense engine that
>> is based on the DMD frontend (as of version 2.090) for semantic
>> analysis. It is still considered experimental and has to be enabled on
>> the respective language options page.
>>
>> Cheers,
>> Rainer
> 
> Nice, that is awesome. Could the engine also be re-used for in e.g. the
> D lsp server?

Sure, this should be possible. This is the used dmd fork:
https://github.com/rainers/dmd/tree/dmdserver and most of the client
code is here: https://github.com/dlang/visuald/tree/master/vdc/dmdserver

The frontend doesn't make it easy to implement other functionality like
refactoring and formatting, though. On the other hand, running both
libdparse and another engine in parallel doesn't seem desirable, too. So
it is not easy to get the best of both engines (it is currently similar
with DParser and dmdserver).


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Saturday, 18 January 2020 at 14:22:41 UTC, Rainer Schuetze 
wrote:
This version features a first version of an intellisense engine 
that is based on the DMD frontend (as of version 2.090) for 
semantic analysis. It is still considered experimental and has 
to be enabled on the respective language options page.


Cheers,
Rainer


Nice, that is awesome. Could the engine also be re-used for in 
e.g. the D lsp server?


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread drug via Digitalmars-d-announce

18.01.2020 17:22, Rainer Schuetze пишет:

Hello,

I'm happy to announce the release of Visual D 0.51.0.

Visual D is a Visual Studio extension that adds D language support to
VS2008-2019. The installers can be found at
http://rainers.github.io/visuald/visuald/StartPage.html


This version features a first version of an intellisense engine that is
based on the DMD frontend (as of version 2.090) for semantic analysis.
It is still considered experimental and has to be enabled on the
respective language options page. When comparing this new engine to the
regular engine which is based on DParser that used to power Mono-D:

- it does a full semantic analysis and shows the same errors as dmd
would do. DParser only marks parser issues.

- browsing compilable code works quite well (e.g. inference of auto
types is not an issue anymore).

- semantic highlighting is faster and more accurate.

- completion is yet not very good, especially while the currently edited
code has parsing errors.

- as dmd itself it can require quite a bit of memory, though a variety
of false and stale pointer issues have been fixed to help the precise GC.

Other highlights of this release:

- Ctrl+Click goto definition added for VS2017+

- visualdproj projects: basic DUB support: upgrade and refresh if
project contains dub.json or dub.sdl

See https://rainers.github.io/visuald/visuald/VersionHistory.html for
the complete list of changes

Cheers,
Rainer

Don't use Windows for long time but I'm impressed by your great work. 
Keep it up!


Re: Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread kinke via Digitalmars-d-announce

Awesome, very much appreciated, thanks Rainer.


Visual D 0.51.0 - semantic engine based on dmd frontend

2020-01-18 Thread Rainer Schuetze via Digitalmars-d-announce
Hello,

I'm happy to announce the release of Visual D 0.51.0.

Visual D is a Visual Studio extension that adds D language support to
VS2008-2019. The installers can be found at
http://rainers.github.io/visuald/visuald/StartPage.html


This version features a first version of an intellisense engine that is
based on the DMD frontend (as of version 2.090) for semantic analysis.
It is still considered experimental and has to be enabled on the
respective language options page. When comparing this new engine to the
regular engine which is based on DParser that used to power Mono-D:

- it does a full semantic analysis and shows the same errors as dmd
would do. DParser only marks parser issues.

- browsing compilable code works quite well (e.g. inference of auto
types is not an issue anymore).

- semantic highlighting is faster and more accurate.

- completion is yet not very good, especially while the currently edited
code has parsing errors.

- as dmd itself it can require quite a bit of memory, though a variety
of false and stale pointer issues have been fixed to help the precise GC.

Other highlights of this release:

- Ctrl+Click goto definition added for VS2017+

- visualdproj projects: basic DUB support: upgrade and refresh if
project contains dub.json or dub.sdl

See https://rainers.github.io/visuald/visuald/VersionHistory.html for
the complete list of changes

Cheers,
Rainer