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


Re: Prettify and Resync are now open source too

2020-01-18 Thread Ron Tarrant via Digitalmars-d-announce

On Friday, 19 May 2017 at 16:22:36 UTC, Ecstatic Coder wrote:


* Prettify : a source code prettifier for D and other languages.


Works like a charm. Thanks!