-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Consistent behavior with missing or incorrect arguments #1179
Conversation
What good is It may be worth aligning its behaviour with the other three, and mentioning "use |
I didn't want to accidentally break someone's workflow who's using |
Well, it's unlikely enough, we've had several reports of people being confused by RGBFIX's behaviour (appearing to hang), and we're not WG14, so I think it's worth breaking. We'll have to add a note in the changelog to highlight the breakage as intentional for future reference, I guess. |
A couple years ago, I wrote a compression tool in C to avoid a Python dependency in a replacement boot ROM. I checked whether
I had to do a bit of |
Just break this; the fix is easy. But please do mention it, so people know how to fix this. |
Done: |
Of course, the |
d861491
to
bb2dbbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the rationale for making all of the "print usage" functions "noreturn"? It feels like it's obscuring the control flow IMO.
Some of them already called |
I'd say this is pretty standard, because if you're printing usage information, you're not doing anything else. I've never seen a program print usage information and not exit right after. |
It would make sense to print an extra line afterwards, for example. I'd rather have the flow control be explicit in the caller. |
Okay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! The UX should improve that much overall. Thank you!
Fixes #1131
Fixes #1132
rgbasm
,rgblink
,rgbgfx
, orrgbfix
with an incorrect argument (e.g.--foobar
) will give an "unrecognized option" error, show the usage information, and exit.rgbasm
,rgblink
,rgbgfx
, orrgbfix
without any arguments will give a fatal error, show the usage information, and exit.Previously, running
rgbfix
without any arguments would default to processing-
(stdin). Now you need to explicitly pass-
.