AdaCore / ada_language_server

Server implementing the Microsoft Language Protocol for Ada and SPARK
GNU General Public License v3.0
226 stars 54 forks source link

Can't find toolchain in VSCodium provisioned via nix #1166

Open newton-migosi opened 10 months ago

newton-migosi commented 10 months ago

Getting can't find a toolchain for the following configuration: language 'Ada', target 'x86_64-linux', default runtime even though gdb, gnat12 and gprbuild are provisioned to VSCodium via nix.

The integrated terminal in VSCodium has all the required binaries in $PATH, e.g gnatls -v works and building the project directly using gprbuild works.

To reproduce (requires nix),

  1. Clone the hello_world repo
  2. Run nix run .#codium . in the repo to launch the IDE
  3. Open any .adb or .gpr file

More information is in the repo's README

Saufian commented 9 months ago

Got the same issue today, but on every Ada project (including with the official tuto).

I solved the problem with the help of the answer proposed here: Issue:1146

In a few words: change your gnat version to match your gcc version, restart VSCodium, and enjoy the result.