Closed ghost closed 7 years ago
I'm afraid this is an upstream issue. DCD and other tools from Hackerpilot have had no nes release in ages and don't seem to be compilable with newer DMD versions. The only solutions I see for now are :
experimental_allocator-2.70.0-b1
), and also build and use the extension's latest dev version to be able to set the path to dcd.exe
in the VSCode configuration file
Ideally, a new DCD release would be great, but I don't know when that will happen...Building some of them from master works, i know for dscanner it does. Having some way to set a precompiled binary would be a partial solution. Being able to disable some features would be appreciated as well, I don't use DCD as it just crashes with my project. I just use DScanner to get the symbol names in a single source file which is good enough for me.
Specifying prebuilt binaries has been discussed in PR #16 and was added to that PR. This, at least, should be in the next update
@LaurentTreguier Just tried to get the dev branch version to work (on Linux) to workaround this and everything except syntax hightlighting seems to be broken for me; starting with a completely fresh VSCode installation (no configuration, no extensions):
$ mkdir -p ~/.vscode/extensions
$ git clone https://github.com/dlang-vscode/dlang-vscode ~/.vscode/extensions/dlang-vscode
$ cd ~/.vscode/extensions/dlang-vscode
$ git checkout dev
$ npm install
$ npm run vscode:prepublish
$ ~/Tools/VSCode-linux-x64/bin/code-oss
# Open a folder that contains a dub.json
# Try e.g. Ctrl+P "Dub: Init Package" -> "command 'dlang.dub.init' not found"
Sorry if I missed some obvious step in setting this up.
@Calrama there should be npm run postinstall
at some point I think... The best way to do a clean install of the extension would probably be to use to vsce
tool and use vsce package
to create a .vsix file that you could install directly from VSCode.
Are you doing a fresh install of your system ? Nothing will work if the dub
command is not found, that's for sure
Just tried out both methods (adding npm run postinstall
/ using npm install vsce; node_modules/.bin/vsce package
and installing the vsix via command pallete ) and they yield the exact same result: On loading any project that should trigger dlang-vscode, the syntax highlighting works, but all the commands yield the same error as shown above (Also, dlang-vscode does not try to install the tools at startup without any configuration).
Weird... It's as if VSCode wasn't even activating the extension at all. What distro are you using?
I'm using Funtoo Linux (a Gentoo derivative). The offending commit for this "nothing happens" is 89c468214f8ce4b6603736f8b22a84a8b45d16c3, (git bisect
from 7860bcf04976f03bd85ca8ab229af84919304025 good to https://github.com/dlang-vscode/dlang-vscode/commit/e78066b7938fe6c813df21a62ddbe2ecfad00817 bad), so I'm assuming that some kind of additional step is necessary to get that SDlang dependency installed (in which case: I just love silent failures :) )
UPDATE: Ayup, installing the SDLang extension from the gallery fixes the issue. Kinda chilling, though, that VSCode just tells me zilch about one of my extensions missing a dependency :) In any case, sorry to have bothered you.
Don't be sorry, I had forgotten about this. I don't know if I'm doing it wrong, but VSCode doesn't seem to automatically install dependencies... Which is weird, according to their docs it should do it. I'll remove it, maybe we should use an extension pack to bundle the dlang and sdl extensions together instead.
EDIT: actually, VSCode probably only installs dependencies when a extension is installed through the store. When installing it manually, all dependencies will always have to be installed manually too... I'll keep the depedency, but I'll also add instructions to the README for manual installation
Ok, thanks for the explanation and clearing up the README, hopefully that will spare a future someone a bit of frustration.
Is there any way I can get around this without building my own copy? I've built the tools it uses (e.g dcd client and server) separately and configured the binary paths accordingly, but it's seemingly still attempting to build them on its own instead of running my built binaries (and promptly failing).
(on Linux (Ubuntu 16.10) by the way)
@SonicFreak94 Have you set d.tools.enabled.<tool name>
to false ? This should prevent the extension from trying to build the named tool
@LaurentTreguier I didn't; I figured that would disable their functionality entirely. Having just tried it, it does just that. To clarify, my goal was to have the tools launch from the configured paths. As it turns out though, I used incorrect relative paths, so my precompiled tools are working now. Disregard x_x
@SonicFreak94 @mcferden I have merged the changes. Would you like to test with the latest master?
VS Code gives this error message while building dependencies for extension.
I'm using DMD 2.072.0 and DUB 1.0.0 on Windows OS.