www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Give DLS a try

reply Tab <tab xyz.mno> writes:
I find DLS [1] to be very stable, updated more often [2], and it 
just works without issues (vs. Code-d)  ~~ at least for me. I 
think we should give it a chance.

I created a long list of features [3] I'd like to see in D IDE. 
Hopefully some of them is being worked on.


[1]: 
https://marketplace.visualstudio.com/items?itemName=LaurentTreguier.vscode-dls
[2]: 
https://github.com/LaurentTreguier/dls/blob/master/CHANGELOG.md
[3]: https://github.com/dlang-vscode/dlang-vscode/issues/53
Aug 08 2018
next sibling parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Wednesday, 8 August 2018 at 07:25:57 UTC, Tab wrote:
 I find DLS to be very stable
Ironically, as the developer of DLS, I'm not sure if it should be considered as stable. I've had quite a number of crashes myself, sometimes even seemingly right at startup :/ Although the latest version does fix a crash that was happening during garbage collection, so now it might be more stable. (Fun fact: since garbage collection always happens at least when the program exits, it was technically crashing 100% of the time before)
 I created a long list of features I'd like to see in D IDE. 
 Hopefully some of them is being worked on.
I have some things to fix first, but they will be worked on at some point; finding all references to a symbol especially is something that interests me.
Aug 08 2018
next sibling parent reply tide <tide tide.tide> writes:
On Wednesday, 8 August 2018 at 07:57:49 UTC, Laurent Tréguier 
wrote:
 On Wednesday, 8 August 2018 at 07:25:57 UTC, Tab wrote:
 I find DLS to be very stable
Ironically, as the developer of DLS, I'm not sure if it should be considered as stable. I've had quite a number of crashes myself, sometimes even seemingly right at startup :/ Although the latest version does fix a crash that was happening during garbage collection, so now it might be more stable. (Fun fact: since garbage collection always happens at least when the program exits, it was technically crashing 100% of the time before)
 I created a long list of features I'd like to see in D IDE. 
 Hopefully some of them is being worked on.
I have some things to fix first, but they will be worked on at some point; finding all references to a symbol especially is something that interests me.
Code-d overcomplicates things I find though. I can't even build it, there's so many dependencies attached to it that it isn't worth looking through to even find which one is causing the build issue. Let alone there's a restriction that it can only build 32-bit. Also can't be built with LDC2 cause of the dependencies is trying to build a 64-bit binary even though the arch is set to 32-bit. It's a mess. DLS took no time at all to build, nice and simple. Just one thing is installing the extension didn't create that symbolic link for me. And the plugin just silently passes an empty path if it can't find DLS. https://github.com/LaurentTreguier/vscode-dls/blob/master/src/extension.ts#L20
Aug 08 2018
next sibling parent Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Wednesday, 8 August 2018 at 20:56:51 UTC, tide wrote:
 DLS took no time at all to build, nice and simple.
The only thing built is a small bootstrap program that downloads a prebuilt binary release, that's why it's fast. Before v0.5.0, DLS was always compiled, and that took some time, as well as 3 GB of your RAM...
 Just one thing is installing the extension didn't create that 
 symbolic link for me. And the plugin just silently passes an 
 empty path if it can't find DLS.

 https://github.com/LaurentTreguier/vscode-dls/blob/master/src/extension.ts#L20
That's weird. What OS are you using ? There was a bug at some point with symlink creation on Windows, but it should be fixed now. For some reason it takes a crazy amount of time instead now, 30 seconds for a simple symlink... If you have more info about this, you can always post an issue: https://github.com/LaurentTreguier/dls/issues
Aug 09 2018
prev sibling parent reply IM <3di gm.com> writes:
On Wednesday, 8 August 2018 at 20:56:51 UTC, tide wrote:
 On Wednesday, 8 August 2018 at 07:57:49 UTC, Laurent Tréguier 
 wrote:
 [...]
Code-d overcomplicates things I find though. I can't even build it, there's so many dependencies attached to it that it isn't worth looking through to even find which one is causing the build issue. Let alone there's a restriction that it can only build 32-bit. Also can't be built with LDC2 cause of the dependencies is trying to build a 64-bit binary even though the arch is set to 32-bit. It's a mess. DLS took no time at all to build, nice and simple. Just one thing is installing the extension didn't create that symbolic link for me. And the plugin just silently passes an empty path if it can't find DLS. https://github.com/LaurentTreguier/vscode-dls/blob/master/src/extension.ts#L20
I've always had issues with Code-d! I filed several issues on its GitHub repo, but my experience with the Code-d author was that those issues are likely to remain open and unaddressed. I switched to DLS and I'm much happier now. I'm glad we have options. So thanks for the hard work and keep it up!
Aug 09 2018
parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Thursday, 9 August 2018 at 10:37:32 UTC, IM wrote:
 I've always had issues with Code-d! I filed several issues on 
 its GitHub repo, but my experience with the Code-d author was 
 that those issues are likely to remain open and unaddressed.
Since he is a student (or at least he was some time ago, I don't know if it's still the case), he might simply have had little time to work on it, depending on the period of the year.
 I switched to DLS and I'm much happier now. I'm glad we have 
 options. So thanks for the hard work and keep it up!
I'll try to keep it up :)
Aug 09 2018
parent reply Domain <dont_email empty.com> writes:
On Thursday, 9 August 2018 at 11:48:55 UTC, Laurent Tréguier 
wrote:
 On Thursday, 9 August 2018 at 10:37:32 UTC, IM wrote:
 I've always had issues with Code-d! I filed several issues on 
 its GitHub repo, but my experience with the Code-d author was 
 that those issues are likely to remain open and unaddressed.
Since he is a student (or at least he was some time ago, I don't know if it's still the case), he might simply have had little time to work on it, depending on the period of the year.
 I switched to DLS and I'm much happier now. I'm glad we have 
 options. So thanks for the hard work and keep it up!
I'll try to keep it up :)
I just give it a try in visual studio code, but I got errors: [Error - 20:39:54] Starting client failed Error: Unsupported server configuration { "command": "" } at _getServerWorkingDir.then.serverWorkingDir (C:\Users\Domain-Work\.vscode\extensions\laurenttreguier.vscode-dls-1.6.3\node_modules\vscode-languageclient\lib\main.js:356:35) at <anonymous>
Aug 09 2018
next sibling parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Thursday, 9 August 2018 at 12:42:45 UTC, Domain wrote:
 I just give it a try in visual studio code, but I got errors:

 [Error - 20:39:54] Starting client failed
 Error: Unsupported server configuration {
     "command": ""
 }
 	at _getServerWorkingDir.then.serverWorkingDir 
 (C:\Users\Domain-Work\.vscode\extensions\laurenttreguier.vscode-dls-1.6.3\node_modules\vscode-languageclient\lib\main.js:356:35)
 	at <anonymous>
Now that looks exactly like the bug I thought I had gotten rid of... The bug was that on Windows, the bootstrap program could exit before the symbolic link to dls.exe was created, so the extension was left without anything to launch. Does it continue like this after reloading VSCode's window ? Creating symlinks requires admin rights on Windows. In order to do that I'm launching a powershell command to bring up the User Account Control popup. I'm no Windows expert, so on some machines it could fail due to some strict policy about powershell execution, or simply not having the possibility to gain admin rights. I was thinking about working around that problem in the next version; requiring admin rights for something like this is obviously not really optimal.
Aug 09 2018
parent reply tide <tide tide.tide> writes:
On Thursday, 9 August 2018 at 13:02:47 UTC, Laurent Tréguier 
wrote:
 On Thursday, 9 August 2018 at 12:42:45 UTC, Domain wrote:
 I just give it a try in visual studio code, but I got errors:

 [Error - 20:39:54] Starting client failed
 Error: Unsupported server configuration {
     "command": ""
 }
 	at _getServerWorkingDir.then.serverWorkingDir 
 (C:\Users\Domain-Work\.vscode\extensions\laurenttreguier.vscode-dls-1.6.3\node_modules\vscode-languageclient\lib\main.js:356:35)
 	at <anonymous>
Now that looks exactly like the bug I thought I had gotten rid of... The bug was that on Windows, the bootstrap program could exit before the symbolic link to dls.exe was created, so the extension was left without anything to launch. Does it continue like this after reloading VSCode's window ? Creating symlinks requires admin rights on Windows. In order to do that I'm launching a powershell command to bring up the User Account Control popup. I'm no Windows expert, so on some machines it could fail due to some strict policy about powershell execution, or simply not having the possibility to gain admin rights. I was thinking about working around that problem in the next version; requiring admin rights for something like this is obviously not really optimal.
Yah that's what I was getting. You should possibly find another way other than symbolic links. I don't think you'll get access to admin rights unless you restart VS Code with them.
Aug 09 2018
parent Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Thursday, 9 August 2018 at 22:56:02 UTC, tide wrote:
 Yah that's what I was getting. You should possibly find another 
 way other than symbolic links. I don't think you'll get access 
 to admin rights unless you restart VS Code with them.
No, I certainly don't need VSCode to be launched with admin rights. That would be madness... That's why I was talking about powershell, I'm launching `powershell.exe Start-Process [...] -Verb runas` to start the symlink command with admin rights. `-Verb runas` will make Windows graphically ask you to grant admin rights when launching the command, but the rest of the program will always run without privileges.
Aug 09 2018
prev sibling parent Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Thursday, 9 August 2018 at 12:42:45 UTC, Domain wrote:
 I just give it a try in visual studio code, but I got errors:

 [Error - 20:39:54] Starting client failed
 Error: Unsupported server configuration {
     "command": ""
 }
 	at _getServerWorkingDir.then.serverWorkingDir 
 (C:\Users\Domain-Work\.vscode\extensions\laurenttreguier.vscode-dls-1.6.3\node_modules\vscode-languageclient\lib\main.js:356:35)
 	at <anonymous>
Do you have ldc.exe in your PATH by any chance ? I've just realized this can screw up everything; a patched version is on the way. I really don't think we can call it "stable"...
Aug 09 2018
prev sibling parent reply Soulsbane <viserion.thrall gmail.com> writes:
On Wednesday, 8 August 2018 at 07:57:49 UTC, Laurent Tréguier 
wrote:
 On Wednesday, 8 August 2018 at 07:25:57 UTC, Tab wrote:
 I find DLS to be very stable
Perhaps I missed it but is there an option to disable dfmt completely. I see several options, for example, d.dls.format.dfmtSoftMaxLineLength. Other than that dls is working great for me so far! Thanks a lot for this!
Aug 14 2018
parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Tuesday, 14 August 2018 at 21:07:34 UTC, Soulsbane wrote:
 Perhaps I missed it but is there an option to disable dfmt 
 completely. I see several options, for example, 
 d.dls.format.dfmtSoftMaxLineLength.
If you're using the VSCode extension or Atom package, then there is no way to deactivate any features, I'm going to add that to the extensions' settings.
Aug 14 2018
parent reply Soulsbane <viserion.thrall gmail.com> writes:
On Tuesday, 14 August 2018 at 22:24:48 UTC, Laurent Tréguier 
wrote:
 On Tuesday, 14 August 2018 at 21:07:34 UTC, Soulsbane wrote:
 Perhaps I missed it but is there an option to disable dfmt 
 completely. I see several options, for example, 
 d.dls.format.dfmtSoftMaxLineLength.
If you're using the VSCode extension or Atom package, then there is no way to deactivate any features, I'm going to add that to the extensions' settings.
No problem. Thanks! It's the mainly the d.dls.format.dfmtBraceStyle that is bothering me. It seems each one uses the if () style and I prefer if(). If that makes sense. Again, thanks a lot for this!
Aug 14 2018
next sibling parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Tuesday, 14 August 2018 at 23:24:58 UTC, Soulsbane wrote:
 No problem. Thanks! It's the mainly the 
 d.dls.format.dfmtBraceStyle that is bothering me. It seems each 
 one uses the if () style and I prefer if(). If that makes 
 sense. Again, thanks a lot for this!
Maybe this should simply be a new feature for DFMT then.
Aug 14 2018
parent reply Soulsbane <viserion.thrall gmail.com> writes:
On Wednesday, 15 August 2018 at 01:26:36 UTC, Laurent Tréguier 
wrote:
 On Tuesday, 14 August 2018 at 23:24:58 UTC, Soulsbane wrote:
 No problem. Thanks! It's the mainly the 
 d.dls.format.dfmtBraceStyle that is bothering me. It seems 
 each one uses the if () style and I prefer if(). If that makes 
 sense. Again, thanks a lot for this!
Maybe this should simply be a new feature for DFMT then.
That's true. code-d has a setting to completely disable it but I have no idea how each of your projects works. I think I'll post an issue with DFMT repository. Btw, what path does dls search for the dfmt executable? I put my compiled version in my $PATH and it's not picking it up. This is on Linux.
Aug 14 2018
parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Wednesday, 15 August 2018 at 02:40:03 UTC, Soulsbane wrote:
 Btw, what path does dls search for the dfmt executable? I put 
 my compiled version in my $PATH and it's not picking it up. 
 This is on Linux.
It doesn't use anything on your machine, it uses DCD, D-Scanner and DFMT as libraries instead.
Aug 15 2018
parent Soulsbane <paul acheronsoft.com> writes:
On Wednesday, 15 August 2018 at 11:34:42 UTC, Laurent Tréguier 
wrote:
 On Wednesday, 15 August 2018 at 02:40:03 UTC, Soulsbane wrote:
 Btw, what path does dls search for the dfmt executable? I put 
 my compiled version in my $PATH and it's not picking it up. 
 This is on Linux.
It doesn't use anything on your machine, it uses DCD, D-Scanner and DFMT as libraries instead.
Ok, thanks a lot for your help!
Aug 15 2018
prev sibling parent reply Seb <seb wilzba.ch> writes:
On Tuesday, 14 August 2018 at 23:24:58 UTC, Soulsbane wrote:
 On Tuesday, 14 August 2018 at 22:24:48 UTC, Laurent Tréguier 
 wrote:
 On Tuesday, 14 August 2018 at 21:07:34 UTC, Soulsbane wrote:
 Perhaps I missed it but is there an option to disable dfmt 
 completely. I see several options, for example, 
 d.dls.format.dfmtSoftMaxLineLength.
If you're using the VSCode extension or Atom package, then there is no way to deactivate any features, I'm going to add that to the extensions' settings.
No problem. Thanks! It's the mainly the d.dls.format.dfmtBraceStyle that is bothering me. It seems each one uses the if () style and I prefer if(). If that makes sense. Again, thanks a lot for this!
In theory it would be `dfmt_space_after_keywords` in the .editorconfig, but it's not implemented yet: https://github.com/dlang-community/dfmt#dfmt-specific-properties
Aug 15 2018
parent Soulsbane <paul acheronsoft.com> writes:
On Wednesday, 15 August 2018 at 09:11:08 UTC, Seb wrote:
 In theory it would be `dfmt_space_after_keywords` in the 
 .editorconfig, but it's not implemented yet:

 https://github.com/dlang-community/dfmt#dfmt-specific-properties
That's interesting! Thanks for the info!
Aug 15 2018
prev sibling next sibling parent Andrea Fontana <nospam example.com> writes:
On Wednesday, 8 August 2018 at 07:25:57 UTC, Tab wrote:
 I find DLS [1] to be very stable, updated more often [2], and 
 it just works without issues (vs. Code-d)  ~~ at least for me. 
 I think we should give it a chance.
I agree.
 I created a long list of features [3] I'd like to see in D IDE. 
 Hopefully some of them is being worked on.
A list of features posted on wrong project page :) Right link: https://github.com/LaurentTreguier/dls/ Andrea
Aug 09 2018
prev sibling parent reply w0rp <devw0rp gmail.com> writes:
For those who like Vim, I opened an issue for adding dls support 
to ALE. https://github.com/w0rp/ale/issues/1812 I might work on 
it myself some day, or someone else can set it up.

ALE is a linter plugin for Vim I wrote, which is now the most 
popular one after Syntastic and offers some language server 
support. It should be possible to set it up so ALE will find and 
run `dls` automatically.
Aug 14 2018
parent Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Tuesday, 14 August 2018 at 10:43:01 UTC, w0rp wrote:
 For those who like Vim, I opened an issue for adding dls 
 support to ALE. https://github.com/w0rp/ale/issues/1812 I might 
 work on it myself some day, or someone else can set it up.

 ALE is a linter plugin for Vim I wrote, which is now the most 
 popular one after Syntastic and offers some language server 
 support. It should be possible to set it up so ALE will find 
 and run `dls` automatically.
I don't know what would be needed for this, but I can answer any question you might have. Finding dls, at least, should be easy: it's located at `%LOCALAPPDATA%\dub\packages\.bin\dls-latest\dls.exe` on Windows, and `$HOME/.dub/packages/.bin/dls-latest/dls` on Posix systems.
Aug 14 2018