-
Notifications
You must be signed in to change notification settings - Fork 72
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
[VsCoq1] Progress on #134: Use dune coq top (when enabled by a setting) #319
Conversation
"coqtop.binPath": { | ||
"type": "string", | ||
"default": "", | ||
"description": "Path to coqtop and coqidetop binaries (alternatively, hoqtop and hoqidetop)." | ||
"description": "Path to folder with coqtop and coqidetop binaries (alternatively, hoqtop and hoqidetop)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unrelated message improvement.
This isn't complete but I've been using it for a while (must still rebase over 0.3.7). I'd like to ask what would be considered necessary. The lack of a decent progress dialog seems the most annoying problem... |
d41bd49
to
18cce19
Compare
18cce19
to
d900683
Compare
Bug report: this still passes flags from |
Doesn't this PR also fix coq-community/vscoq-legacy#55? |
Yep, thanks @4ever2 |
ae99c7e
to
8564194
Compare
@Blaisorblade tell me when you think it is mergeable |
This PR is not ready to merge I guess. But one nitpick: why should we continue using I'll probably review this PR more carefully later. |
if (uri.scheme == "file") | ||
return uri.fsPath; | ||
else | ||
return undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new since last revision and enables stepping through unsaved files (but only outside dune coq top).
[this.settings.dunePath, ["coq", "top", "--toplevel=" + coqtopModule, | ||
scriptPath, "--", ...coqArgs]] : | ||
[coqtopModule, coqArgs] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@huynhtrankhanh Since the code relied on var
's scoping, this seems the smallest possible change.
Had to lift error checking since TS seems to lack statement expressions, but I guess that's not too bad. I guess function () { ... } ()
lets you encode them, but I wouldn't know if that's idiomatic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, if anything seems silly it's because I'm not really a TypeScript dev and I was following existing idioms.
I've done the main changes I planned, tried to address @huynhtrankhanh's comments, but I'll be retesting more later today. |
faf3152
to
eb5e9ec
Compare
The latest changes seem to work, and I addressed @huynhtrankhanh 's comments, so I consider this ready for review and merging. |
@Blaisorblade Perfect I will try to have a look at it today. Would be good if @huynhtrankhanh would give his opinion too |
@@ -86,9 +86,12 @@ export class CoqProject { | |||
this.coqProjectRoot = newSettings.coq.coqProjectRoot; | |||
this.console.log("Updated project root to " + this.getCoqProjectRoot()); | |||
} | |||
if(newSettings.coq.loadCoqProject ) { | |||
if(newSettings.coq.loadCoqProject && !newSettings.coqtop.useDune) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this means that if your flag is not set, everything works like as before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was my design goal :-).
@Blaisorblade I had a look, it seems ok. |
This PR looks perfect. I really appreciate your work. However, there's one issue: the configuration options! There are two options here, which should be mutually exclusive: |
@huynhtrankhanh you would prefer a coqtop.configMode with the options coqproject or dune? |
Thanks for the review!
Good idea; that works for me. I'm afraid I can get back to it in a couple days. Dropping "ignore both" as @thery suggests also seems plausible but has a slightly higher chances of regressions — does any user need to disable |
@Blaisorblade @huynhtrankhanh I would like to make a new release beginning of march, do you think we can make this PR ready to merge by then? |
This also allows stepping through unsaved files; before this patch, we passed `-topfile untitled:Untitled-1`, which failed with: ``` coqtop-stderr: Error: Invalid character ':' in identifier "untitled:Untitled-1". ```
- Add `coqtop.useDune` and dune path to settings. - spawnCoqTop: use dune coq top - Skip `_CoqProject` when `useDune` is set. - Address review: Switch new code to const as requested
89bba8c
to
5e6ed44
Compare
Sorry I'm late — I plan to address the comment next week, what I pushed just updates the extension for dune coq top changes (now dune wants relative paths, so we oblige). |
what is the status of this PR? |
Sorry this hasn't progressed :-| ... Closing for now. |
Address #134 for VsCoq1. The first commit fixes coq-community/vscoq-legacy#55.
This is a V0 prototype with some limitations, but it appears somewhat suitable for use.
dune
projects, but an explicit setting. Since it can be set per workspace, since most dune projects also have a_CoqProject
file, and sincedune coq top
is probably somewhat experimental, I consider this sufficient for now.What I tested was my integration branch — https://github.com/Blaisorblade/vscoq/tree/thread-count-option-misc.
Some unexpected messages appeared, but they seem due to the options added by dune coq top.
The last one suggests that
.coqrc
is not being loaded, but it appears untrue — I usedto confirm my
.coqrc
settings were active.