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

_CoqProject is only searched in first workspace folder - it should be searched in the workspace folder the current file is in #316

Open
MSoegtropIMC opened this issue Nov 22, 2022 · 5 comments

Comments

@MSoegtropIMC
Copy link

VSCoq seems to look for a _CoqProject file only in the root folder of the first workspace folder. It does not look into subfolders of the first workspace folder nor does it look into other workspace folders.

IMHO the searching of the _CoqProject file should start with the file opened and search in the containing folders and upwards. This is what CoqIDE seems to do (since it doesn't have a concept of workspaces CoqIDE doesn't have much of another option anyway).

In general it would be preferable if all editors search/interpret _CoqProject files in the same way. See also my other 2 issues on the topic: coq-community/vscoq-legacy#49 and coq-community/vscoq-legacy#56

@Blaisorblade
Copy link
Contributor

True, that'd be consistent with CoqIDE and Proof General. OTOH, that behavior is a problem with project composition — for other editors, we end up having to rename away most _CoqProject files except the outermost "composed" _CoqProject. Long-term, dune coq top is a better idea for composition, but we're far from there.

As a workaround, at least #179 lets you override the location by hand, which is more flexible.

@MSoegtropIMC
Copy link
Author

My main problem is that I sometimes have several projects loaded which are not intended to be composed. The typical case is a complete rework of a project, where I load the original and reworked variant. I then want to step through some proof in the old and new variant in parallel. I need 2 VSCode instances for this - which is not nice, but OK.

@Blaisorblade
Copy link
Contributor

Oh that would require an extra change: dealing with multiple _CoqProjects. Not rocket science, but the code seems to use a singleton.

@MSoegtropIMC
Copy link
Author

I think the main question is where what we want to be eventually:

  • VSCode centric workspace based setup with VSCode configuration files (like the launch.json files one has in VSCode C)
  • A system which picks up _CoqProject or dune created configuration files in a way compatible with other editors
  • Make the choice between the two configurable

I think eventually we will need both. The casual user is probably more happy with an "auto pick up" solution a la CoqIDE. The expert user probably prefers a works space oriented setup with json configuration files. If we go for JSON config files, I think we should follow common VSCode practice and allow multiple such files in multiple folders.

@maximedenes maximedenes added this to the 2.0.0+beta1 milestone Feb 6, 2023
@maximedenes maximedenes removed this from the 2.0.0+beta1 milestone Aug 6, 2023
@MSoegtropIMC
Copy link
Author

See also #683

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

3 participants