question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VSCoq doesn't seem to work properly (doesn't interpret code).

See original GitHub issue

Reproduction

(click to expand)

Save the following into ~/a_days_of_the_week.v:

Inductive day : Type :=
  | monday
  | tuesday
  | wednesday
  | thursday
  | friday
  | saturday
  | sunday.

Definition next_weekday (d:day) : day := 
  match d with
    | monday => tuesday
    | tuesday => wednesday
    | wednesday => thursday
    | thursday => friday
    | friday => monday
    | sunday => monday
    | saturday => monday
  end.

Compute (next_weekday friday).

Open with VSCode:

$ code-oss ~/a_days_of_the_week.v
node[27056]: pthread_create: Invalid argument
$

View, Open View…, Coq Language Server:

node[27742]: pthread_create: Invalid argument
Coq Language Server: process.version: v12.8.1, process.arch: x64}
Loading project with no root directory
Changed path to: 

Run command “Coq: Interpret to End” (Alt-End), then view output:

node[27742]: pthread_create: Invalid argument
Coq Language Server: process.version: v12.8.1, process.arch: x64}
Loading project with no root directory
Changed path to: 
starting coqtop
exec: coqtop -v
Detected coqtop version 8.11.2
Coqtop version parsed into semver version 8.11.2

System information

(click to expand)
$ uname --all
Linux a 5.4.42_1 #1 SMP PREEMPT Thu May 21 07:35:36 UTC 2020 x86_64 GNU/Linux
$ coqc -v
The Coq Proof Assistant, version 8.11.2 (May 2020)
compiled on May 15 2020 18:09:59 with OCaml 4.10.0
$ code-oss -v
node[8722]: pthread_create: Invalid argument
1.45.1
Unknown commit
x64
$ code-oss --list-extensions --show-versions | rg coq
node[21916]: pthread_create: Invalid argument
maximedenes.vscoq@0.3.1
$

Other information

(click to expand)

Compiling and running the code through coqc works fine:

$ exa -l | rg a_days_of_the_week
.rw-r--r--  381 a 28 May 0:10 a_days_of_the_week.v
$ coqc ~/a_days_of_the_week.v
     = monday
     : day
$ exa -l | rg a_days_of_the_week
.rw-r--r-- 1.4k a 28 May 0:14 a_days_of_the_week.glob
.rw-r--r--  381 a 28 May 0:10 a_days_of_the_week.v
.rw-r--r-- 4.0k a 28 May 0:14 a_days_of_the_week.vo
.rw-r--r--    0 a 28 May 0:14 a_days_of_the_week.vok
.rw-r--r--    0 a 28 May 0:14 a_days_of_the_week.vos
$

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
TheoWinterhaltercommented, Mar 15, 2021

I have exactly the same problem, the extension tells me “coqtop is not running” and do nothing. I’m using Manjaro linux in wsl2.

Are you having the same problem that it complains about “invalid argument”? “Coqtop is not running” is not an error, it’s just stating the fact that you haven’t started coqtop yet. Have you tried stepping in the file? Like Coq: Step Forward (obtained after opening the command palette)?

0reactions
PhyX-Meowcommented, Mar 15, 2021

I have exactly the same problem, the extension tells me “coqtop is not running” and do nothing. I’m using Manjaro linux in wsl2.

Are you having the same problem that it complains about “invalid argument”? “Coqtop is not running” is not an error, it’s just stating the fact that you haven’t started coqtop yet. Have you tried stepping in the file? Like Coq: Step Forward (obtained after opening the command palette)?

Oh, it now works perfectly. I thought it was an error. Thanks very much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Terminal launch failures - Visual Studio Code
If your terminal is set to run as administrator only, and you are not launching VS Code as administrator, the terminal will not...
Read more >
VS Code does not show correct environment/interpreter in ...
Actual problem appears to be that VS Code did not use environment that I selected and that is shown in bottom left.
Read more >
Select Python interpreter does not work in VScode
When VSCode did not let me select my Python interpreter, I added a defaultInterpreterPath to settings.json which I could select then.
Read more >
Fix program errors and improve code - Visual Studio (Windows)
This article describes some basic ways Visual Studio can help you find and fix problems in your code, including build errors, code analysis, ......
Read more >
Visual Studio Code doesn't run code - Super User
2 Answers 2 · CTRL+SHIFT+X · Type in search box Code Runner · Install the extension · Than click on File - Preferences...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found