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

Throw precompilation error if dependency load failure during incremental precompilation #50232

Merged

Conversation

staticfloat
Copy link
Member

@staticfloat staticfloat commented Jun 20, 2023

In rare cases, if we fail to load a dependency during precompilation, we can fall-through to the "load locally" fallthrough in _require(). However, if this happens during incremental precompilation, this ends up emitting .ji files that have multiple modules embedded within, which can cause massive precompilation issues further down the chain, as dependencies which try to load our .ji file themselves get corrupted.

This catches the error at the source, refusing to generate such a .ji file in the first place.

…tal precompilation

In rare cases, if we fail to load a dependency during precompilation, we can fall-through to the "load locally" fallthrough in `_require()`.  However, if this happens during incremental precompilation, this ends up emitting `.ji` files that have multiple modules embedded within, which can cause massive precompilation issues further down the chain, as dependencies which try to load our `.ji` file themselves get corrupted.

This catches the error at the source, refusing to generate such a `.ji` file in the first place.
@staticfloat staticfloat requested a review from vtjnash June 20, 2023 17:06
@staticfloat staticfloat changed the title Throw precompilation error if dependency load failure during incremen… Throw precompilation error if dependency load failure during incremental precompilation Jun 20, 2023
@staticfloat staticfloat merged commit 4195a0e into master Jun 20, 2023
@staticfloat staticfloat deleted the sf/dont_precompile_multiple_modules_into_a_ji_file branch June 20, 2023 19:24
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vtjnash vtjnash added backport 1.9 Change should be backported to release-1.9 compiler:precompilation Precompilation of modules heisenbug This bug occurs unpredictably labels Jun 20, 2023
@KristofferC KristofferC mentioned this pull request Jun 26, 2023
36 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Jul 10, 2023
vtjnash added a commit that referenced this pull request Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules heisenbug This bug occurs unpredictably
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants