www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - code-d 0.12.0 - The user friendly release (code-d for noobs)

reply WebFreak001 <janju007 web.de> writes:
I've been working a lot on the new features for code-d to improve 
the user experience for new users and lower the barrier of 
creating D projects.

The new release contains:
* dub.json editor GUI [1] <- biggest one this update
* creation of D projects from templates [2]
* detection of missing tools & installation
* helping user setup paths for auto completion

The dub.json GUI is designed like the project settings from 

interface to set all values. Only dependencies are currently a 
bit less friendly to use due to limitations of the HTML preview 
of vscode. Currently the editor as well as most other code-d 
features don't support sub-packages yet.

Also I have made a few templates [3] (10 as of now) for project 
creation which is basically like dub init from the IDE. If anyone 
has made some common library like gtk-d, dlangui or vibe.d and 
wants to include a project template in code-d, just PR or post an 
issue on the project page https://github.com/Pure-D/code-d


Getting the newest release is really easy now, as workspace-d and 
other dependencies will be installed for you. Simply get vscode 
and use the extension manager to install code-d. You should be 
guided through the rest using some notification messages at the 
top.

If you find any issues in this new release please post an issue 
on the project page. Thanks for taking your time to read this.

[1] https://github.com/Pure-D/code-d/wiki/Dub-Project-Settings
[2] https://github.com/Pure-D/code-d/wiki/Project-Creation
[3] https://github.com/Pure-D/code-d/tree/master/templates
Oct 04 2016
next sibling parent reply Suliman <evermind live.ru> writes:
Please, add Sublime support
Oct 04 2016
next sibling parent reply Rory McGuire via Digitalmars-d-announce writes:
On Wed, Oct 5, 2016 at 7:53 AM, Suliman via Digitalmars-d-announce <
digitalmars-d-announce puremagic.com> wrote:

 Please, add Sublime support
WebFreak001: I too am curious as to why you chose to support two obscure editors rather than Sublime as your first supported editors. (Obscure compared to Sublime anyway). First thing that comes to mind is Sublime is closed source, then one thinks why not limetext, then I realise that feels like a tip of the hat to #golang which feels like betrayal in some ways :D. Really like what you are doing with workspace-d regardless of the Sublime Text support. PS: is it because those two editors are JS based? PS2: dml completion...nice! Really want to try that out since dlangui got console support.
Oct 05 2016
parent reply WebFreak001 <janju007 web.de> writes:
On Wednesday, 5 October 2016 at 07:44:00 UTC, Rory McGuire wrote:
 On Wed, Oct 5, 2016 at 7:53 AM, Suliman via 
 Digitalmars-d-announce < digitalmars-d-announce puremagic.com> 
 wrote:

 Please, add Sublime support
WebFreak001: I too am curious as to why you chose to support two obscure editors rather than Sublime as your first supported editors. (Obscure compared to Sublime anyway). First thing that comes to mind is Sublime is closed source, then one thinks why not limetext, then I realise that feels like a tip of the hat to #golang which feels like betrayal in some ways :D. Really like what you are doing with workspace-d regardless of the Sublime Text support. PS: is it because those two editors are JS based? PS2: dml completion...nice! Really want to try that out since dlangui got console support.
well having JS support is great because it means I don't need to port my code, but I didn't add support to sublime because I never used it. Especially the fact that you can buy it makes me wanna not get it becuase that means the free version has some disadvantages to the paid version. And its just a simple text editor, not really wanting to pay for that. Especially for that price.
Oct 05 2016
next sibling parent reply Rory McGuire via Digitalmars-d-announce writes:
On Wed, Oct 5, 2016 at 3:22 PM, WebFreak001 via Digitalmars-d-announce <
digitalmars-d-announce puremagic.com> wrote:

 On Wednesday, 5 October 2016 at 07:44:00 UTC, Rory McGuire wrote:

 On Wed, Oct 5, 2016 at 7:53 AM, Suliman via Digitalmars-d-announce <
 digitalmars-d-announce puremagic.com> wrote:

 Please, add Sublime support

  WebFreak001: I too am curious as to why you chose to support two obscure
 editors rather than Sublime as your first supported editors. (Obscure
 compared to Sublime anyway).

 First thing that comes to mind is Sublime is closed source, then one
 thinks why not limetext, then I realise that feels like a tip of the hat to
 #golang which feels like betrayal in some ways :D.

 Really like what you are doing with workspace-d regardless of the Sublime
 Text support.

 PS: is it because those two editors are JS based?
 PS2: dml completion...nice! Really want to try that out since dlangui got
 console support.
well having JS support is great because it means I don't need to port my code, but I didn't add support to sublime because I never used it. Especially the fact that you can buy it makes me wanna not get it becuase that means the free version has some disadvantages to the paid version. And its just a simple text editor, not really wanting to pay for that. Especially for that price.
I haven't used anything else since I started using Sublime because of CTRL+d (multi select the next match of my current selection) and fuzzy search of the available commands.
Oct 05 2016
next sibling parent drug <drug2004 bk.ru> writes:
05.10.2016 16:32, Rory McGuire via Digitalmars-d-announce пишет:
 I haven't used anything else since I started using Sublime because of
 CTRL+d (multi select the next match of my current selection) and fuzzy
 search of the available commands.
Agreed sublime has something that don't let me give it up... It lacks some features of course, but nevertheless I can't to switch to something else.
Oct 05 2016
prev sibling parent reply Wild <xwildn00bx gmail.com> writes:
On Wednesday, 5 October 2016 at 13:32:55 UTC, Rory McGuire wrote:
 I haven't used anything else since I started using Sublime 
 because of CTRL+d (multi select the next match of my current 
 selection) and fuzzy search of the available commands.
Both Atom and Vscode have the ctrl+d feature and should have the fuzzy features (I don't remember). After all Atom and Vscode are open source clones of Sublime.
Oct 09 2016
parent reply Dmitry <dmitry indiedev.ru> writes:
On Sunday, 9 October 2016 at 10:19:06 UTC, Wild wrote:
 After all Atom and Vscode are open source clones of Sublime.
Sublime is fast, unlike Atom and VSCode.
Oct 09 2016
parent reply WebFreak001 <janju007 web.de> writes:
On Sunday, 9 October 2016 at 15:41:17 UTC, Dmitry wrote:
 On Sunday, 9 October 2016 at 10:19:06 UTC, Wild wrote:
 After all Atom and Vscode are open source clones of Sublime.
Sublime is fast, unlike Atom and VSCode.
Yeah I noticed that too when I started making sublime-d yesterday. Like instant startup time and no lags So sublime plugin using workspace-d in progress: https://github.com/Pure-D/sublime-d
Oct 09 2016
next sibling parent Dmitry <dmitry indiedev.ru> writes:
On Sunday, 9 October 2016 at 15:42:51 UTC, WebFreak001 wrote:
 On Sunday, 9 October 2016 at 15:41:17 UTC, Dmitry wrote:
 On Sunday, 9 October 2016 at 10:19:06 UTC, Wild wrote:
 After all Atom and Vscode are open source clones of Sublime.
Sublime is fast, unlike Atom and VSCode.
Yeah I noticed that too when I started making sublime-d yesterday. Like instant startup time and no lags So sublime plugin using workspace-d in progress: https://github.com/Pure-D/sublime-d
Oh, great! Thank you!
Oct 09 2016
prev sibling parent reply bitwise <bitwise.pvt gmail.com> writes:
On Sunday, 9 October 2016 at 15:42:51 UTC, WebFreak001 wrote:
 On Sunday, 9 October 2016 at 15:41:17 UTC, Dmitry wrote:
 On Sunday, 9 October 2016 at 10:19:06 UTC, Wild wrote:
 After all Atom and Vscode are open source clones of Sublime.
Sublime is fast, unlike Atom and VSCode.
Yeah I noticed that too when I started making sublime-d yesterday. Like instant startup time and no lags So sublime plugin using workspace-d in progress: https://github.com/Pure-D/sublime-d
Awesome. Sublime-D seems pretty good. I was surprised it came with the ability to build D-code built in. I don't see any kind of file/project browser though..will symbols still be recognized across files for autocomplete, etc..?
Oct 15 2016
parent WebFreak001 <janju007 web.de> writes:
On Saturday, 15 October 2016 at 18:54:32 UTC, bitwise wrote:
 On Sunday, 9 October 2016 at 15:42:51 UTC, WebFreak001 wrote:
 On Sunday, 9 October 2016 at 15:41:17 UTC, Dmitry wrote:
 On Sunday, 9 October 2016 at 10:19:06 UTC, Wild wrote:
 After all Atom and Vscode are open source clones of Sublime.
Sublime is fast, unlike Atom and VSCode.
Yeah I noticed that too when I started making sublime-d yesterday. Like instant startup time and no lags So sublime plugin using workspace-d in progress: https://github.com/Pure-D/sublime-d
Awesome. Sublime-D seems pretty good. I was surprised it came with the ability to build D-code built in. I don't see any kind of file/project browser though..will symbols still be recognized across files for autocomplete, etc..?
uh I'm still working on the plugin. Building probably comes from sublime because sublime-d doesn't currently add anything except auto completion, goto definition and documentation when hovering over something. Searching for symbols will be implemented and outlining the current file might get implemented like in code-d with a list of all symbols on command.
Oct 15 2016
prev sibling parent Chris Wright <dhasenan gmail.com> writes:
On Wed, 05 Oct 2016 13:22:37 +0000, WebFreak001 wrote:
 Especially the fact that you can buy it makes me wanna not get it
 becuase that means the free version has some disadvantages to the paid
 version.
The disadvantage is that it puts "UNLICENSED" in the titlebar and pops up a request that you purchase it every now and then -- I don't recall how frequently, but I don't think it was more than twice a week.
Oct 05 2016
prev sibling parent Patric Dexheimer <patric.dexheimer gmail.com> writes:
On Wednesday, 5 October 2016 at 05:53:06 UTC, Suliman wrote:
 Please, add Sublime support
+1 for Sublime Support :)
Oct 06 2016
prev sibling next sibling parent Joel <joelcnz gmail.com> writes:
On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 I've been working a lot on the new features for code-d to 
 improve the user experience for new users and lower the barrier 
 of creating D projects.

 [...]
I'm using macOS 10.12. I get this warning -> A path in your d.stdlibPath setting doesn't exist. Auto completion might lack some s
Oct 05 2016
prev sibling next sibling parent reply Dmitry <dmitry indiedev.ru> writes:
On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 I've been working a lot on the new features for code-d to 
 improve the user experience for new users and lower the barrier 
 of creating D projects.
Thank you! Windows 7 x64 I'm trying: 1. Create new project (empty console application) Sometime within this step I got one of these errors (or both): a) std.exception.ErrnoException C:\D\dmd2\windows\bin\..\..\src\phobo \std\stdio.d(2543): (Bad file descriptor) reproduce: create the project, close IDE (and don't do "close folder"). Delete all files from project's directory. Run IDE and try create project again. b) std.socket.SocketOSException std\socket.d(2777): Unable to connect socket: No connection could be made because the target machine actively refused it. (problem with dcd-client or dcd-server as I understand) Sometime second error also appears after IDE closed (also once I had "dcd-server.exe has stopped working" error) 2. Run created project using "code-d: run project", result is: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. Not enough storage is available to process this command. f:\projects\dlang\coded_test> Sometime if I trying run "Empty DlangUI Application" then I have this error: command 'code-d.run' not found (for example, when try to run immediately after creation).
Oct 05 2016
parent WebFreak001 <janju007 web.de> writes:
On Wednesday, 5 October 2016 at 14:56:30 UTC, Dmitry wrote:
 On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 I've been working a lot on the new features for code-d to 
 improve the user experience for new users and lower the 
 barrier of creating D projects.
Thank you! Windows 7 x64 I'm trying: 1. Create new project (empty console application) Sometime within this step I got one of these errors (or both): a) std.exception.ErrnoException C:\D\dmd2\windows\bin\..\..\src\phobo \std\stdio.d(2543): (Bad file descriptor) reproduce: create the project, close IDE (and don't do "close folder"). Delete all files from project's directory. Run IDE and try create project again.
hmm... I'm gonna try to find out why thats happening
 b) std.socket.SocketOSException std\socket.d(2777): Unable to 
 connect socket: No connection could be made because the target 
 machine actively refused it.
 (problem with dcd-client or dcd-server as I understand)
Yeah I know about this one because it also keeps happening to me. Not really high priority right now because its just happening when you close vscode. But I need to find out why this happens in the future.
 Sometime second error also appears after IDE closed (also once 
 I had "dcd-server.exe has stopped working" error)
Never had that happen before
 2. Run created project using "code-d: run project",
 result is:

 Microsoft Windows [Version 6.1.7601]
 Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
 Not enough storage is available to process this command.

 f:\projects\dlang\coded_test>
Uh... `code-d: run project` is just opening a terminal and run `dub` in there with some other arguments. Idk why this would result in "not enough storage space available"
 Sometime if I trying run "Empty DlangUI Application" then I 
 have this error:
 command 'code-d.run' not found
 (for example, when try to run immediately after creation).
This happens if it isn't done initializing yet
Oct 05 2016
prev sibling next sibling parent reply =?UTF-8?B?THXDrXM=?= Marques <luis luismarques.eu> writes:
On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 I've been working a lot on the new features for code-d to 
 improve the user experience for new users and lower the barrier 
 of creating D projects.
What I really wish I had was integration with the compilation process (either pure (r)dmd or dub), since having to manually find in my editor the error lines mentioned by the compiler is quite inconvenient. Debugging is probably a pipedream, no?
Oct 06 2016
parent reply WebFreak001 <janju007 web.de> writes:
On Thursday, 6 October 2016 at 11:39:17 UTC, Luís Marques wrote:
 On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 I've been working a lot on the new features for code-d to 
 improve the user experience for new users and lower the 
 barrier of creating D projects.
What I really wish I had was integration with the compilation process (either pure (r)dmd or dub), since having to manually find in my editor the error lines mentioned by the compiler is quite inconvenient. Debugging is probably a pipedream, no?
code-d runs dub to get the compiler errors and display them, just press the errors/warnings button at the bottom left. Debugging is also implemented if you install my second extension if you search for `webfreak.debug` in the extension search. Then using the code-d debug button in the statusbar you can debug your app. Works on linux, windows and osx assuming you have the debuggers installed (on windows if you magically get gdb or lldb working then thats great but otherwise there is also Mago/MI support)
Oct 06 2016
next sibling parent reply =?UTF-8?B?THXDrXM=?= Marques <luis luismarques.eu> writes:
On Thursday, 6 October 2016 at 16:43:56 UTC, WebFreak001 wrote:
 code-d runs dub to get the compiler errors and display them, 
 just press the errors/warnings button at the bottom left.
Nope, the errors/warnings is always empty for me. I'm on a Mac.
Oct 06 2016
parent WebFreak001 <janju007 web.de> writes:
On Thursday, 6 October 2016 at 18:43:14 UTC, Luís Marques wrote:
 On Thursday, 6 October 2016 at 16:43:56 UTC, WebFreak001 wrote:
 code-d runs dub to get the compiler errors and display them, 
 just press the errors/warnings button at the bottom left.
Nope, the errors/warnings is always empty for me. I'm on a Mac.
oh right there is some bug on mac causing most features to not work, not really sure why. It just gets stuck in some system call (process spawn) But that should only affect auto completion, static code analysis and make code formatting delayed. Showing dub errors should still work
Oct 06 2016
prev sibling parent =?UTF-8?B?THXDrXM=?= Marques <luis luismarques.eu> writes:
On Thursday, 6 October 2016 at 16:43:56 UTC, WebFreak001 wrote:
 Debugging is also implemented if you install my second 
 extension if you search for `webfreak.debug` in the extension 
 search. Then using the code-d debug button in the statusbar you 
 can debug your app. Works on linux, windows and osx assuming 
 you have the debuggers installed (on windows if you magically 
 get gdb or lldb working then thats great but otherwise there is 
 also Mago/MI support)
I don't see any code-d debug button in the statusbar. In any case, I don't know if this is supposed to work if the basic code-d building doesn't work (although without any visible errors; I fixed the only error, a wrong default import path setting).
Oct 06 2016
prev sibling next sibling parent reply Soulsbane <paul acheronsoft.com> writes:
On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 I've been working a lot on the new features for code-d to 
 improve the user experience for new users and lower the barrier 
 of creating D projects.
Will there be support for looking for dscanner.ini in .config rather than in project directory?
Oct 07 2016
parent WebFreak001 <janju007 web.de> writes:
On Saturday, 8 October 2016 at 00:30:32 UTC, Soulsbane wrote:
 On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 I've been working a lot on the new features for code-d to 
 improve the user experience for new users and lower the 
 barrier of creating D projects.
Will there be support for looking for dscanner.ini in .config rather than in project directory?
good idea, added it as an issue to workspace-d: https://github.com/Pure-D/workspace-d/issues/47
Oct 08 2016
prev sibling parent reply bitwise <bitwise.pvt gmail.com> writes:
On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 * detection of missing tools & installation
I'm trying to use VSCode/mac-os and getting some errors. First, I tried to install all the required tools, and got an error because the installation/compilation couldn't find the new experimental allocators. Updating dmd fixed this, but there didn't seem to be any explicit check/message that dmd was out of date IIRC. After updating DMD, 3 of the tools seemed to have installed correctly, but I am still getting this error: "workspace-d is not installed or points to a folder" I tried setting "d.workspacedPath" in user settings to the executable in the /Users/me/.vscode/extensions/... folder, but it still doesn't work. Also, unrelated to the above, I've set"d.stdlibPath" to the appropriate paths, but completion still doesn't work. I'm guessing workspace-d not being found has something to do with this..? Anyways, thanks for the good work. Can't wait to get this thing up and running.
Oct 08 2016
parent reply WebFreak001 <janju007 web.de> writes:
On Saturday, 8 October 2016 at 17:27:03 UTC, bitwise wrote:
 On Tuesday, 4 October 2016 at 19:28:27 UTC, WebFreak001 wrote:
 * detection of missing tools & installation
I'm trying to use VSCode/mac-os and getting some errors. First, I tried to install all the required tools, and got an error because the installation/compilation couldn't find the new experimental allocators. Updating dmd fixed this, but there didn't seem to be any explicit check/message that dmd was out of date IIRC. After updating DMD, 3 of the tools seemed to have installed correctly, but I am still getting this error: "workspace-d is not installed or points to a folder" I tried setting "d.workspacedPath" in user settings to the executable in the /Users/me/.vscode/extensions/... folder, but it still doesn't work. Also, unrelated to the above, I've set"d.stdlibPath" to the appropriate paths, but completion still doesn't work. I'm guessing workspace-d not being found has something to do with this..? Anyways, thanks for the good work. Can't wait to get this thing up and running.
auto completion won't appear when workspace-d is not installed, workspace-d is the thing that calls all of the other executables. Try deleting the executable from /Users/me/.vscode/extensions/code-d.../bin/workspace-d and then try to reinstall it again using code-d
Oct 08 2016
parent reply bitwise <bitwise.pvt gmail.com> writes:
On Saturday, 8 October 2016 at 18:05:58 UTC, WebFreak001 wrote:
 Try deleting the executable from 
 /Users/me/.vscode/extensions/code-d.../bin/workspace-d and then 
 try to reinstall it again using code-d
I did.
Oct 08 2016
parent reply WebFreak001 <janju007 web.de> writes:
On Saturday, 8 October 2016 at 19:08:10 UTC, bitwise wrote:
 On Saturday, 8 October 2016 at 18:05:58 UTC, WebFreak001 wrote:
 Try deleting the executable from 
 /Users/me/.vscode/extensions/code-d.../bin/workspace-d and 
 then try to reinstall it again using code-d
I did.
then try deleting at and manually installing it using git clone git github.com:Pure-D/workspace-d.git dub build --build=release and set the folder path to that executable
Oct 08 2016
parent reply bitwise <bitwise.pvt gmail.com> writes:
On Saturday, 8 October 2016 at 19:10:22 UTC, WebFreak001 wrote:

 git clone git github.com:Pure-D/workspace-d.git
Done, but had to use this instead(some permission error): git clone https://github.com/Pure-D/workspace-d
 dub build --build=release
 and set the folder path to that executable
The build seems to have worked, but I don't see any build output, and the console gives no indication of where it went.
Oct 08 2016
parent reply WebFreak001 <janju007 web.de> writes:
On Saturday, 8 October 2016 at 19:43:07 UTC, bitwise wrote:
 On Saturday, 8 October 2016 at 19:10:22 UTC, WebFreak001 wrote:

 git clone git github.com:Pure-D/workspace-d.git
Done, but had to use this instead(some permission error): git clone https://github.com/Pure-D/workspace-d
 dub build --build=release
 and set the folder path to that executable
The build seems to have worked, but I don't see any build output, and the console gives no indication of where it went.
Can you make some recording of whats wrong with the developer tools open? (ctrl-shift-p -> developer tools) Also I'm on the D as WebFreak001 if you want a more direct chat
Oct 08 2016
next sibling parent WebFreak001 <janju007 web.de> writes:
On Saturday, 8 October 2016 at 19:46:17 UTC, WebFreak001 wrote:
 Also I'm on the D as WebFreak001 if you want a more direct chat
D irc on freenode* lol my messages today
Oct 08 2016
prev sibling parent bitwise <bitwise.pvt gmail.com> writes:
On Saturday, 8 October 2016 at 19:46:17 UTC, WebFreak001 wrote:
 On Saturday, 8 October 2016 at 19:43:07 UTC, bitwise wrote:
 On Saturday, 8 October 2016 at 19:10:22 UTC, WebFreak001 wrote:

 git clone git github.com:Pure-D/workspace-d.git
Done, but had to use this instead(some permission error): git clone https://github.com/Pure-D/workspace-d
 dub build --build=release
 and set the folder path to that executable
The build seems to have worked, but I don't see any build output, and the console gives no indication of where it went.
Sorry, I expected a "./bin" folder or something. "workspace-d" was sitting in the root folder. I've set "d.workspacedPath" to the path of the new file and it seems to have suppressed the error, but completion still isn't working. When I open a single file, I get no errors, but when I put a d file in a folder and opened the folder with VSCode, I got this: "Could not initialize DCD. See console for details!" I've checked all the consoles I could find in VSCode, and can't find any details.
 Also I'm on the D as WebFreak001 if you want a more direct chat
I assume you mean #d? I'm there. Thanks
Oct 08 2016