-
Notifications
You must be signed in to change notification settings - Fork 208
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
Configurable warnings #2319
Configurable warnings #2319
Conversation
Give all warnings a name and allow enabling or disabling specific warnings at the command line. A good next step code-wise would be to make the WarnSet type synonym into its own class that encapsulates more warning-related functionality. Next steps feature-wise are: - Turning specific/all warnings into errors (and demoting specific warnings from errors back into warnings). - Discoverability of warning flags (optimally via the CLI). - Allow warnings to default to "off". - Document flag behavior; currently "no" trumps "yes". - Make the .suppress-warnings pragma take the name of a specific warning to suppress. Here's a simple program that can be used to test these changes: // No rules/facts warning .decl a(X: number) .output a(IO=stdout) // Dollar sign warning .decl d(X: number) d($) :- a(0).
Next step: Revert changes to test files in the previous commit, since the default constructor has the desired behavior of enabling all warnings.
The default constructor now encodes the desired behavior, namely, enabling all warnings by default.
How about returning |
Might be this bug, fixed in gcc 11 but the CI is using gcc 9.4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 |
Avoids erroneous compiler warning about an unused variable.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2319 +/- ##
==========================================
- Coverage 77.39% 77.32% -0.08%
==========================================
Files 461 469 +8
Lines 29004 29245 +241
==========================================
+ Hits 22448 22614 +166
- Misses 6556 6631 +75
|
There is still one tiny issue outstanding w.r.t. the formatting of the source code. Please, can you either apply this diff, https://github.com/souffle-lang/souffle/actions/runs/3256815864/jobs/5347660548 or run the clang-format tool. |
87ecb63
to
9f37121
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.
Thanks for the contribution!
First steps towards #1597: Give all warnings a name and allow enabling or disabling specific warnings at the command line.
Next steps feature-wise are:
.suppress-warning
pragma, like.suppress-warnings
except that it takes the name of a specific warning to suppress, and optimally can be specified multiple times (for different relations).Here's a simple program that can be used to test these changes:
I'm seeing this error in CI which I don't understand:
Obviously, there's no variable named
<anonymous>
, and it looks like a valid use of thestd::optional
constructor to me...