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

VS code extension can't find some project files when included with Alire #1180

Open
dalybrown opened this issue Feb 1, 2024 · 8 comments
Open
Assignees
Labels

Comments

@dalybrown
Copy link

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 in alr 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.

@dalybrown
Copy link
Author

dalybrown commented Feb 1, 2024

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 gprinstall ... VS Code still becomes problematic and I lose all navigation to all code. It seems to be something particular with that project because I've installed other projects to the shared location and VS code worked fine.

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.

@AnthonyLeonardoGracio
Copy link
Collaborator

Hello @dalybrown,

We'll try to reproduce on our side. Thanks for the report. We might come back to ask you more questions.

Regards,

@dalybrown
Copy link
Author

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.

@AnthonyLeonardoGracio
Copy link
Collaborator

Are you using the VS Code remote mode?

@dalybrown
Copy link
Author

dalybrown commented Feb 7, 2024

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.)

@AnthonyLeonardoGracio
Copy link
Collaborator

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?

@dalybrown
Copy link
Author

dalybrown commented Feb 8, 2024

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 GPR_PROJECT_PATH to the paths to projects that I use that are not managed by Alire (which, in this case, is AWS because the extension wasn't working when installing AWS with Alire).

I don't quite understand what the MAIN_NUMBER is though.

@AnthonyLeonardoGracio
Copy link
Collaborator

MAIN_NUMBER is just an environment variable's example, in that case to control a project's scenario value.

We'll have a look to the scenario you described. Keeping you posted.

Regards,

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