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

Hot reload does not work with complex configuration vim #530

Open
hbuxiaofei opened this issue Jun 4, 2024 · 2 comments · May be fixed by #532
Open

Hot reload does not work with complex configuration vim #530

hbuxiaofei opened this issue Jun 4, 2024 · 2 comments · May be fixed by #532
Labels
cli CLI python Python API rust

Comments

@hbuxiaofei
Copy link

Env:

  • Ubuntu 24.04 LTS
  • dora-cli 0.3.4

When editing a source file using the vim editor, the following events will occur:

>>> recv an event: Ok(Event { kind: Modify(Name(From)), paths: ["/home/rayylee/github/code-test/rust/dora-test/python-operator-dataflow/plot.py"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None })
>>> recv an event: Ok(Event { kind: Modify(Metadata(Any)), paths: ["/home/rayylee/github/code-test/rust/dora-test/python-operator-dataflow/plot.py"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None })
>>> recv an event: Ok(Event { kind: Remove(File), paths: ["/home/rayylee/github/code-test/rust/dora-test/python-operator-dataflow/plot.py"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None })

The ModifyKind::Data event will not occur.

@phil-opp
Copy link
Collaborator

phil-opp commented Jun 4, 2024

Thanks for reporting!

Apparently vim is replacing the file with a new one when saving it, instead of modifying it. See notify-rs/notify#247 and notify-rs/notify#113. So it looks like we have to watch the directory instead.

@phil-opp phil-opp linked a pull request Jun 4, 2024 that will close this issue
@phil-opp
Copy link
Collaborator

phil-opp commented Jun 4, 2024

I opened a PR to hopefully fix this issue: #532. Could you please try whether it works for you? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli CLI python Python API rust
Projects
None yet
2 participants