-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cannot interpret coq file on ubuntu with Coq and VsCode installed through Snap. #53
Comments
"alt + end" or "alt + down" does also not do anything? "alt + up" giving not running is the normal behaviour, so I'm optimistic. Can you paste the log of the "Coq language server" after attempting one of those commands? (Ctrl + j -> "Output" (tabs on bottom) -> Coq language server (dropdown menu at right of "output" )). |
If you run |
Yes, these commands do nothing. starting coqtop |
The Coq Proof Assistant, version 8.13.1 (February 2021) |
I can reproduce it here using both coq and vscode from snap packages. |
Yes, I can. I am using code from a snap. |
This workflow will produce a snap containing the tentative fix in about 1h |
it does not work (yet) |
Unfortunately it seems an open problem canonical/snapd#8699 |
OK, I did some digging:
I'm not very familiar with diff --git a/server/src/coqtop/CoqTop.ts b/server/src/coqtop/CoqTop.ts
index c7ddb4e..4626d5a 100644
--- a/server/src/coqtop/CoqTop.ts
+++ b/server/src/coqtop/CoqTop.ts
@@ -105,7 +105,7 @@ export function detectVersion(coqtopModule: string, cwd: string, console?: {log:
const ver = /^\s*The Coq Proof Assistant, version (.+?)\s/.exec(result);
// if(!ver)
// console.warn('Could not detect coqtop version');
- resolve(!ver ? undefined : ver[1]);
+ resolve(!ver ? "8.13.1" : ver[1]);
});
coqtop.on('error', (code:number) => {
// console.warn(`Could not start coqtop; error code: ${code}`) If it works, then it means I've identified the problem but I still need some help since my fix is just a hack. |
FTR, if one is willing to clean up this code, |
It seems like your hack works, I have tested it. |
@fakusb any idea how to debug this? I don't have more time for this, but it may not even be worth digging deeper if we
WDYT? |
I don't have an good idea on debugging this. It does not have to do with the version-check code executing 'coqtop' instead of 'coqtop.opt' , does it (I don't use snap myself)? |
It looks like we've had some students in a large course bump into this issue. Is there any short term workaround? Many thanks for any advice or help folks can provide! |
I think the easiest workaround is to install the hacked vsix as per #53 |
Just in case, it does not really matter if vscoq "detects" 8.13.1 but the student is running 8.12.x or any other non-super-old versions of Coq. |
@fakusb Maybe it would be worth implementing the defaulting idea and hot releasing a new version ASAP, WDYT? |
@Zimmi48 I will publish this hotfix asap |
Thanks! |
I think coq/vscoq#223 fixes this, could someone test it inside snap before I release? Here is a build |
Unfortunately, I can't help here, because I can't install Snap packages on NixOS 😞 |
Still facing this issue on Ubuntu $ coqc -v Logs from Coq Language Server:
|
unfortunately I think the patch as not been published yet. We should do a release very soon. |
Wait I must be missing something: shouldn't the existing patch be included in 0.3.6 from last January? AFAICT, the problem has gotten worse. Recall VsCoq runs coqtop and then coqidetop:
|
This might be related to https://coq.zulipchat.com/#narrow/stream/237662-VsCoq-devs-.26-users/topic/Coq.20in.20VS.20Code |
Thanks for the find! At least that sounds like a work around. @4ever2 Can you try giving the Coq snap permission to access files? https://snapcraft.io/docs/home-interface suggests this might not be automatically enabled.
Enrico wrote that this
But IIUC Coq is a confined snap, and file access via the EDIT: links for (my) references:
|
Permission for
This doesn't make any difference. Something that is worth noting is that this problem only occurs if both Coq and VSCode were installed through snap. |
@4ever2 How familiar are you with After all, it's possible coqidetop used to not run into this problem — around 8.13 @gares reproduced the problem and (IIUC) fixed it by ignoring |
@Blaisorblade I don't have much experience with
|
The Snap package is being retired, so perhaps this issue can be closed. |
I have installed coq via snap. If I use coqide everything works well. Then I have created a new directory and a coq file inside and created new vscode project by typing
code .
I have installed vscoq. When I press alt + home or other shortcut there is almost no reaction. alt + up brings up a proofview window with the "Not running" words written. Setting path to directory with coqtop does not help.Ubuntu 20.10
The text was updated successfully, but these errors were encountered: