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

Console compiler: exit with error status for serious warnings #1439

Merged
merged 4 commits into from
Sep 19, 2022

Conversation

cgay
Copy link
Member

@cgay cgay commented Aug 8, 2022

Console compiler: exit with error status for serious warnings

Issue #1373

@housel
Copy link
Member

housel commented Aug 9, 2022

Why not add a command-line option to suppress this new exit status behavior, which could then be used when building libraries that deliberately induce serious warnings (such as the common-dylan-test-suite)?

@cgay
Copy link
Member Author

cgay commented Aug 9, 2022

I was planning to add that flag in a later commit (please comment on the bug if you have preferences for what it should look like).

I would like to be able to detect new serious warnings in the test suite and Open Dylan code, which is why I prefer to comment out those two tests. I could make the exit code be the total number of serious warnings (maxing out at 127, I guess, if that's a shell limitation...127 should be enough serious warnings for anyone) and then callers who expect non-zero could compare with that?

Some could be removed by fooling the compiler. Commented out a couple for
now. Perhaps we can reinstate test-ignorable and test-ignore when/if we have a
way to disable compiler warnings for a swath of code.
Non-serious warnings do not cause an error exit status. We can enable that
behavior later with a flag if desired.

Issue dylan-lang#1373
@cgay cgay force-pushed the exit-status branch 2 times, most recently from 1921d8d to 761cffa Compare September 18, 2022 16:48
This flag is added to the main command (i.e., the dylan-compiler and
dylan-environment commands) but not to the interactive "build" command, since
it serves no purpose in the interactive environment.

The default value of this flag is off, which is an incompatible change.
Don't use -1 since that is turned into 255 on unix systems. Small non-negative
integers should work on all platforms.

0 = success
1 = unexpected error
2 = usage error
3 = serious warnings (controlled by flag)
@cgay cgay merged commit cdb7593 into dylan-lang:master Sep 19, 2022
@cgay cgay deleted the exit-status branch March 22, 2024 04:54
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