www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - VSCode on Ubuntu 24.10

reply Andrea Fontana <nospam example.com> writes:
I recently installed the new version of Ubuntu (24.10) from 
scratch. Opening VSCode with code-d makes it unusable, and even 
without plugins, simply running dub from VSCode's terminal 
consumes 100% of the CPU and 8GB of RAM.

The reason for this is that VSCode raises the open file ulimit 
significantly. As a result, when Phobos performs a fork to start 
a process, it triggers a known bug [1].

While waiting for the PR to be merged, you can launch VSCode by 
setting a lower ulimit, for example with:

```bash

ulimit -n 16384
/opt/your_vscode_bin_path "$ "
```

I hope that once the pull request is merged and the new compiler 
(2.110) is released, the tools will be compiled with version 
2.110 instead of 2.109; otherwise, the bug will persist until the 
next release.

As I’ve mentioned before, I firmly believe that everything 
released should go through a bootstrap, including the compiler 
itself (i.e., once 2.110 is compiled with 2.109, 2.110 should be 
recompiled with itself to take advantage of any fixes applied).

[1] https://github.com/dlang/phobos/pull/8990

Andrea Fontana
Oct 29
parent reply Nicholas Wilson <iamthewilsonator hotmail.com> writes:
On Tuesday, 29 October 2024 at 08:30:05 UTC, Andrea Fontana wrote:
 I recently installed the new version of Ubuntu (24.10) from 
 scratch. Opening VSCode with code-d makes it unusable, and even 
 without plugins, simply running dub from VSCode's terminal 
 consumes 100% of the CPU and 8GB of RAM.

 [...]
Note that that PR is to master, so will be in 2.111 unless it is re-targeted to stable.
Oct 29
parent reply Andrea Fontana <nospam example.com> writes:
On Tuesday, 29 October 2024 at 10:06:10 UTC, Nicholas Wilson 
wrote:
 On Tuesday, 29 October 2024 at 08:30:05 UTC, Andrea Fontana 
 wrote:
 I recently installed the new version of Ubuntu (24.10) from 
 scratch. Opening VSCode with code-d makes it unusable, and 
 even without plugins, simply running dub from VSCode's 
 terminal consumes 100% of the CPU and 8GB of RAM.

 [...]
Note that that PR is to master, so will be in 2.111 unless it is re-targeted to stable.
Meanwhile another patch has been merged, I'm not clear if it resolves the problem on Ubuntu or not, I hope so. In that case it should work on 2.110, right? Andrea
Oct 29
parent reply Nicholas Wilson <iamthewilsonator hotmail.com> writes:
On Tuesday, 29 October 2024 at 10:32:42 UTC, Andrea Fontana wrote:
 Meanwhile another patch has been merged, I'm not clear if it 
 resolves the problem on Ubuntu or not, I hope so. In that case 
 it should work on 2.110, right?

 Andrea
No, that one was also to master, so it will be in 2.111 unless someone cherry-pick's it to stable.
Oct 29
parent Andrea Fontana <nospam example.com> writes:
On Tuesday, 29 October 2024 at 10:41:24 UTC, Nicholas Wilson 
wrote:
 On Tuesday, 29 October 2024 at 10:32:42 UTC, Andrea Fontana 
 wrote:
 Meanwhile another patch has been merged, I'm not clear if it 
 resolves the problem on Ubuntu or not, I hope so. In that case 
 it should work on 2.110, right?

 Andrea
No, that one was also to master, so it will be in 2.111 unless someone cherry-pick's it to stable.
All we can do is hope that it's a problem with my configuration then, or the issue will soon explode. Andrea
Oct 29