Jump to page: 1 2
Thread overview
Visual D 0.51.0 - semantic engine based on dmd frontend
Jan 18, 2020
Rainer Schuetze
Jan 18, 2020
kinke
Jan 18, 2020
drug
Jan 18, 2020
Sebastiaan Koppe
Jan 18, 2020
Rainer Schuetze
Jan 18, 2020
kinke
Jan 18, 2020
Rainer Schuetze
Jan 19, 2020
kinke
Jan 19, 2020
Rainer Schuetze
Jan 20, 2020
kinke
Jan 20, 2020
Rainer Schuetze
Jan 20, 2020
kinke
Jan 21, 2020
Rainer Schuetze
Sep 08, 2020
James
Sep 08, 2020
mw
Sep 08, 2020
mw
Sep 10, 2020
James
Jan 19, 2020
Robert M. Münch
January 18, 2020
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
January 18, 2020
Awesome, very much appreciated, thanks Rainer.
January 18, 2020
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!
January 18, 2020
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?
January 18, 2020

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).
January 18, 2020
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.

January 18, 2020

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...".
January 19, 2020
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
January 19, 2020

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.
January 19, 2020
On 2020-01-18 14:22:41 +0000, 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

« First   ‹ Prev
1 2