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

Initial implementaiton of Alire support breaks 23.0.13 preset alire configuration #1129

Closed
TamaMcGlinn opened this issue Feb 25, 2023 · 5 comments

Comments

@TamaMcGlinn
Copy link

With version 23.0.13 of the Ada extension, I was able to get openvscode-server to find the AdaBots alire environment by setting explicitly all the necessary environment variables inside the Dockerfile. However, with the release of 23.0.14 that no longer works - it works for a few minutes, until VSCode decides to update to the latest version and then I get a popup with an error relating to Alire, syntax highlighting is gone and I can no longer navigate to definitions from subprogram calls.

My suggestion to fix this is to make the extension check this environment variable, and not do anything automatically if it is already set: export ALIRE="True". If this env variable is already set, it signifies the system already has the alire environment set up.

@TamaMcGlinn
Copy link
Author

The error says "alr --non-interactive show":

alr_vscode_error

$ alr version
APPLICATION                                                                                         
alr version:               1.2.2                                                                    
libalire version:          1.2.2                                                                    
compilation date:          2023-01-12 20:53:49                                                      
compiler version:          Community 2021 (20210519-103)

@reznikmm
Copy link
Member

reznikmm commented Feb 27, 2023

How can I reproduce this?

@TamaMcGlinn
Copy link
Author

TamaMcGlinn commented Feb 28, 2023

docker run -it --init -p 3000:3000 -p 7112:7112 -v "$(pwd):/home/workspace/src/user_src" tmcglinn/adabots_openvscode:1.0.0

Then open http://localhost:3000/?folder=/home/workspace and open any adb file in src, for example src/construction/build_house.adb. If you are quick, you can cntrl click Adabots.Create_Turtle; but on the left under Extensions you can see it automatically starts updating to version 14, and after that is done it won't work anymore.

@reznikmm
Copy link
Member

reznikmm commented Mar 3, 2023

Your alr is broken and ALS can't launch it. The file contains:

$ cat /home/.openvscode-server/bin/alr
/home/.openvscode-server/tools/alr --appimage-extract-and-run $@

Without shell shebang #!/bin/sh OS (execve call) can't launch it. When I add the shebang alr --non-interactive show works fine, but alr --non-interactive printenv fails with message:

Failed to clean up cache directory

I think, this is because you are using AppArmor version of alr. If I replace it with Linux binary (even with bash wrapper), ALS works as expected.

Can you replace AppArmor with Linux binary?

Your idea of checking ALIRE=True is worth to implement, I guess. Thank you.

adacore-bot pushed a commit that referenced this issue Mar 5, 2023
adacore-bot pushed a commit that referenced this issue Mar 7, 2023
Catch launch error with `Error_Occurred` and resolve error code
to get diagnostics.

Refs #1129
@reznikmm
Copy link
Member

Should be fixed in 23.0.15

adacore-bot pushed a commit that referenced this issue Jun 5, 2023
Bump edge to master

Closes #1132, #1128, and #1129

See merge request eng/ide/ada_language_server!1218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants