Skip to content

Make --watch work for dune exec #2934

@shonfeder

Description

@shonfeder

When developing web services, it is often useful to rebuild and restart the executable on any file changes. Thus, it would be useful to be able to run dune exec foo --watch and have the program restarted on changes.

While --watch is a valid argument to dune exec (since is a common flag), afaict it is not implemented for dune exec. It seems to only be implemented for commands that go through Main.run_build_command, whereas Exec.command invokes the scheduler with Import.do_build directly, bypassing the handling for watch.

Any thoughts on how desirable this would be and how difficult it would be to implement?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions