feat(turbopack): Switch `turbo-tasks-memory/print_task_invalidation`…
feat(turbopack): Switch `turbo-tasks-memory/print_task_invalidation` compile-time feature to an environment variable (#72300) With this PR, `turbo-tasks-memory` (the new backend doesn't support this yet) can print invalidation information (basically just function names) to stdout when run with the following environment variable: ``` NEXT_TURBOPACK_PRINT_TASK_INVALIDATION=1 ```  This was previously behind a compilation feature flag, however: - We have to generate all the support code regardless of if the flag is set, so it doesn't seem like it would save us anything on binary size. - The branch should be pretty cheap to check (and probably easy for the CPU to predict), so runtime performance when this flag isn't set should be negligible. - It's a pretty big lift to ask users to try custom builds. **Why?** The hope is that this can help debug cases where users get stuck in a fast refresh update loop: https://vercel.slack.com/archives/C03S8ED1DKM/p1730737898652749 This is similar to #72300, except that prints the *reason*, this prints the *tasks* that were actually invalidated. Printing the tasks works even if no reason was supplied, so it can probably be helpful in debugging those cases. Closes PACK-3375
Showing
Please
register
or
sign in
to comment