Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error in the standard HelloWorld program. #1161

Open
Nucl3arSn3k opened this issue Aug 2, 2023 · 4 comments
Open

Strange error in the standard HelloWorld program. #1161

Nucl3arSn3k opened this issue Aug 2, 2023 · 4 comments
Assignees

Comments

@Nucl3arSn3k
Copy link

I'm running the standard HelloWorld program in Ada,however,VSCode is throwing an error, specifically Project file has error and can't be loaded. The program compiles and runs fine,so I'm unclear as to why the linter is throwing an error.

@joaopsazevedo
Copy link
Contributor

Hello @Nucl3arSn3k.

If you're getting that error but the program compiles and runs fine, I guess ALS is not using the same gpr as the one you're using to build the project.

You can configure what gpr ALS will use as shown here: https://github.com/AdaCore/ada_language_server/wiki/Getting-Started#currect-project-file-configuration

Alternatively, in your project root directory, you can create a .vscode/settings.json file with the following content:

{
    "ada.projectFile": "relative_or_full_path_of_your_project.gpr"
}

@reznikmm
Copy link
Contributor

reznikmm commented Aug 8, 2023

@Nucl3arSn3k Can you provide a reproducer? Source of your project? Have you tried Getting Started tutorial?

@Nucl3arSn3k
Copy link
Author

Here is the code of my program. I followed the getting started tutorial

`with Ada.Text_IO;

procedure My_Hello_World is
begin
Ada.Text_IO.Put_Line ("Hello, World!");
end My_Hello_World;`

@Joebeazelman
Copy link

Joebeazelman commented Aug 11, 2023

This error is relate to my issue #1160. I've already done so, but in my issue, @reznikmm shows how to turn on error logging. You might want to turn it on and include the dump file here as well so to help find the source of the issue. Execute the following command in your terminal:

echo "ALS.MAIN=yes" > $HOME/.als/traces.cfg

Open the project again and perform a compilation and quit out of VSCode. This will generate the dump file. Post the file here and make sure you remove any sensitive information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants