d-language-server / dls

A Language Server implementation for D
http://dls.dub.pm
106 stars 15 forks source link

DLS Fails to compile on Ubuntu 18.04 with dmd-2.088.1 #64

Closed testing-in-chrome closed 4 years ago

testing-in-chrome commented 4 years ago

Run the following:

dub fetch dls
dub build --build=release dls

Get the following error:

Building package dls in /home/<user>/.dub/packages/dls-0.25.17/dls/
Fetching dfmt 0.10.1 (getting selected version)...
Fetching libdparse 0.11.6 (getting selected version)...
Fetching dub 1.17.0 (getting selected version)...
Fetching dsymbol 0.6.4 (getting selected version)...
Fetching emsi_containers 0.8.0-alpha.19 (getting selected version)...
Fetching dscanner 0.7.2 (getting selected version)...
Fetching dcd 0.11.1 (getting selected version)...
Fetching stdx-allocator 2.77.5 (getting selected version)...
Fetching msgpack-d 1.0.1 (getting selected version)...
Fetching libddoc 0.6.1 (getting selected version)...
Fetching inifiled 1.3.1 (getting selected version)...
Invalid source/import path: /home/<user>/.dub/packages/dcd-0.11.1/dcd/bin
Running pre-generate commands for dcd...
Invalid source/import path: /home/<user>/.dub/packages/dfmt-0.10.1/dfmt/bin
Running pre-generate commands for dfmt...
Running pre-generate commands for dls:i18n...
Invalid source/import path: /home/<user>/.dub/packages/dscanner-0.7.2/dscanner/bin
Running pre-generate commands for dscanner...
Running pre-generate commands for dls...
std.json.JSONException@std/json.d(1547): Found 'o' when expecting 'u'. (Line 1:2)
----------------
??:? pure @safe void std.json.parseJSON!(immutable(char)[]).parseJSON(immutable(char)[], int, std.json.JSONOptions).error(immutable(char)[]) [0x559f5f723854]
??:? pure @safe void std.json.parseJSON!(immutable(char)[]).parseJSON(immutable(char)[], int, std.json.JSONOptions).checkChar!(false).checkChar(char, bool) [0x559f5f72687f]
??:? pure @safe void std.json.parseJSON!(immutable(char)[]).parseJSON(immutable(char)[], int, std.json.JSONOptions).parseValue(ref std.json.JSONValue) [0x559f5f7244f5]
??:? pure @safe std.json.JSONValue std.json.parseJSON!(immutable(char)[]).parseJSON(immutable(char)[], int, std.json.JSONOptions) [0x559f5f7237ba]
??:? immutable(char)[] data.getVersionFromDescription() [0x559f5f6e2b4b]
??:? _Dmain [0x559f5f6e2708]
Command failed with exit code 1: /home/<user>/.dub/packages/dls-0.25.17/dls/data/data.exe
LaurentTreguier commented 4 years ago

A small question, out of curiosity: why do you want to build DLS yourself rather than use the prebuilt brinaries ? Is it on a 32bit system ? Apparently I don't properly take set the current durectory before doing dub describe in the preGenerate command, so trying to build outside of the package directory fails. I'll fix this tonight when getting back to my machine.

LaurentTreguier commented 4 years ago

This should be fixed with v0.25.18. You'll just have to wait until it's up on code.dlang.org

LaurentTreguier commented 4 years ago

v0.25.18 is on hold until I figure out why putting out a new release crashes DLS

LaurentTreguier commented 4 years ago

The push to master automatically closed; but obviously you can always re-open if the issue is not actually fixed. v0.25.19 will be available shortly

testing-in-chrome commented 4 years ago

Thanks for the fix!

I build it using dub (& usually ldc) to put the binary at a particular location for vim's LanguageClient_Server to be able to locate it.

LaurentTreguier commented 4 years ago

I'm not sure which language client you are using, but I think you should be able to configure any language client to use a specific path instead. Or, if you really want to access dls from a specific directory, I think it's better to create a symlink from the binary install location to your desired location. DLS will update itself but only install the new version in its predefined position, so you'll have to manually do updates if you compile it yourself

testing-in-chrome commented 4 years ago

Thanks! How is that predefined position is configured, let's say if I download the linux binary from the "releases" page?

LaurentTreguier commented 4 years ago

Simply use dub run dls:bootstrap instead of dub build dls, this is going to download the latest version and tell you where it is. Installation and everthing you need to know is in the README 😉

LaurentTreguier commented 4 years ago

I see my comment before yours even if I posted it after... Is Github drunk ?

testing-in-chrome commented 4 years ago

I see my comment before yours even if I posted it after... Is Github drunk ?

Seems so! :-D