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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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

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