-
Notifications
You must be signed in to change notification settings - Fork 891
chore: Run 'yarn install' when building #215
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
Conversation
@@ -74,6 +74,7 @@ provisionersdk/proto: provisionersdk/proto/provisioner.proto | |||
.PHONY: provisionersdk/proto | |||
|
|||
site/out: | |||
cd site && yarn install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how long does the install take? seems like it'd slow down builds if we re-install every time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's already been installed (ie, already have a node_modules
) - less than a second to validate dependencies:
yarn install v1.22.17
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.78s.
I think that 0.78s
trade-off is worth it to make sure that the first-build always works for people on-boarding to the project (esp in the open-core world) - but let me know if you disagree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that seems alright. I'd like to try switching to Yarn 3 and using the CJS resolution thing to see if it's faster, but that should be done separately
Codecov Report
@@ Coverage Diff @@
## main #215 +/- ##
==========================================
- Coverage 68.31% 68.16% -0.15%
==========================================
Files 111 111
Lines 6003 6003
Branches 67 67
==========================================
- Hits 4101 4092 -9
- Misses 1512 1520 +8
- Partials 390 391 +1
Continue to review full report at Codecov.
|
Thanks for the review @jawnsy ! |
I noticed when showing the development flow to a few engineers, there was one awkward step - you have to
cd site
and runyarn install
, and then come back to root tomake build
or./develop.sh
This just adds
yarn install
as part ofmake build
and./develop.sh
- so whichever one is run first will start work.