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

Update the build command for OLC #122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

marekweb
Copy link

@marekweb marekweb commented Jul 10, 2024

Summary

The build command in install_our_lovely_cli() is not quite right because:

  • OLC has a Makefile that includes other additional build steps in addition to installing node modules dependencies.
  • OLC uses yarn so doing npm install causes a warning about a package-lock.json created by a different package manager when doing subsequent runs of yarn

This change updates it to run make all.

Test plan

  • Run script

@marekweb marekweb requested review from csilvers, a team and lillialexis July 10, 2024 20:05
Copy link
Member

@csilvers csilvers left a comment

Choose a reason for hiding this comment

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

I like that; OLC should be responsible for its own installatio

setup.sh Outdated
@@ -317,7 +317,7 @@ install_hooks() {

install_our_lovely_cli() {
cd "$DEVTOOLS_DIR/our-lovely-cli"
npm install
make
Copy link
Member

Choose a reason for hiding this comment

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

On second thought, we should have an explicit make target here, rather than just depending on the first one being the one to install. I'm not even sure what it should be, looking at the (confusing) Makefile. make yarn? make all? You may want to ask in #github-prs.

Copy link
Member

Choose a reason for hiding this comment

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

@csilvers we're having problems with our Makefile, and it's been on my list to reach out to you to chat w you (when you have time), as everyone says you're the "make expert" here. I wonder if we should solve that first, since the solution could be to just get rid of the Makefile altogether...

Copy link
Member

Choose a reason for hiding this comment

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

@lillialexis am happy to chat with you! My calendar is accurate if you want to find time tomorrow.

Copy link
Member

Choose a reason for hiding this comment

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

@marekweb please use make all

Copy link
Member

Choose a reason for hiding this comment

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

oh, wait, maybe make all doesn't do yarn build, but I'll fix that in OLC momentarily...

Copy link
Author

Choose a reason for hiding this comment

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

Alright, I updated it to make all assuming that will be the final command.

@marekweb marekweb requested a review from csilvers July 23, 2024 16:51
Copy link
Member

@csilvers csilvers left a comment

Choose a reason for hiding this comment

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

Yay, thank you!

Comment on lines 319 to +320
cd "$DEVTOOLS_DIR/our-lovely-cli"
npm install
make all
Copy link
Member

Choose a reason for hiding this comment

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

Now that you're using make, a better alternative is to just do:

make -C "$DEVTOOLS_DIR/our-lovely-cli" all

Then we don't have to do the cd, which is always nice to avoid in shell scripts.

Copy link
Member

@lillialexis lillialexis left a comment

Choose a reason for hiding this comment

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

Ok, hold up, because now John is pushing back on the make all in the OLC Makefile... so sorry that this has been such a headache to coordinate! https://github.com/Khan/our-lovely-cli/pull/743

Copy link
Member

@lillialexis lillialexis left a comment

Choose a reason for hiding this comment

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

Ok, I just merged my new command in with make all

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.

3 participants