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

Dune crashes when editing a file in exec watch mode #11010

Open
LAC-Tech opened this issue Oct 13, 2024 · 6 comments
Open

Dune crashes when editing a file in exec watch mode #11010

LAC-Tech opened this issue Oct 13, 2024 · 6 comments
Labels

Comments

@LAC-Tech
Copy link

Expected Behavior

Dune not to crash when editing data.ml

Actual Behavior

Dune crashes when data.ml is edited, even if you just save the file without changing anything, with this output:

Error: _build/default/.hello.eobjs/dune__exe__Hello.impl.d: No such file or
directory
-> required by _build/default/.hello.eobjs/dune__exe__Hello.impl.all-deps
-> required by _build/default/hello.exe
Had 1 error, waiting for filesystem changes...      

Reproduction

clone https://github.com/LAC-Tech/dunebug
run

dune exec -w ./hello.exe

Save file data.ml in your editor. (saving hello.ml works fine). You may sometimes have to save 2 or 3 times to get it to crash.

Specifications

dune 3.16.0
The OCaml toplevel, version 5.2.0
Arch Linux, kernel 6.10.6, x86_64

@maiste
Copy link
Collaborator

maiste commented Oct 17, 2024

This might be related to #10959.

@maiste maiste added the bug label Oct 17, 2024
@maiste
Copy link
Collaborator

maiste commented Oct 22, 2024

@LAC-Tech could you try again and tell me if it is working with the latest version of dune? It seems to have been fixed with #10960. I can't reproduce with your example again using main version of dune.

@LAC-Tech
Copy link
Author

LAC-Tech commented Nov 1, 2024

Hi, excuse the late reply and basic question - but what's the best way to get this main dune version? build myself, install with opam flag? Just point me in the right direction.

@maiste
Copy link
Collaborator

maiste commented Nov 2, 2024

You can either build it yourself or use the binary version from https://preview.dune.build (nightly version of dune built from the main branch).

@LAC-Tech
Copy link
Author

LAC-Tech commented Nov 3, 2024

Thanks. Exact same issue I'm afraid.

$ ~/.dune/bin/dune --version
"Dune Developer Preview: build 2024-11-02T02:13:00Z, git revision
c2e0160fd0b593c63536c7081238da1da5140720"

Then running with: ~/.dune/bin/dune exec -w ./hello.exe, and saving data.ml (which seems to be what's causing the race condition), I get the same error message.

Tried with a plain neovim, default config no plugins incase an LSP was causing an issue. But no luck.

Is there any information I can provide that might help?

@maiste
Copy link
Collaborator

maiste commented Nov 3, 2024

Thanks for trying! I was betting on the fact that the mentioned PR introduced delays in computation that could possibly solve the issue. Apparently not.

You already provided a reproduction case so we don't need extra information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants