digitalmars.D.announce - Visual D 0.51.0 - semantic engine based on dmd frontend
- Rainer Schuetze (27/27) Jan 18 2020 Hello,
- kinke (1/1) Jan 18 2020 Awesome, very much appreciated, thanks Rainer.
- drug (3/45) Jan 18 2020 Don't use Windows for long time but I'm impressed by your great work.
- Sebastiaan Koppe (4/10) Jan 18 2020 Nice, that is awesome. Could the engine also be re-used for in
- Rainer Schuetze (9/20) Jan 18 2020 Sure, this should be possible. This is the used dmd fork:
- kinke (6/8) Jan 18 2020 Is there a way to enforce it, e.g., via registry or by hacking
- Rainer Schuetze (4/12) Jan 18 2020 It's not in the project configuration, but the global options
- kinke (11/13) Jan 18 2020 Thx! I've immediately stumbled on an apparent missing import dir
- Rainer Schuetze (9/23) Jan 18 2020 It seems the problem is that LDC doesn't use the Visual D integration
- kinke (6/9) Jan 20 2020 After figuring that one has to open the file properties via
- Rainer Schuetze (7/18) Jan 20 2020 That can happen when the semantic analysis asserts and crashes the
- kinke (6/12) Jan 20 2020 Thx again, now I'm finally getting somewhere! Wrt. earlier,
- Rainer Schuetze (8/21) Jan 20 2020 I could avoid the crashes with this change to dmd:
- =?iso-8859-1?Q?Robert_M._M=FCnch?= (6/7) Jan 19 2020 Great stuff! Especially the debugging support.
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
Jan 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, RainerDon't use Windows for long time but I'm impressed by your great work. Keep it up!
Jan 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, RainerNice, that is awesome. Could the engine also be re-used for in e.g. the D lsp server?
Jan 18 2020
On 18/01/2020 17:43, Sebastiaan Koppe wrote:On Saturday, 18 January 2020 at 14:22:41 UTC, Rainer Schuetze wrote: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).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, RainerNice, that is awesome. Could the engine also be re-used for in e.g. the D lsp server?
Jan 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.
Jan 18 2020
On 18/01/2020 22:25, kinke wrote:On Saturday, 18 January 2020 at 14:22:41 UTC, Rainer Schuetze wrote: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...".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.
Jan 18 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
Jan 18 2020
On 19/01/2020 04:32, kinke wrote:On Saturday, 18 January 2020 at 22:32:00 UTC, Rainer Schuetze wrote: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.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
Jan 18 2020
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.
Jan 20 2020
On 20/01/2020 14:48, kinke wrote:On Sunday, 19 January 2020 at 07:04:35 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.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.
Jan 20 2020
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...
Jan 20 2020
On 21/01/2020 00:07, kinke wrote:On Monday, 20 January 2020 at 22:10:58 UTC, Rainer Schuetze wrote: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.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...
Jan 20 2020
how is the dub support work? i don't understand how to load it in visual studio is there any guide? thanks!
Sep 08 2020
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:\<you_project_dir>\ dub.exe generate visuald ``` https://dub.pm/commandline
Sep 08 2020
On Tuesday, 8 September 2020 at 19:36:51 UTC, mw wrote:On Tuesday, 8 September 2020 at 18:42:28 UTC, James wrote:then open the generated `proj.sln` file with VisualDhow 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:\<you_project_dir>\ dub.exe generate visuald ```https://dub.pm/commandline
Sep 08 2020
On Tuesday, 8 September 2020 at 19:38:17 UTC, mw wrote:On Tuesday, 8 September 2020 at 19:36:51 UTC, mw wrote:thanks a lot!On Tuesday, 8 September 2020 at 18:42:28 UTC, James wrote:then open the generated `proj.sln` file with VisualDhow 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:\<you_project_dir>\ dub.exe generate visuald ```https://dub.pm/commandline
Sep 09 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
Jan 19 2020