Add support for bundling function declarations#4044
Merged
thomashoneyman merged 5 commits intopurescript:masterfrom Jul 20, 2021
Merged
Conversation
f-f
approved these changes
Jun 28, 2021
rhendric
approved these changes
Jun 28, 2021
Member
|
This PR spans releases, so it'll need a rebase and the changelog entry will need to be moved to the current Unreleased section. |
563cf40 to
f928184
Compare
Contributor
|
Is the changelog entry the only thing preventing merging here now? |
…undling-function-declarations
Member
Author
|
No more! |
2a257e2 to
9b35823
Compare
hdgarrood
approved these changes
Jul 20, 2021
Contributor
|
Just FYI. This seems to have introduced a regression. See purescript-contrib/purescript-arraybuffer/issues/34. Should I open a new issue? Or is there one already? |
Closed
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
purs bundledoes not consider the dependencies of function declarations because the compiler always emit variable declarations. This has unfortunate consequences when optimizing foreign modules:If the dependency of
fooonxisn’t discovered,xappears unused and is removed from the bundle!Fix #4039, fix #3259 and fix #2290.
Checklist: