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

Makefile for starknet.go #598

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

PsychoPunkSage
Copy link
Contributor

Basic template is ready for Makefile
Closes #597

@PsychoPunkSage
Copy link
Contributor Author

@rianhughes
Please have a look at Makefile

Comment on lines +12 to +13

simple-call:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should run examples in the make file

Copy link
Contributor Author

@PsychoPunkSage PsychoPunkSage Jul 18, 2024

Choose a reason for hiding this comment

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

I think It would be a good option to have it.
I have made sure that if the developer haven't set the environment correctly, then the correct procedure to run the examples will be printed in the terminal
like this::>
image

Makefile Show resolved Hide resolved
@PsychoPunkSage PsychoPunkSage marked this pull request as draft July 18, 2024 17:50
@PsychoPunkSage PsychoPunkSage marked this pull request as ready for review July 23, 2024 18:38
@PsychoPunkSage
Copy link
Contributor Author

Hi @rianhughes
I tried to implement golangci-lint.yml file
I am facing few problems
make lint gives me this error

golangci-lint not installed. Run 'make install-golangci-lint' to install it.
make: *** [Makefile:26: lint] Error 1

Even though I have installed golangci-lint properly.
I found a way to solve it

ls $(go env GOPATH)/bin

Gives me list of go env paths which includes golangci-lint

So, on doing this.

export PATH=$PATH:$(go env GOPATH)/bin

make lint work and gives me desired results...
So I'm kind of lost here... as I cannot do this in makefile.

@rianhughes
Copy link
Contributor

Hi @rianhughes I tried to implement golangci-lint.yml file I am facing few problems make lint gives me this error

golangci-lint not installed. Run 'make install-golangci-lint' to install it.
make: *** [Makefile:26: lint] Error 1

Even though I have installed golangci-lint properly. I found a way to solve it

ls $(go env GOPATH)/bin

Gives me list of go env paths which includes golangci-lint

So, on doing this.

export PATH=$PATH:$(go env GOPATH)/bin

make lint work and gives me desired results... So I'm kind of lost here... as I cannot do this in makefile.

Maybe including the following in the Makefile would help?

GOPATH := $(shell go env GOPATH)
GOBIN := $(GOPATH)/bin

install-golangci-lint:
@export PATH=$(GOBIN):$$PATH &&
go install github.com/golangci/golangci-lint/cmd/[email protected]

@PsychoPunkSage
Copy link
Contributor Author

Hi @rianhughes
Its not working for me...
I have to manually run export PATH=$PATH:$(go env GOPATH)/bin in terminal to make it (make lint) work. Cause makefile is unable to add GOBIN to PATH
Can you please see whether its the same in your end or not??

@PsychoPunkSage
Copy link
Contributor Author

Hi @rianhughes
Did you find time to review this PR??

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.

need of Makefile
2 participants