d-language-server / dls

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

DLS fails to upgrade #56

Open dgileadi opened 5 years ago

dgileadi commented 5 years ago

This has been a recurring issue for me. Every time there's a new release of DLS, vs-code shows a "Upgrading DSL" notification with an in-progress indicator, but the notification never goes away and the upgrade never completes.

To complete an upgrade, I have to quit vs-code and delete all the directories under ~/.dub/packages/.bin/. After starting vs-code again, DLS installs correctly.

If it helps to diagnose the issue, for this current release under ~/.dub/packages/.bin/ I have a dls-v0.25.13 directory and a dls-v0.25.14 directory. The latter directory is empty. dis-latest points to dls-v0.25.13.

I'm on macOS Mojave 10.14.6 although the same issue has happened to me on earlier versions of macOS too.

andre2007 commented 5 years ago

You may also test wheter this issue also occurs with Intellij on macOS (gtache LSP plugin). I just wonder wheter it is a DLS issue or a VSC issue. I can confirm it doesn't occur on Windows with Intellij.

dgileadi commented 5 years ago

I’m pretty certain it’s DLS because all the update code is in DLS—vs-code just displays the notifications. The state of the bin folder shows that the bug is happening in the middle of the update.

On Jul 26, 2019, at 11:59 AM, andre2007 notifications@github.com wrote:

You may also test wheter this issue also occurs with Intellij on macOS (gtache LSP plugin). I just wonder wheter it is a DLS issue or a VSC issue. I can confirm it doesn't occur on Windows with Intellij.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/d-language-server/dls/issues/56?email_source=notifications&email_token=AACWEPUR5FAHBDNNKYUIJI3QBNCSPA5CNFSM4IHF3ASKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25OGPQ#issuecomment-515564350, or mute the thread https://github.com/notifications/unsubscribe-auth/AACWEPRNI47KXESMHVXRUXTQBNCSPANCNFSM4IHF3ASA.

LaurentTreguier commented 5 years ago

I'm sorry, but I have bad news here: I don't have this issue, on Linux or on Windows. This makes it look like a platform specific issue, and I don't have a macOS machine to test on. The fact that the directory for the new release is created but not filled hints towards problems during the download; I fear this could be something like a problem with the libcurl distributed with macOS. Or macOS simply doesn't have a libcurl installed by default; I always assumed it was the case. So the only thing I could tell you right now is to check if libcurl is installed on your system, if it isn't then installing it could solve the issue.

dgileadi commented 5 years ago

Does the regular DLS install process use libcurl? The DLS install does succeed for me, just not the upgrade.

On Jul 26, 2019, at 12:52 PM, Laurent Tréguier notifications@github.com wrote:

I'm sorry, but I have bad news here: I don't have this issue, on Linux or on Windows. This makes it look like a platform specific issue, and I don't have a macOS machine to test on. The fact that the directory for the new release is created but not filled hints towards problems during the download; I fear this could be something like a problem with the libcurl distributed with macOS. Or macOS simply doesn't have a libcurl installed by default; I always assumed it was the case. So the only thing I could tell you right now is to check if libcurl is installed on your system, if it isn't then installing it could solve the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/d-language-server/dls/issues/56?email_source=notifications&email_token=AACWEPXTEEIXWTC2Q5PH3TTQBNIZNA5CNFSM4IHF3ASKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25RXUY#issuecomment-515578835, or mute the thread https://github.com/notifications/unsubscribe-auth/AACWEPTPGGDA54B6S4DXAUDQBNIZNANCNFSM4IHF3ASA.

LaurentTreguier commented 5 years ago

Oh. Yes, it does, so that's not the problem, I spoke without thinking here... The upgrade is just an install from dls using dls:bootstrap as a library, so the process is almost exactly the same, which makes it really strange that it works for installs.

dgileadi commented 5 years ago

Frustratingly, a locally built dls does the upgrade correctly for me. Perhaps it's some sort of macOS gatekeeper issue, since it appears that least for vs-code the initial install uses dub to build the bootstrapper but upgrades use the downloaded dls to bootstrap the next version. In any case I'm not sure how else to try tracking this down :(

andre2007 commented 5 years ago

I don't know wheter this helps you: you can rename application dub to a new file name. Create a file dub in the same directory which is a bash script and do some logging within and of course calling the correct dub application.