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

VSCode Problem panel doesn't list all error messages #1158

Open Joebeazelman opened 11 months ago

Joebeazelman commented 11 months ago

When I build my project, I am able to see all the compiler error messages and warnings in the terminal. However, not all of the error messages are displayed in the problem panel of the IDE. This issue arises when the build generates a greater number of warning messages than error messages. For example, in my case, I receive a substantial amount of style warnings. There may be a limit imposed for each type of message shown in the problem panel. If this is the case, it must be a recent development, as it has not occurred before.

reznikmm commented 11 months ago

Can you send error/warning messages as a raw file? I'll try to reproduce the issue with it.

Joebeazelman commented 11 months ago

Is there a way of having it dump the errors and warnings into a file? The issue seems to occur only if there are a lot of style warning messages. It may be a VSCode problem, but it's worth investigating. Is there a way of turning off the style warning in Alire? Better yet, is there a way of getting LSP to fix using the format code command?

reznikmm commented 11 months ago

you can redirect output of gprbuild or alr build to a file in the terminal, like

gprbuild -P project.gpr > errors.log

You can turn off style warning -gnatyN compiler switch, I guess. To fix warning try to use gnatpp or Format file command in VS Code.

Joebeazelman commented 10 months ago

This is related to issue #1160. The ALS is using a different toolchain than the one specified by ALR.