Issues with workspace-d and code-d on Linux
Igor
stojkovic.igor at gmail.com
Wed Jul 25 20:03:49 UTC 2018
After reading a few posts of users complaining about first time
user experience with DLang on Windows in the past two years I now
come to write about my issues on Linux.
On Windows I would download 4 installers:
Visual Studio Community Edition (and make sure to check C++ and
Windows SDKs in it)
DMD installer
LDC installer
VisualD installer
I would install those 4 things in order and I would open VS where
I could create new DLang project, place a breakpoint, press F5 to
debug it, with a few clicks switch from using DMD to LDC and I
would have autocomplete. That is all I wanted on my new Kubuntu
Linux but I am starting to give up.
I installed VSCode and using an install script the latest LDC
(1.10.0) and DMD (2.081.1). I got a message how I need to source
appropriate activate file to add the compiler I want to the PATH.
Ok I understand that part. Then I lookup the code-d extension in
VSCode and in the description it says in needs some dependencies
and from the description I am not sure if it will install
everything it needs automatically or I need to install it myself.
To be sure I decided to install it myself. I followed the code-d
wiki, cloned workspace-d and run its install.sh. At installing
dcd-client it stops with the exception "dcd-client: File or
directory does not exist". So I open the script and then
installer's app.d and see that after building dcd-client and
dcd-server it expects to find them in the project root folder so
I change the source so the paths are "bin/dcd-client" and
"bin/dcd-server". I run it again and this time it built those but
crashed at building dfmt. It turned out its make script is
passing -inline and -version=Something to ldc2 and it complains
how there is no inline flag and that version flag doesn't expect
a value. I remove the inline flag and change -version to
-d-version, build just dfmt again and manually copy the bin where
workspace-d installer would put it. After this I setup the system
so LDC and workspace-d/bin folders are always in the PATH since I
don't expect code-d to source some activate file somewhere.
Finally I can install code-d, or so I think. I install it and do
Ctrl-Shift-P, "code-d: Create new project", "Empty console
project" and I notice in the VSCode output that code-d is
installing DCD. So it didn't find the one I setup with so much
work. Also once the new project was loaded among all kinds of
messages I also got:
Could not resolve location of module 'std/stdio'
And as I suspected typing "writ", Ctrl+Space did not autocomplete
it. On top of that I am new to VSCode so I have no idea how it is
supposed to know how to build and run my project. All I can tell
is that pressing F5 doesn't work.
And so here I am, hoping that someone can explain how to set
everything up so I get Windows like experience while working with
VSCode on Linux (or some other editor).
More information about the Digitalmars-d-ide
mailing list