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 generated is wrong #156

Closed
3 tasks done
suntong opened this issue Aug 17, 2023 · 2 comments
Closed
3 tasks done

Makefile generated is wrong #156

suntong opened this issue Aug 17, 2023 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@suntong
Copy link

suntong commented Aug 17, 2023

Required check list:

  • I didn't find in the repository's issues section a similar bug.
  • I understand, this is an Open Source and not-for-profit product.
  • This is not about a third-party project, framework, or technology.

My environment:

  • OS (uname -a): Linux 5.15.0-70-generic # 77-Ubuntu SMP x86_64
  • Go (go version): go version go1.20.3 linux/amd64

Describe the bug:
A clear and concise description of what the bug is.

The depency rule of the generated Makefile is wrong:

test:
        @if [ -d "$(FRONTEND_PATH)" ]; then cd $(FRONTEND_PATH) && npm run test; fi
        @if [ -d "$(BACKEND_PATH)" ]; then cd $(BACKEND_PATH) && go test ./...; fi

run: test
        @if [ -d "$(FRONTEND_PATH)" ]; then cd $(FRONTEND_PATH) && npm run dev; fi
        @if [ -d "$(BACKEND_PATH)" ]; then cd $(BACKEND_PATH) && $(MAKE) run; fi

build: test
...

Expected behavior:
A clear and concise description of what you expected to happen.

See for e.g. https://github.com/suntong/go-app-demos/blob/master/0A1-hello/makefile

run: build

This means run depends on build, whereas the generated Makefile means run depends on test, which is reversed.

@suntong suntong added bug Something isn't working help wanted Extra attention is needed labels Aug 17, 2023
@suntong suntong closed this as completed Aug 17, 2023
@suntong
Copy link
Author

suntong commented Aug 17, 2023

Hmm... Having closed it, I think I was still correct as both npm run test and go test are normally done after build and run.

@suntong suntong reopened this Aug 17, 2023
@koddr
Copy link
Member

koddr commented Aug 18, 2023

Hi,

I don't really understand what problem you are having with the Makefile? There are quite minimalistic instructions there for testing and starting backend and frontend.

Yes, it is shipped "AS IS". But you can change them as you see fit, there are no restrictions here.

If you think something is wrong, you can send a PR showing how you'd like it to be right.

@suntong suntong closed this as completed Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants