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

Refactoring makefile. #692

Merged
merged 3 commits into from
Jul 25, 2024
Merged

Refactoring makefile. #692

merged 3 commits into from
Jul 25, 2024

Conversation

arhamchordia
Copy link
Collaborator

1. Overview

Restructuring makefile to keep make commands more readable and easy to execute.

2. Implementation details

Adding different makefiles in scripts/makefiles
Separating them into :

  1. build.mk
  2. docker.mk
  3. and so on....

3. How to test/use

Run commands one by one to test them.

@arhamchordia arhamchordia marked this pull request as ready for review July 22, 2024 18:56
@arhamchordia arhamchordia requested review from akure and ajansari95 July 22, 2024 18:57
Copy link
Contributor

@magiodev magiodev left a comment

Choose a reason for hiding this comment

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

Refactor looks good. I see lot of redundancy over commands, should we try to reduce the amount of repeated or similar ones?

proto: proto-help
proto-all: proto-gen

# todo : @AJ needs to address this after removing third_party. Refer this for removal https://github.com/osmosis-labs/osmosis/blob/188abfcd15544ca07d468c0dc0169876ffde6079/scripts/makefiles/proto.mk#L39
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this TODO for now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not for now. To be addressed by @ajansari95 in his cleanup PR

@sh ./scripts/protocgen.sh

# todo : @AK need the reason why it was there earlier
proto-gen-1:
Copy link
Contributor

@akure akure Jul 23, 2024

Choose a reason for hiding this comment

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

This is SDK 47 way of doing using ghcr.io/cosmos/proto-builder docker.

And ./scripts/protocgen.sh is using, buf generate --template "${project_dir}/proto/buf.gen.gogo.yaml" $file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure. So we can get rid of it now?

Copy link
Contributor

@akure akure left a comment

Choose a reason for hiding this comment

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

The structure is good. Is there any way to test all the Makefile commands in one go in local. Like a command that will build, test and try maximum possibilities. Not necessarily to be part of this PR.

@arhamchordia
Copy link
Collaborator Author

The structure is good. Is there any way to test all the Makefile commands in one go in local. Like a command that will build, test and try maximum possibilities. Not necessarily to be part of this PR.

Yes. We can make a general command in makefile that includes all of them together. Something like make execute-all which in turn executes everything.

@arhamchordia
Copy link
Collaborator Author

Refactor looks good. I see lot of redundancy over commands, should we try to reduce the amount of repeated or similar ones?

I see only distroless build as the redundant one. Any others that you could find?

@arhamchordia arhamchordia requested review from akure and magiodev July 23, 2024 10:00
Copy link
Contributor

@akure akure left a comment

Choose a reason for hiding this comment

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

lg

@arhamchordia arhamchordia merged commit 02ea371 into v3.x Jul 25, 2024
2 checks passed
@arhamchordia arhamchordia deleted the fix/Makefile branch July 25, 2024 10:41
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