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

Improve watcher code #6419

Closed
wants to merge 1 commit into from
Closed

Conversation

DZakh
Copy link
Contributor

@DZakh DZakh commented Sep 29, 2023

  1. Moved the code responsible for getting gentypeconfig to the place where it's actually needed. So we don't run unneeded code for other scripts
  2. Stopped calling fs.existsSync(bsConfigFile) for getting gentypeconfig. It's redundant
  3. Fixed watcher being triggered multiple times on .gen.tsx change when the generatedFileExtension option is omitted (the default value is used). I've broken it in the 7e2e81f
  4. Better data structures and algorithms for a little performance gain
  5. Redesigned rebuild scheduling logic. Now it's more bulletproof with a debounce which cancels incoming rebuilds
  6. Started reinitializing dir watchers only on a rebuild after the bsconfig.json change. Before it reinitialized them on every rebuild
  7. Started logging the releaseBuild error in verbose mode
  8. Moved console.clear right before the actual build. Don't clear the console in cases when a lock file is not acquirable
  9. Started failing if can't acquire the .bsb.lock file after 4 retries. It could go into an infinite loop before.

@DZakh
Copy link
Contributor Author

DZakh commented Sep 29, 2023

It's not ready for review. I think there might be an issue

@DZakh
Copy link
Contributor Author

DZakh commented Oct 12, 2023

Let's wait for rewatch 😊

@DZakh DZakh closed this Oct 12, 2023
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.

1 participant