Skip to content
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

fix: delete old files & folders on each js_run_devserver sync #1873

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

gregmagolan
Copy link
Member

@gregmagolan gregmagolan commented Jul 27, 2024

js_run_devserver is aware of all of the files to sync per sync so it is easy enough to delete files that are no longer synced out of the custom sandbox on each sync.

Test plan

  • Covered by existing test cases
  • Manual testing; please provide instructions so we can reproduce:

Run ibazel run //:dev in e2e/webpack_devserver and manually delete a synced file such as src/404.html. Expected output is:

Deleting src/404.html
1 file/folder deleted in 1 ms
+ Syncing 18 files && folders...
+ Syncing 6 non-node_modules files & folders...
Skipping file mylib/index.js since its timestamp has not changed
Skipping file mylib/package.json since its timestamp has not changed
Skipping file package.json since its timestamp has not changed
Skipping file src/index.html since its timestamp has not changed
Skipping file src/index.js since its timestamp has not changed
Skipping file webpack.config.js since its timestamp has not changed
+ Syncing 2 first party package store dep(s)
Skipping file node_modules/.aspect_rules_js/@mycorp+mylib@0.0.0/node_modules/@mycorp/mylib since its timestamp has not changed
Skipping file node_modules/.aspect_rules_js/@mycorp+mypkg@0.0.0/node_modules/@mycorp/mypkg/index.js since its timestamp has not changed
Skipping file node_modules/.aspect_rules_js/@mycorp+mypkg@0.0.0/node_modules/@mycorp/mypkg/package.json since its timestamp has not changed
+ Syncing 10 other node_modules files
Skipping file mylib/node_modules/chalk since its timestamp has not changed
Skipping file node_modules/@bazel/ibazel since its timestamp has not changed
Skipping file node_modules/html-webpack-plugin since its timestamp has not changed
Skipping file node_modules/lodash since its timestamp has not changed
Skipping file node_modules/webpack-cli since its timestamp has not changed
Skipping file node_modules/webpack-dev-server since its timestamp has not changed
Skipping file node_modules/webpack since its timestamp has not changed
Skipping file node_modules/@mycorp/mylib since its timestamp has not changed
Skipping file node_modules/.aspect_rules_js/@mycorp+mypkg@0.0.0/node_modules/chalk since its timestamp has not changed
Skipping file node_modules/@mycorp/mypkg since its timestamp has not changed

@gregmagolan gregmagolan requested a review from jbedard July 27, 2024 01:55
@gregmagolan gregmagolan force-pushed the js_run_devserver_remove_old_files branch 2 times, most recently from fe27bcc to d0e3abc Compare July 27, 2024 01:57
@gregmagolan gregmagolan force-pushed the js_run_devserver_remove_old_files branch 4 times, most recently from ebf32db to 6842101 Compare July 27, 2024 02:31
@gregmagolan gregmagolan force-pushed the js_run_devserver_remove_old_files branch from 6842101 to f1d3370 Compare July 27, 2024 03:23
@gregmagolan gregmagolan merged commit e306629 into main Jul 27, 2024
107 checks passed
@gregmagolan gregmagolan deleted the js_run_devserver_remove_old_files branch July 27, 2024 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants