Makefile generated is wrong
suntong opened this issue · comments
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.
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.
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.