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 daemon startup times #7322
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
🟢 Turbopack Benchmark CI successful 🟢Thanks |
🟢 CI successful 🟢Thanks |
0fea88a
to
a8f92ea
Compare
a8f92ea
to
04fd1c6
Compare
04fd1c6
to
6ca8395
Compare
6ca8395
to
048d5f5
Compare
3ca3f2a
to
1a90d25
Compare
0df85ed
to
3efde3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks quite good. I am a little concerned about the potential for deadlocking with the use of OptionalWatch
. Are we ever holding a Ref
across an await
?
Tokio requires all futures to be Send meaning that we the compiler ensures that a |
3efde3d
to
4929932
Compare
4929932
to
1b73c2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial Review, primarily on cookies.rs
and lib.rs
/ file-watching startup. Will continue to review more of the PR, but wanted to make sure these comments get out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more comments. Going to wait on reviewing package_watcher.rs
more thoroughly since I don't think this PR re-enables its use.
oneshot::Sender<()>, | ||
JoinHandle<Result<(), WatchError>>, | ||
) { | ||
let file_watching = FileWatching::new(repo_root.clone(), package_discovery_backup).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe kind of a nit, but I'm not sure moving filewatching startup into the Grpc server new
makes sense. We'll have to move it out again if we ever want to share it with any other communication mechanism.
Is there a reason to move it in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Really, everything can move out (package discovery watcher, and file watcher) when the time comes. Since we are creating the package discovery in here also I think it makes sense but it makes sense to move it out if/when we decide to provide alternative APIs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we need some naming conventions around these types. Like types wrapped OptionalWatch
could be suffixed with _lazy
or something similar. And maybe it'd make sense to diagram or explain somewhere which values the different structs take in and which they sent out.
|
||
let package_json_path = repo_root.join_component("package.json"); | ||
|
||
let _task = tokio::spawn({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused. What is this task doing that watch cannot do? Like this appears to be initializing everything, but shouldn't that happen before the loop in watch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is nice to colocate. I have experimented with both, so I don't really have a strong opinion on which one we go with. Happy to have that be a design decision in the docs we are putting together.
Ok, changed convention from _rx and _tx to _lazy and _tx |
Most uses actually do not need mutability anyways, and those that do can often mitigate it quite trivially.
This also makes generous use of a new type called an OptionalWatch which allows downstream data dependencies to wait for a resource to become available. All data dependencies are wrapped in an OptionalWatch, and all initialization is strictly synchronous.
ffa666e
to
ddedf28
Compare
// cleans up root watching task. | ||
let (exit_root_watch, root_watch_exit_signal) = oneshot::channel(); | ||
let watch_root_handle = tokio::task::spawn(watch_root( | ||
file_watching.clone(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it matters too much for this particular service, but shouldn't watch_root
subscribe to the OptionalWatch for filewatching like the other services? If not, we should at least leave a comment as to why this one is different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can only get a stream of events from the underlying FileSystemWatcher
using
turbo/crates/turborepo-filewatch/src/lib.rs
Lines 168 to 175 in 0f78ba6
/// A convenience method around the sender watcher that waits for file | |
/// watching to be ready and then returns a handle to the file stream. | |
pub async fn subscribe( | |
&self, | |
) -> Result<broadcast::Receiver<Result<Event, NotifyError>>, RecvError> { | |
let mut receiver = self.receiver.clone(); | |
receiver.get().await.map(|r| r.resubscribe()) | |
} |
which goes through the optional watch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open to passing the underlying OptionalWatch to the services rather than just passing in FileWatching directly to make the data dependencies more clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, let's merge this and continue on, once @NicholasLYang approves too.
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | [`20.11.24` -> `20.11.25`](https://renovatebot.com/diffs/npm/@types%2fnode/20.11.24/20.11.25) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.11.24/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.11.24/20.11.25?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | [`18.2.63` -> `18.2.64`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.63/18.2.64) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.2.63/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.2.63/18.2.64?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [chromatic](https://www.chromatic.com) ([source](https://togithub.com/chromaui/chromatic-cli)) | [`11.0.1` -> `11.0.4`](https://renovatebot.com/diffs/npm/chromatic/11.0.1/11.0.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/chromatic/11.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/chromatic/11.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/chromatic/11.0.1/11.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/chromatic/11.0.1/11.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [eslint-plugin-turbo](https://togithub.com/vercel/turbo) ([source](https://togithub.com/vercel/turbo/tree/HEAD/packages/eslint-plugin-turbo)) | [`1.12.4` -> `1.12.5`](https://renovatebot.com/diffs/npm/eslint-plugin-turbo/1.12.4/1.12.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-plugin-turbo/1.12.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-plugin-turbo/1.12.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-plugin-turbo/1.12.4/1.12.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-plugin-turbo/1.12.4/1.12.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [react-i18next](https://togithub.com/i18next/react-i18next) | [`14.0.5` -> `14.0.8`](https://renovatebot.com/diffs/npm/react-i18next/14.0.5/14.0.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-i18next/14.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-i18next/14.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-i18next/14.0.5/14.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-i18next/14.0.5/14.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [turbo](https://turbo.build/repo) ([source](https://togithub.com/vercel/turbo)) | [`1.12.4` -> `1.12.5`](https://renovatebot.com/diffs/npm/turbo/1.12.4/1.12.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/turbo/1.12.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/turbo/1.12.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/turbo/1.12.4/1.12.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/turbo/1.12.4/1.12.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [typescript](https://www.typescriptlang.org/) ([source](https://togithub.com/Microsoft/TypeScript)) | [`5.3.3` -> `5.4.2`](https://renovatebot.com/diffs/npm/typescript/5.3.3/5.4.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/typescript/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript/5.3.3/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript/5.3.3/5.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>chromaui/chromatic-cli (chromatic)</summary> ### [`v11.0.4`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v1104-Wed-Mar-06-2024) [Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v11.0.3...v11.0.4) ##### 🐛 Bug Fix - Do not prompt to install chromatic script during E2E builds [#​941](https://togithub.com/chromaui/chromatic-cli/pull/941) ([@​tevanoff](https://togithub.com/tevanoff)) ##### Authors: 1 - Todd Evanoff ([@​tevanoff](https://togithub.com/tevanoff)) *** ### [`v11.0.3`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v1103-Wed-Mar-06-2024) [Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v11.0.2...v11.0.3) ##### 🐛 Bug Fix - Display full error message when storybookBaseDir is invalid [#​932](https://togithub.com/chromaui/chromatic-cli/pull/932) ([@​andrewortwein](https://togithub.com/andrewortwein)) ##### Authors: 1 - Andrew Ortwein ([@​andrewortwein](https://togithub.com/andrewortwein)) *** ### [`v11.0.2`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v1102-Tue-Mar-05-2024) [Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v11.0.1...v11.0.2) ##### 🐛 Bug Fix - Fix support for boolean value to `junitReport` option [#​937](https://togithub.com/chromaui/chromatic-cli/pull/937) ([@​thafryer](https://togithub.com/thafryer)) ##### Authors: 1 - Jarel Fryer ([@​thafryer](https://togithub.com/thafryer)) *** </details> <details> <summary>vercel/turbo (eslint-plugin-turbo)</summary> ### [`v1.12.5`](https://togithub.com/vercel/turbo/releases/tag/v1.12.5): Turborepo v1.12.5 [Compare Source](https://togithub.com/vercel/turbo/compare/v1.12.4...v1.12.5) #### What's Changed ##### Docs - Name the file in Prisma doc. by [@​anthonyshew](https://togithub.com/anthonyshew) in [vercel/turbo#7426 - chore(docs): update github actions versions to support node 20 by [@​robinsmith-source](https://togithub.com/robinsmith-source) in [vercel/turbo#7434 - chore: update docs to no longer suggest verbosity for `--profile` by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7521 - Add version to package in internal packages docs for yarn by [@​loctn](https://togithub.com/loctn) in [vercel/turbo#7626 ##### create-turbo - release(turborepo): 1.12.4 by [@​github-actions](https://togithub.com/github-actions) in [vercel/turbo#7383 ##### [@​turbo/repository](https://togithub.com/turbo/repository) - chore(Turborepo): bump versions in prep for a release by [@​gsoltis](https://togithub.com/gsoltis) in [vercel/turbo#7385 - refactor(turborepo): Package Detection by [@​NicholasLYang](https://togithub.com/NicholasLYang) in [vercel/turbo#7549 - feat([@​turbo/repository](https://togithub.com/turbo/repository)): return dependencies in graph by [@​mehulkar](https://togithub.com/mehulkar) in [vercel/turbo#7616 - chore([@​turbo/repository](https://togithub.com/turbo/repository)): bump version to 0.0.1-canary.8 by [@​mehulkar](https://togithub.com/mehulkar) in [vercel/turbo#7636 ##### Examples - fix(examples): basic generator by [@​dangbt](https://togithub.com/dangbt) in [vercel/turbo#7400 - Remove barrel file from design-system-example by [@​anthonyshew](https://togithub.com/anthonyshew) in [vercel/turbo#7580 - Dependabot updates for examples. by [@​anthonyshew](https://togithub.com/anthonyshew) in [vercel/turbo#7615 - Bug fix on with-npm by [@​zsh77](https://togithub.com/zsh77) in [vercel/turbo#7587 - dev script of ui package in example with rollup by [@​zsh77](https://togithub.com/zsh77) in [vercel/turbo#7550 - Cleanup of with-vite example by [@​zsh77](https://togithub.com/zsh77) in [vercel/turbo#7585 - Cleanup of with-yarn example by [@​zsh77](https://togithub.com/zsh77) in [vercel/turbo#7589 - Guarantee typescript-eslint parser resolving. by [@​anthonyshew](https://togithub.com/anthonyshew) in [vercel/turbo#7634 ##### Changelog - perf: parse and walk globs in parallel by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7244 - fix: do better validation for existing tokens by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7358 - chore(ci): remove Makefile targets to build Go binaries by [@​mehulkar](https://togithub.com/mehulkar) in [vercel/turbo#7389 - add error enum to `turborepo-dirs` by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7277 - fix: Clippy errors by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7392 - docs: Refresh daemon documentation by [@​NicholasLYang](https://togithub.com/NicholasLYang) in [vercel/turbo#7386 - Break up Client trait by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7387 - chore(turbo): delete unused goreleaser configs by [@​mehulkar](https://togithub.com/mehulkar) in [vercel/turbo#7393 - Improve daemon startup times by [@​arlyon](https://togithub.com/arlyon) in [vercel/turbo#7322 - fix: reading output from orphan process by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7402 - Add optionalwatch cookie support by [@​arlyon](https://togithub.com/arlyon) in [vercel/turbo#7379 - chore: add force flag to login command by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7378 - Audit daemon error paths and ensure we are doing everything we can to handle by [@​arlyon](https://togithub.com/arlyon) in [vercel/turbo#7334 - chore: lower log level for noisy crates by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7439 - chore: Rename daemon code by [@​NicholasLYang](https://togithub.com/NicholasLYang) in [vercel/turbo#7440 - fix: support yarn4 semver resolutions by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7442 - fix: More robust token validation by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7407 - chore: Change daemon log location to be in repo by [@​NicholasLYang](https://togithub.com/NicholasLYang) in [vercel/turbo#7468 - chore: remove unnecessary result on join_unix_path by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7506 - chore: remove unused features from config crate by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7531 - feat: task table widget by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7470 - fix: Remove extra login popup for Vercel by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7469 - feat(turborepo): Convert even more errors by [@​NicholasLYang](https://togithub.com/NicholasLYang) in [vercel/turbo#7513 - fix: correctly call teams api by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7533 - chore: add read_existing_to_string by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7532 - feat: allow for faux comments at top level of turbo.json by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7546 - fix: Load vercel token into command base by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7545 - fix: support pnpm workspace path aliasing by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7512 - chore: remove unused import from dep_splitter by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7555 - fix: Respect globalDependencies when determining changed packages by [@​NicholasLYang](https://togithub.com/NicholasLYang) in [vercel/turbo#7557 - feat(Turborepo): Renaming, additional cookiewriter constructor by [@​gsoltis](https://togithub.com/gsoltis) in [vercel/turbo#7553 - fix: vercel auth file borks login by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7556 - fix: login success page redirect by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7558 - chore: move logout functionality into auth crate by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7443 - chore: Change to use borrowed path by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7569 - Handle logging story better on daemon by [@​arlyon](https://togithub.com/arlyon) in [vercel/turbo#7526 - fix: sso login duplicate popup by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7575 - chore(Turborepo): refactor telemetry to use turbopath by [@​gsoltis](https://togithub.com/gsoltis) in [vercel/turbo#7567 - chore(Turborepo): move test filesystem setup into test code by [@​gsoltis](https://togithub.com/gsoltis) in [vercel/turbo#7568 - chore(Turborepo): Switch tests to use filesystem, remove unused generics by [@​gsoltis](https://togithub.com/gsoltis) in [vercel/turbo#7610 - fix(cache): fix restoration issues of directories with very long paths by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7628 - chore: vendor vt100 crate by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7591 - fix(cache): restoration symlink by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7633 - fix: reject empty cache dir path by [@​chris-olszewski](https://togithub.com/chris-olszewski) in [vercel/turbo#7630 - fix: add more caching status tests by [@​Zertsov](https://togithub.com/Zertsov) in [vercel/turbo#7574 #### New Contributors - [@​dangbt](https://togithub.com/dangbt) made their first contribution in [vercel/turbo#7400 - [@​robinsmith-source](https://togithub.com/robinsmith-source) made their first contribution in [vercel/turbo#7434 - [@​nnmax](https://togithub.com/nnmax) made their first contribution in [vercel/turbo#6651 - [@​bgw](https://togithub.com/bgw) made their first contribution in [vercel/turbo#7206 - [@​loctn](https://togithub.com/loctn) made their first contribution in [vercel/turbo#7626 - [@​zsh77](https://togithub.com/zsh77) made their first contribution in [vercel/turbo#7587 **Full Changelog**: vercel/turbo@v1.12.4...v1.12.5 </details> <details> <summary>i18next/react-i18next (react-i18next)</summary> ### [`v14.0.8`](https://togithub.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1408) [Compare Source](https://togithub.com/i18next/react-i18next/compare/v14.0.7...v14.0.8) - fix: issue [1728](https://togithub.com/i18next/react-i18next/issues/1728) when useSuspense is false and default ns [1731](https://togithub.com/i18next/react-i18next/pull/1731) ### [`v14.0.7`](https://togithub.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1407) [Compare Source](https://togithub.com/i18next/react-i18next/compare/v14.0.6...v14.0.7) - try to get rid of internal interpolationOverride handling for Trans component, fixes [1729](https://togithub.com/i18next/react-i18next/issues/1729) ### [`v14.0.6`](https://togithub.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1406) [Compare Source](https://togithub.com/i18next/react-i18next/compare/v14.0.5...v14.0.6) - align context handling of Trans component with t function, fixes [1729](https://togithub.com/i18next/react-i18next/issues/1729) </details> <details> <summary>vercel/turbo (turbo)</summary> ### [`v1.12.5`](https://togithub.com/vercel/turbo/compare/v1.12.4...v1.12.5) [Compare Source](https://togithub.com/vercel/turbo/compare/v1.12.4...v1.12.5) </details> <details> <summary>Microsoft/TypeScript (typescript)</summary> ### [`v5.4.2`](https://togithub.com/microsoft/TypeScript/releases/tag/v5.4.2): TypeScript 5.4 [Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.2) For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/). For the complete list of fixed issues, check out the - [fixed issues query for Typescript 5.4.0 (Beta)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+). - [fixed issues query for Typescript 5.4.1 (RC)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+). - [fixed issues query for Typescript 5.4.2 (Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+). Downloads are available on: - [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday,before 4am on Thursday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/weareinreach/GLAAD). PR-URL: #356 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Description
This is a PR for speeding up the daemon startup and setting up good practices for differentiating between data and service dependencies. To clarify the difference, file watching service should start up immediately in an unavailable state, while things that need it can immediately take dependencies on its 'potentially-available' data. This also has a side-effect of fixing up our package discovery watcher as it makes the data flow a lot cleaner and ensures that the daemon can report data is unavailable when it is recalculating (using
FutureExt::now_or_never
) as well as cascading unavailable when parts of the system are no longer up to date. If a dependency wishes to wait for the data, then it can do so by simply awaiting the future. Great we've reimplemented async salsa by hand... though our data-dependency-graph will probably not really ever be so large that it outgrows this DIY solution.The part that specifically handles package discovery availability is demonstrated here:
turbo/crates/turborepo-filewatch/src/package_watcher.rs
Lines 589 to 593 in 048d5f5
Downstream dependencies who attempt a 'now or never' request on the data will receive an empty value, which translates to package discovery being unavailable
turbo/crates/turborepo-filewatch/src/package_watcher.rs
Lines 43 to 63 in 048d5f5
This mechanism also powers package hash discovery, which depends on multiple components all being active to produce accurate answers.
Testing Instructions
Existing tests should suffice
Closes TURBO-2296