Open brabeji opened 5 years ago
We're working on trying out @atom/watcher
watcher right now to support larger codebases. If we find it's performant enough, I'll take a look at adding in handlers for deletion and renames.
That may be tough though, since deleting/renaming files containing types could be an issue. I'll mention more later on if we move forward.
Also it doesn't handle globs with relative paths (
--includes './src/**/*.gql'
).
this will be fixed with the release of #1007
Intended outcome:
--watch
is able to track added, deleted and renamed files.Actual outcome:
Currently only changes in preexisting files trigger watch.
How to reproduce the issue: Try to create a query file matching
includes
pattern.Further info: There are two parts to this problem:
Watching logic is insufficient (no deletion and rename handling at least): https://github.com/apollographql/apollo-tooling/blob/a30f0e16b0dc65a7e09cb2c2c1a87a8962de2654/packages/apollo/src/commands/client/codegen.ts#L219
Even after quick fix I made locally to handle specific cases:
the result is not satisfactory. For example deletion of enclosing folder doesn't trigger file deletion. Gaze lib used for watching seems quite unreliable in edge-cases. Also it doesn't handle globs with relative paths (
--includes './src/**/*.gql'
).