-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use rollup's addWatchFile
API to mark dependencies
#1696
Conversation
One example of the issue this fixes is that, currently, in a v2 addon, if you add a new file in the |
Based on your comments it look like this probably bumps the minimum supported rollup version? That would be OK but we should document it and consider whether this should be a semver major of |
if this end up requiring major, may be bundled with #1697 |
No it would if we had wanted to call it inline in generateBundle, but that’s why I split it out |
Possibly place to add a test if it's not hard: https://github.com/embroider-build/embroider/blob/main/tests/scenarios/v2-addon-dev-watch-test.ts |
Ran into bugs/issues with using polling mode when writing tests for embroider-build#1696, specifically that on my macOS dev environment using polling, when watching a directory it doesn't seem to consistently emit the `added` event. Mainly I wanted to see which, if any, tests fail without this option. It also seemed a bit suspect since rollup/chokidar presumably works on windows out of the box? Even if this is necessary we may want to limit it to the windows test only (can just set `CHOKIDAR_USEPOLLING` on the job level), since this makes things _less_ realistic everywhere else.
Ran into bugs/issues with using polling mode when writing tests for embroider-build#1696, specifically that on my macOS dev environment using polling, when watching a directory it doesn't seem to consistently emit the `added` event. Mainly I wanted to see which, if any, tests fail without this option. It also seemed a bit suspect since rollup/chokidar presumably works on windows out of the box? Even if this is necessary we may want to limit it to the windows test only (can just set `CHOKIDAR_USEPOLLING` on the job level), since this makes things _less_ realistic everywhere else. (cherry picked from commit a562b4e)
a674ba1
to
b0abd15
Compare
This solves a bunch of watch-mode (not) rebuilding issues; as a general rule everytime we probe or read from the file system we should at least consider whether such an annotation is needed. Unfortunately this package doesn't appear to be tested currently, but I have applied the same patch locally and it appears to be working fine.
0196f65
to
4fcdb2d
Compare
I couldn't get the test to work on CI so I split it out into #1711 |
This solves a bunch of watch-mode (not) rebuilding issues; as a general rule everytime we probe or read from the file system we should at least consider whether such an annotation is needed.
Unfortunately this package doesn't appear to be tested currently, but I have applied the same patch locally and it appears to be working fine.
If someone has the bandwidth to set up new tests for this package (similar to https://github.com/embroider-build/embroider/blob/main/tests/scenarios/watch-mode-test.ts), I am happy to add the regression tests, but otherwise it probably shouldn't block landing this, I don't think it's making things worse.