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]: project file loaded too late (#1189 REOPEN) #1207

Open
PaulCayard opened this issue Sep 23, 2024 · 10 comments
Open

[Bug]: project file loaded too late (#1189 REOPEN) #1207

PaulCayard opened this issue Sep 23, 2024 · 10 comments
Assignees
Labels

Comments

@PaulCayard
Copy link

Environment

  • OS and Version: Windows 10
  • IDE Version: VS Code 1.93.1
  • Ada & SPARK Extension Version: v25.0.20240915

Bug Summary and Reproducer

Bug Summary:
Issue #1189 is occured again after updating to v25.0.20240915. I cannot reopen Issue #1189.
See Issue #1189 for further details.

Steps to reproduce:
See Issue #1189.

Expected behavior:
See Issue #1189.

Configuration and Logs

See Issue #1189.

Other VS Code Extensions

No response

Additional context

No response

@PaulCayard PaulCayard added the bug label Sep 23, 2024
@AnthonyLeonardoGracio
Copy link
Collaborator

Hello,

We are currently revamping the way we load projects, hopefully this will be fixed in the next version of the extension.

Regards,

@AnthonyLeonardoGracio AnthonyLeonardoGracio self-assigned this Oct 11, 2024
@PaulCayard
Copy link
Author

Hi, problem is fixed in v25.0.20241014, but error message* is still present.
(*): "No project found in root directory. Please create a project file and add it to the configuration."

Thanks for the fix!

@AnthonyLeonardoGracio
Copy link
Collaborator

Hi, problem is fixed in v25.0.20241014, but error message* is still present. (*): "No project found in root directory. Please create a project file and add it to the configuration."

Thanks for the fix!

Hello, have you specified the ada.projectFile setting for your workspace? Otherwise this warning is expected.

@PaulCayard
Copy link
Author

Yes, in "settings.json":
"ada.projectFile": ".vscode/sysco.gpr",

@AnthonyLeonardoGracio
Copy link
Collaborator

Yes, in "settings.json": "ada.projectFile": ".vscode/sysco.gpr",

Ok, strange. Can you share the log file corresponding to that session? You should find them under the ~/.als directory

@PaulCayard
Copy link
Author

PaulCayard commented Oct 18, 2024

Yes! (PATH content is omitted)
ada_ls_log.2024-10-18T164845.log

[ALS.MAIN] ALS version: 25.0 (20241014)
[ALS.MAIN] Initializing server ...
[ALS.MAIN] GPR PATH: 
[ALS.MAIN] PATH: 
[...]
[ALS.MAIN] Ada version used for predefined completion: ADA_2020
[ALS.MAIN] In Message_Handler Text_Document_Did_Open URI:
[ALS.MAIN] file:///d%3A/Serena/CMDP/4_CODE/CMDP_SYSCO/src/ofp/DB/DB.Manager.adb
[ALS.MAIN] Looking for a project... Root:
[ALS.MAIN] file:///d%3A/Serena/CMDP/4_CODE/CMDP_SYSCO
[ALS.MAIN] Loading the implicit project because NO_PROJECT
[ALS.MAIN] Loading the implicit project because NO_PROJECT
[ALS.MAIN] Diag: 
_ALS.MAIN_ (PROJECT_TYPE => IMPLICIT_PROJECT,
_ALS.MAIN_  STATUS => NO_PROJECT,
_ALS.MAIN_  PROJECT_FILE => {GNATCOLL.VFS.VIRTUAL_FILE object},
_ALS.MAIN_  MISSING_ADA_RUNTIME => FALSE,
_ALS.MAIN_  GPR2_MESSAGES => {GPR2.LOG.OBJECT object})
[ALS.MAIN] Out Message_Handler Text_Document_Did_Open
[ALS.MAIN] GPR2 Log Messages:
[ALS.MAIN] Prepend Context Id: file:///D%3A/Serena/CMDP/4_CODE/CMDP_SYSCO/.vscode/sysco.gpr

@AnthonyLeonardoGracio
Copy link
Collaborator

Yes! (PATH content is omitted) ada_ls_log.2024-10-18T164845.log

[ALS.MAIN] ALS version: 25.0 (20241014)
[ALS.MAIN] Initializing server ...
[ALS.MAIN] GPR PATH: 
[ALS.MAIN] PATH: 
[...]
[ALS.MAIN] Ada version used for predefined completion: ADA_2020
[ALS.MAIN] In Message_Handler Text_Document_Did_Open URI:
[ALS.MAIN] file:///d%3A/Serena/CMDP/4_CODE/CMDP_SYSCO/src/ofp/DB/DB.Manager.adb
[ALS.MAIN] Looking for a project... Root:
[ALS.MAIN] file:///d%3A/Serena/CMDP/4_CODE/CMDP_SYSCO
[ALS.MAIN] Loading the implicit project because NO_PROJECT
[ALS.MAIN] Loading the implicit project because NO_PROJECT
[ALS.MAIN] Diag: 
_ALS.MAIN_ (PROJECT_TYPE => IMPLICIT_PROJECT,
_ALS.MAIN_  STATUS => NO_PROJECT,
_ALS.MAIN_  PROJECT_FILE => {GNATCOLL.VFS.VIRTUAL_FILE object},
_ALS.MAIN_  MISSING_ADA_RUNTIME => FALSE,
_ALS.MAIN_  GPR2_MESSAGES => {GPR2.LOG.OBJECT object})
[ALS.MAIN] Out Message_Handler Text_Document_Did_Open
[ALS.MAIN] GPR2 Log Messages:
[ALS.MAIN] Prepend Context Id: file:///D%3A/Serena/CMDP/4_CODE/CMDP_SYSCO/.vscode/sysco.gpr

Actually we load the project specified in ada.projectFile after receiving the didChangeConfiguration request from the client: would you be able to share the lines related to this request and the corresponding GPR2 messages?

@PaulCayard
Copy link
Author

In the previous post I've omitted "[ALS.MAIN] PATH: [...]" line only.
How can I help you?

@AnthonyLeonardoGracio
Copy link
Collaborator

Ah sorry, you will need to add the following lines to the ~/.als/ada_ls_traces.cfg file:

ALS.IN=yes
ALS.OUT=yes

This will trace all the in/out communication between the client and the server, including the didChangeConfiguration request.

@PaulCayard
Copy link
Author

I've attached an extract of the log.
log.txt

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