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

Fix issue that twice poac build will be succeeded even if code is corrupted #1051

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wx257osn2
Copy link
Contributor

@wx257osn2 wx257osn2 commented Dec 22, 2024

Current poac skip entire build job if Makefile is up to date.
So, when we do poac build twice, second try must returns succeeded despite doing nothing.

$ poac new test
   Created binary (application) `
$ cd test/
$ echo "" > src/main.cc
$ poac build
 Compiling test v0.1.0 (/path/to/test)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:21: /path/to/test/poac-out/debug/test] Error 1
Error: 'poac build' failed with exit code `2`
$ poac build
  Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s

This PR fixes this, and poac build will fail properly no matter how many times it's called.

@ken-matsui
Copy link
Member

Would you mean the commands shown in your description are "what we should've seen", not "what we've seen"?

@wx257osn2
Copy link
Contributor Author

wx257osn2 commented Dec 23, 2024

Sorry for the lack of clarity in the description. Above code snipet is "What we've seen" (current poac behavior). This PR fixes it, so "what we should've seen" (poac behavior after merged this) will be build failure no matter how many times we try.

I've edited the PR description.

@wx257osn2 wx257osn2 changed the title Fix issue that build will be succeeded even if code is corrupted with poac build twice Fix issue that twice poac build will be succeeded even if code is corrupted Dec 23, 2024
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.

2 participants