-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 a lock to ensure atomic invalidation from file changes #5461
Conversation
Co-authored-by: Alex Kirszenberg <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
10 Ignored Deployments
|
✅ This change can build |
|
Linux Benchmark for 2b0ed98Click to view benchmark
|
MacOS Benchmark for 2b0ed98
Click to view full benchmark
|
/// watcher invalidation and a read lock during other operations. | ||
#[turbo_tasks(debug_ignore, trace_ignore)] | ||
#[serde(skip)] | ||
invalidation_lock: Arc<RwLock<()>>, |
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.
It feels wrong that this should be a lock on ()
. Can we use the type system to ensure we can't do this wrong instead? e.g. by having this lock condition access to the other locks?
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 you're suggesting that we have RwLock<InvalidatorMap>
? Which I was going to suggest, too.
Co-authored-by: Alex Kirszenberg <[email protected]>
Linux Benchmark for 4b74b2aClick to view benchmark
|
MacOS Benchmark for 4b74b2a
Click to view full benchmark
|
Depends on vercel/turborepo#5398 (and downstack) on the Turbo side. This PR makes it so the output path of Node.js entry chunks for pages is determined solely from the pathname. This isn't actually necessary for pages, but it makes for easier debugging anyway. See the Turbo PR for more details. This also changes the page structure so it also works if there is no `pages` directory. In this case, we still want to use pages' default _app, _document, and _error pages, even with existing app routes. So an empty page structure should still have an effect. ## Turbopack updates * vercel/turborepo#5415 <!-- Will Binns-Smith - Turbopack: Execution tests in node.js --> * vercel/turborepo#5461 <!-- Tobias Koppers - use a lock to ensure atomic invalidation from file changes --> * vercel/turborepo#5398 <!-- Alex Kirszenberg - Configure the path of the Node.js entry chunk --> * vercel/turborepo#5469 <!-- Tobias Koppers - allow hmr tests to correctly detect hmr event -->
…rborepo#5461) ### Description fixes "app_dir must be a directory" error --------- Co-authored-by: Alex Kirszenberg <[email protected]>
…rborepo#5461) ### Description fixes "app_dir must be a directory" error --------- Co-authored-by: Alex Kirszenberg <[email protected]>
…rborepo#5461) ### Description fixes "app_dir must be a directory" error --------- Co-authored-by: Alex Kirszenberg <[email protected]>
Description
fixes "app_dir must be a directory" error