macrome-js / macrome

The in-tree build system
MIT License
7 stars 1 forks source link

Require test conditions to be met eventually #16

Closed conartist6 closed 3 years ago

conartist6 commented 3 years ago

There's no telling how long it will take for the watcher to do its watching. It is likely to be highly system dependent.

conartist6 commented 3 years ago

OK, now what I'm seeing is that the monorepo tests always seem to pass and the simple-project tests always seem to fail. The simple-project generator just fails to respond to any changes. I have a hard time imagining why a platform-specific problem would affect simple project but not monorepos -- their test code is virtually identical...

conartist6 commented 3 years ago

OK so the some-tests-fail scenario was caused by bad snapshots. All tests should have been failing. What I'm seeing now is that CI seems to fail to detect the fake version control root for the test project (the .vcs directory), instead detecting the root of this repo as the vcs root. I'd say this must be a mocking failure because our mock data eliminates the possibility of a .git directory being seen as a vcs root, and that would also explain why the .vcs directory was not being seen as a root.

conartist6 commented 3 years ago

I'm still not 100% sure what the root cause is, but I was wrong about mocking -- the problem is a straight up bug in my code. When you subscribe with watchman watchman tells you what the real root directory it is watching is, and all future responses are relative to the watch root. This is in my opinion a very odd choice, perhaps not at the protocol level, but it's something I try to paper over in my watchman client. It seems however that I am accounting for it inadequately and that I don't have any tests directly against that functionality.