Skip to content

Watch multiple directories #97

@SJrX

Description

@SJrX

Hi there,

So I have two go projects and the first depends on the second. When doing local development, I will use Go's module replace function to point to the other directory on disk. I have some reflex commands that will rebuild the projects. I was hoping that I could just have the first project watch for local go changes, or for the binary of the second one changes, however this doesn't seem to work.

In other words, if given two directories dir1 and dir2 I want to run reflex in each directory, but in dir1 watch file(s) in dir2 somehow.

My guess is that if you try to watch something outside of your current directory, either via a glob or a regex, it doesn't set up the watches properly and so never sees anything.

I think it might be nice for reflex to warn if a glob pattern doesn't match the current directory or something, but separately it'd also be nice to be able to do this. I ended up doing something super hacky where in the reflex command of the second, I update a file in a git ignored directory.

It's also possible that this does work and it is just user error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions