Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Revert "Update directory-watcher to 0.8.3" #1126
The PR #1108 introduced an uncaught regression on macOS.
Now, we run tests on macOS to prevent further regressions.
@tgodzik I can confirm that it looks indeed like a race. Adding a
The core of the problem is that the tests are relying on the file watcher notifications to trigger for the indexer to process SemanticDB files.
Previously, the tests could fail due to delayed file watching notifications that triggered SemanticDB indexing. Now, we manually trigger SemanticDB indexing after `didCompile` notifications to make the tests run more reliably.
I believe the latest commit fixes the macOS issues in a not too hacky way. Instead of relying on file watching notifications when running tests, we now walk the META-INF/semanticdb directory after "compile finished" notifications and manually trigger file watching notifications for SemanticDB files.
Given the issues we have experience with file watching, I am tempted to try https://github.com/lihaoyi/os-lib/#oswatchwatch to see if that implementation is more reliable than our current file watching library.