-
Couldn't load subscription status.
- Fork 1.1k
Option warnings are conditional #13915
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
base: main
Are you sure you want to change the base?
Conversation
|
Did not yet investigate how to set up an automated test. |
|
Are all the configuration messages about such trivial matters like setting the flag twice? If so, then I agree this is the right change. But if there are any that are more concerning, then I think it would be wrong to hide them away by default. |
|
For instance, setting the output flag twice is by-default warning worthy imo. If I set |
|
Yes, my first thought was to distinguish In Scala 2, there was discussion around "last setting wins" semantics. But really a warning is warranted, especially because the context is not a command line in a script, where you might want to just make a best effort, but possibly multiple plugins adding options. |
56cfaad to
98845ef
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.
LGTM. Ready for this to be merged, @som-snytt?
|
Overall, I thought A few observations, it warns on but not The flag warning sounds flippant. On It does not warn on |
740fc6e to
e2a9823
Compare
|
Rebased and added warning on multiple outputs. Also implicit |
|
e2a9823 to
34cb904
Compare
|
Rebased hoping to duck spurious test failures. |
34cb904 to
700d6f8
Compare
|
Accidentally used jdk 11 |
|
Rebased hoping never to have to rebase again. Conflict in settings, of course. Now that I know about There is a separate effort for tests to respect I saw in the settings conflict that |
|
Also, may you live in interesting times. and come to know interesting people. |
|
It looks like this is ready but waiting on a final look by @dwijnand ? I've assigned him and given @som-snytt write privileges in this repo so he can assign people himself. |
|
Apologies in advance, Dale. I see a few style nits, so I will take a quick pass over it. I already checked my white privilege. Oh, it says "write" privilege. |
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.
LGTM, except the option name...
|
Is this PR close to being merged? It contains a fix for interpreting boolean settings with explicit values e.g. |
|
Rebased. There are a couple of technical issues with turning I'll attempt to follow up, before As a footnote, to bang the drum, it would have been happier to share code and develop uninteresting infra only once. |
|
Rebase on the refactor of settings, to which this is a follow-up. Still to address "uniformity". The other footnote is that unconsumed args are collected by The "ignore" bit is of course dubious. This PR no longer introduces a flag for warning, analogous to (It might be an improvement if The heuristic for the ticket is only to warn for conflicting settings: |
3251e43 to
08ebda0
Compare
|
The "extra" layer of arg processing in was reordered to That was a test of missing arg. Still need to consider if "empty" args are handled correctly. There is something about choices can't be empty; but a string setting can take an empty string. The important use case is The tooling interface in |
|
Considered warning for The purpose of warning "set redundantly" was to show that different parts of a build are contributing the same option; but that is probably benign; and other tools can be used for "optimizing" or "cleaning up" a build configuration. Possibly those tools are specific to the build tool. For single-valued options, it's helpful to warn if the value changes (with respect to equals). The property |
0b0c1bb to
2464a4d
Compare
|
I joked privately that "warn redundantly" didn't even have a test, but actually the test was in |
077c6b7 to
e80dc5c
Compare
|
That is a lot of ink spilt over [checks notes] not warning if they set an option twice. I'll try to simplify the PR. Edit: I wasn't sure that to error if your options are not pristine. There is no It no longer warns for options that are supplied "repeatedly" with the same value, but it warns if the value changes, except that lists of values are simply collected. It is more precise about |
e80dc5c to
390e25c
Compare
390e25c to
27cdc6d
Compare
27cdc6d to
76f6d86
Compare
|
@KacperFKorban Maybe you have time to review the refactor of Settings that improves the remaining arguments in the setting state when erroring. There were a couple of fixes in August when I rebased (tweak arg handling in The original feature was to add a |
Fixes #13887