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

build: use lerna run build instead of lerna exec #3080

Closed
wants to merge 1 commit into from
Closed

Conversation

georgexu99
Copy link
Contributor

@georgexu99 georgexu99 commented Nov 16, 2022

Using run build rather than exec allows us to leverage nx build caching

Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

Using run build rather than exec allows us to leverage nx build caching

It also makes the tsc compilation dramatically slower

@georgexu99
Copy link
Contributor Author

georgexu99 commented Nov 16, 2022

I ran some benchmarks, and it looks like the downside of not running tsc within root context slows the command down by ~3-5 seconds for the initial run.

I think because we don't run this command locally very often (though the local amortized build time is faster for n > 1 runs vs .what we have currently), if we enable nx distributed caching , the benefit we get from CI breezing through the build step could be worth an extra couple seconds for the first yarn build?

@georgexu99 georgexu99 requested review from MarshallOfSound and a team November 16, 2022 22:56
@erickzhao
Copy link
Member

from CI breezing through the build step

Do we have numbers of how this might happen? Is there a way to test this out without merging to main first?

@erikian
Copy link
Member

erikian commented Nov 18, 2022

from CI breezing through the build step

Isn't this a use case for CI caching (think https://github.com/actions/cache or https://docs.gitlab.com/ee/ci/caching/)? If incremental compilation is on and the built files are cached, future builds should be faster because only modified .ts files will be rebuilt.

@georgexu99 georgexu99 closed this Nov 23, 2022
@georgexu99
Copy link
Contributor Author

close in favor of #3090

which uses incremental builds + top level tsc

@georgexu99 georgexu99 deleted the gxu-build branch November 28, 2022 23:37
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.

4 participants