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

Incremental Scala.js Linking #2928

Merged
merged 6 commits into from
May 23, 2024

Conversation

lolgab
Copy link
Contributor

@lolgab lolgab commented May 22, 2024

Motivation

Scala.js has a powerful incremental linker which makes linking very fast for multiple links in a row.
The current way to linking, which spawns a new process every time scala-cli links, doesn't use its capability.

Changes

This changes scala-cli to launch a scala-js-cli process with the newly added --longRunning mode.
Then it tries to reuse it, if input did not change, otherwise it kills the process and starts a new one.
fullOpt doesn't use the --longRunning mode since it doesn't need to be done incrementally and so we can maintain the incremental compilation cache.

Dependencies

Comparison

Before

before.mov

After

after.mov

@Gedochao
Copy link
Contributor

https://github.com/VirtusLab/scala-js-cli/releases/tag/v1.16.0.1
just released scala-js-cli

@Gedochao Gedochao self-requested a review May 22, 2024 13:35
@lolgab lolgab marked this pull request as ready for review May 22, 2024 13:38
@Gedochao
Copy link
Contributor

Should rebase after #2929 gets merged.

Copy link
Contributor

@Gedochao Gedochao left a comment

Choose a reason for hiding this comment

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

LGTM

@Gedochao Gedochao merged commit 0b7b6d7 into VirtusLab:main May 23, 2024
75 checks passed
@lolgab lolgab deleted the incremental-scala-js-linking branch May 23, 2024 12:33
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.

2 participants