-
Notifications
You must be signed in to change notification settings - Fork 60
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
VS code extension can't find some project files when included with Alire #1180
Comments
What's weird is even if I install the ada web server outside of alire into a standard place in my GPR_PROJECT_PATH using I noticed that occasionally it will actually find the projects if I just reload the window a few times in a row. There is a bug somewhere here. |
Hello @dalybrown, We'll try to reproduce on our side. Thanks for the report. We might come back to ask you more questions. Regards, |
Thanks. Yeah I don't know how else to precisely explain the problem. I can reproduce it in my environment easy enough though. I wonder if there is a race condition between indexing / finding all the projects and their sources and the VS code extension declaring there is a problem with the environment and giving up. |
Are you using the VS Code remote mode? |
Yeah... we develop in a docker container, so we are always using the remote development extensions. (Specifically, we use dev containers and so we use the builtin support of the remove development extensions for those.) |
Ok I see, thanks for the quick answer. As you may know, VS Code's environment management with the Remote mode requires to specify the environment per workspace, as described in our documentation here. Have you already followed these instructions? |
I did not see those instructions. To be clear: this setup works without that most of the time. It is only the odd time (e.g., with the scenario I described above) where we see these issues. I set the I don't quite understand what the |
We'll have a look to the scenario you described. Keeping you posted. Regards, |
Could you try |
I will try this next week when I (hopefully) get back to coding. Thanks! |
On my aarch64 Mac I was having similar issues until this new release (the .workspace paths not updating, so no navigatin worked). It seems OK now, but it doesn't actually update the .workspace file until the project is closed and re-loaded (project-reload command doesn't work). |
I get this error when using
This is with a fresh crate. Something doesn't seem right still. |
I've encountered the same issue and resolved it. It seems ALS is unable to access to the GPR_PROJECT_PATH environment variable which contains the path the projects dependencies managed by Alire. This is quite odd since Alire and ALS worked well previously. I suspect the current version of VSCode maybe the source of the issue. Adding the following lines to your config or workspace file works, but interestingly, it continues to work even after removing them. I am now unable to reproduce the old error. Weird!:
|
Hello @Joebeazelman, This should not be needed since the ALS calls Regards, |
The documentation is wrong. Linux and MacOS are two separate platforms. You need "terminal.integrated.env.osx" in order for VSCode not to complain. Do you guys have access to Mac for development and testing purposes? |
We can make the doc a bit more precise, but the idea is really to mention that users need to set We don't have internal testing on Mac OS, but we have it on GitHub though. But this is documentation, not actual code, and thus it can' t be properly tested. |
The doc has been updated for info. |
Here's another symptom of the bug. If your project specifies a runtime in the project file, for instance Light-Tasking-Runtime-Stm32F04, it's aware of it just like any library. During compilation, however, ALS reports an error, claiming it "can't find a runtime for the language Ada." The compiler doesn't encounter this issue. I suspect one part of ALS can find it, but another part of it can't. It may be related to path name handling. |
@Joebeazelman Is it an Alire project? If yes, make sure to add Let me know if the issue still persist after that. Regards, |
Thanks. Unfortunately, I can't reproduce the issue, it just happens once in a while. I think this issue and similar ones occur when there are multiple projects in the same workspace. Alire doesn't like it when its context changes, i.e. switching between manifests during the same execution instance. Since ALS needs to obtain information from Alire to function, it's conceivable the context is lost when ALS parses a file in a different project, but in the same workspace. I asked about this issue somewhere else and Mosteo said there's a Anyway, I'm no longer having this issue, but will try to take notes when it does occur. |
Projects that seem to have their own actions for building / installing in non-standard places seem to be problematic for Alire and it results in all code being non-navigable.
For example, trying to include the Ada Web Server in a project (i.e.,
alr with aws
) exposes this problem because AWS has actions to build/install itself when deployed. It seems like within the Alire environment the GPR_PROJECT_PATH is set correctly to the installed path of AWS, but VS code still complains. All code is then non-navigable. It is built properly though (as inalr build
picks up the right environment).It's easy to reproduce: just create a new project, with aws, and try to navigate the code. The issue seems to be present using shared and non-shared dependencies in Alire.
The text was updated successfully, but these errors were encountered: