bflattened / bflat

C# as you know it but with Go-inspired tooling (small, selfcontained, and native executables)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler exits with status code 0 even there are errors. Confusing automated platform as a result

astro-angelfish opened this issue · comments

Bflat exits with status code 0 when grammar error occurs while gcc exits with 1. I get used to gcc so when I write an automated tool, and did only check the status code. The compilation failed and failed to generate a executable, causing further problem that hard to diagnose.

What I expect is that bflat would exit with an error code (anything except 0) that means its action has failed and should not move on.

I'm afraid that there might be some other people that could be confused with similar problem when creating their own tools or wrappers with bflat. If exiting with 0 is really intended and should not be changed, I think we might need to mention that the user end should have to check the output of the program or executable for the compilation result.

Do you have a short example I could use to reproduce it? Or at least the text bflat writes to stdout/stderr when exiting with 0 for failure? I see it exiting with code 1 on failure.

Do you have a short example I could use to reproduce it? Or at least the text bflat writes to stdout/stderr when exiting with 0 for failure? I see it exiting with code 1 on failure.

I've made some research and found I failed to recognize API from Microsoft. And I had mistakenly thought that it was issue on bflat's side. Sorry for confusing or disturbing.