-
Notifications
You must be signed in to change notification settings - Fork 411
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
Allow "dune coq top" to step through unsaved files #7670
Comments
Note that a workaround is to write an empty file to disk, and to immediately deleted after the toplevel has been started. However, that is a bit annoying to do, and I think it would be easy to find the relevant stanza, and extend the list of source files with the one given as argument (or something like that). |
It is actually a bit tricky to implement this properly, imagine the following (coq.theory
(name A)
(modules a))
(coq.theory
(name B)
(modules b)) So in this case we won't be able to find a file. If we update |
I see, you're right that it is non-trivial, at least in complicated setups. Maybe we should only support this if there is a single |
That sounds like a reasonable solution to me. |
I'm afraid that the code to do that could be even more complex than just injecting a file in the filesystem, which happens at an earlier phase (VFS build). There is a little bit of a hack that maybe could work without too much effort: if the file doesn't exist, create it, then just run dune. You could do that in the code for |
That's exactly what some of us have been doing, but I was hoping to move towards not having to hack around problems with a wrapper script. 😄 |
Coming back to this, is the suggestion for |
I think that is one possibility, yes. |
I'm a bit weary of doing something like that in case we have something like |
Yeah, I'm actually not entirely sold on the idea either. Maybe this whole use-case does not really matter, and the user can just save their file before running the top-level. |
Indeed it seems to me that Dune requires the file to be present in the filesystem; I'm not sure it would work fine, but we could do as Ali proposes just having It seems to me that guarding this with a command line option could be a good idea so |
Desired Behavior
(This is a follow up to #7355, which was not completely addressed.)
If a file
file.v
that has not yet be written to disk would be part of acoq.theory
stanza, thendune coq top file.v
should not fail, and allow you to step through the file.Current behavior
The command currently fails with
Error: Cannot find file: file.v
.The text was updated successfully, but these errors were encountered: