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 unused symbols for dependencies without symbols #296

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

JakeLane
Copy link
Contributor

@JakeLane JakeLane commented Dec 24, 2024

Motivation

From the issue found by @alshdavid. simple fix to avoid errors and deoptimise if the bundle doesn't support symbols.

Changes

When a dependency doesn't have symbols, don't error but just deoptimise instead.

Checklist

  • Existing or new tests cover this change

let symbols = nullthrows(this.bundleGraph.getUsedSymbols(d));
let symbols = this.bundleGraph.getUsedSymbols(d);

// No used symbols avaiable for the asset, make sure we keep all of them
Copy link
Contributor

Choose a reason for hiding this comment

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

available

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My spell checker stopped working and I'm instantly pushing typos 😅

@JakeLane JakeLane force-pushed the fix-used-symbols-check-scope-hoisting branch from bae4b67 to cc79d5e Compare January 16, 2025 00:04
@JakeLane JakeLane marked this pull request as ready for review January 16, 2025 00:08
@JakeLane JakeLane merged commit c17d17f into main Jan 17, 2025
17 checks passed
@JakeLane JakeLane deleted the fix-used-symbols-check-scope-hoisting branch January 17, 2025 05:57
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.

3 participants