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 running browser tests that use deferred loading #2090

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

jakemac53
Copy link
Contributor

Fixes #2088

Pass --disable-program-split so that no splitting actually happens.

I first tried fixing this more "properly" by serving all the output files but this was a lot more complex and supporting stack trace mapping in particular was looking very challenging.

@jakemac53 jakemac53 merged commit 83ae0d9 into master Sep 7, 2023
34 checks passed
@jakemac53 jakemac53 deleted the deferred-loading-merge-files branch September 7, 2023 17:13
@gmpassos
Copy link
Contributor

gmpassos commented Sep 7, 2023

This needs to be documented somewhere:

When a test is compiled to JS, the parameter --disable-program-split is passed to dart2js, preventing it from splitting the program to avoid issues when serving the split parts in browser tests. Deferred libraries are the ones that require the compiler to split the program, and they shouldn't be affected by --disable-program-split.

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.

[ERROR] Deferred library load doesn't work inside browser tests
4 participants