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

Fix CommonJS symbol collection without scope hoisting #8555

Merged
merged 1 commit into from Oct 18, 2022

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Oct 18, 2022

This fixes an issue building the React Spectrum docs website with the latest version of parcel, which appears to have been introduced by #7991. We have a weird setup that disables scope hoisting in production builds for "server" bundles, but symbol propagation still runs. The linked PR changed some things regarding how dependencies are tracked, and the non-scope hoisting case didn't correctly handle non ESM. This led to an asset being omitted as unused. Unfortunately, I didn't manage to produce a smaller reproduction, but this code mirrors the logic in the scope hoisting case, and does fix the issue.

@parcel-benchmark
Copy link

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.39s +35.00ms
Cached 320.00ms -9.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

React HackerNews 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

AtlasKit Editor 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Three.js ✅

Timings

Description Time Difference
Cold 6.41s -6.00ms
Cached 287.00ms +15.00ms ⚠️

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@devongovett devongovett merged commit c1942c9 into v2 Oct 18, 2022
@devongovett devongovett deleted the fix-no-scope-hoist-symbols branch October 18, 2022 23:49
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.

None yet

3 participants