You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is: the convex backend only refreshes if files under src/deps/convex change, but not when the imported dependent files change also - This results in having to redundantly save any file in the convex directory to see the changes reflected on the backend.
Any ideas how to overcome this issue? I am considering using Convex for a larger project with a large number of "modules" each having it's own table and functions. Having a neat folder structure is a must for such a use case.
Proposed solutions
1) Allow for specifying which folders the CLI should watch through a flag
A potential solution could look like this: bunx convex dev --watch src/modules/**/convex
2) Extending the schema so that dependent folders can be specified
The pattern that the CLI is designed for - is to put the modules under the convex/ directory. If everything is in the configured convex/ directory, then convex dev will work as you're expecting. You can still have neat directory structure for separate tables.
From reading the source, my understanding is that the desired behavior is actually that any files that are read in the bundling phase become part of the observedDirectory set and are part of the file watcher for hot-reload. Thus, I would expect that even the dependencies you mentioned would be part of the hot reload process.
If you're able to make a small repo that reproes the issue, that would be amazing to help debug.
Hello 👋
Context
I have configured my project to have the convex directory under the src/deps folder.
Under
src/deps/convex/schema.ts
I have atask
table which is imported from elsewhere.Problem
The problem is: the convex backend only refreshes if files under
src/deps/convex
change, but not when the imported dependent files change also - This results in having to redundantly save any file in the convex directory to see the changes reflected on the backend.Any ideas how to overcome this issue? I am considering using Convex for a larger project with a large number of "modules" each having it's own table and functions. Having a neat folder structure is a must for such a use case.
Proposed solutions
1) Allow for specifying which folders the CLI should watch through a flag
bunx convex dev --watch src/modules/**/convex
2) Extending the schema so that dependent folders can be specified
3) Allow for multiple functions directories to be specified
The text was updated successfully, but these errors were encountered: