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

[Bug]: Problems when project file specified in initializationOptions #1209

Open
brownts opened this issue Sep 30, 2024 · 1 comment
Open
Assignees
Labels

Comments

@brownts
Copy link

brownts commented Sep 30, 2024

Environment

  • OS and Version: Windows 10, Ubuntu 22.04
  • IDE Version: Emacs 30
  • Ada & SPARK Extension Version: 24.0.6, 25.0.20240915, maybe more

Bug Summary and Reproducer

Bug Summary:

When specifying configuration in initializationOptions instead of workspace/didChangeConfiguration, I'm expecting the project file to be used. However, it appears its may be partially used. I still see indexing in the log and there is no diagnostic about not finding the project file. However, the textDocument/definition to other files all seem to fail.

I've included an example project and logs. Starting with the test.adb source file, the ALS is started up. I wait for the $/progress to indicate completion and then I try to jump to definitions. First, I try it on the call to "Do_Something" and next I try it on the "My_Lib" with clause. Both fail with empty results being returned from the server. Finally, I issue an "als-project-file" command and the ALS returns the path to a "default.gpr" file in the root directory (see the Ada trace file) instead of the project file identified in the initializationOptions.

Steps to reproduce:

I've included an example application. Assuming the configuration is all sent in initializationOptions without any further workspace/didChangeConfiguration.

Expected behavior:

I expect the Ada Language Server textDocument/definition to successfully locate the references to the "with'd" package. Furthermore, I expect the "als-project-file" to report back the project file specified in the initializationOptions. Additionally, if it's using the "default.gpr" for some reason, I expect to see a diagnostic indicating it couldn't find the project file.

Configuration and Logs

als.2024-09-30T173123.1029207.log

Additional context

initializationOptions.zip

@brownts brownts added the bug label Sep 30, 2024
@setton setton self-assigned this Oct 1, 2024
@setton
Copy link
Member

setton commented Oct 1, 2024

Hello @brownts - thank you for sending this through. We're working on this and will make sure this is solved in the next iteration.

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

No branches or pull requests

2 participants