-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
tail
: Refactor handling of warnings and early exits
#4135
tail
: Refactor handling of warnings and early exits
#4135
Conversation
c14247c
to
bb48e63
Compare
GNU testsuite comparison:
|
1 similar comment
GNU testsuite comparison:
|
Sorry, that the tests for the warnings aren't integrated right now. But, I've ran the tests against the last 3 commits locally, so these changes are most probably working. We'll see this hopefully soon also in in the ci. |
GNU testsuite comparison:
|
4d69b80
to
fc0cf03
Compare
GNU testsuite comparison:
|
GNU testsuite comparison:
|
084037f
to
e7b6568
Compare
GNU testsuite comparison:
|
I've added all additional tests written during the refactoring of tail. These include the tests for the warnings. A lot of these additional tests (besides the warnings tests) are currently (partly) disabled and only show the bugs and wrong behavior if enabled. I could fix many of them on the way of #3952 and they are therefore enabled there. |
…to reflect current development state.
e7b6568
to
2cedc72
Compare
…to reflect current development state.
GNU testsuite comparison:
|
6156597
to
8958e82
Compare
tail
: Refactor handling of warnings and early exits
@tertsdiepraam ping :) i think this pr would be ready for a final review. |
fcd92a9
to
b4bc6ad
Compare
Are we ready, here? |
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.
Code looks good, I just have some questions about the TODO's
…InputService ... Other changes summary: * Cleanup imports * Remove stdin_is_pipe_of_fifo function * Rename WatcherService to Observer
…d support set to 0 in Observer.
…from tip of refactoring branch Other changes summmary: * Use module level imports instead of fully qualified imports where appropriate * Fix intermittent failing test_positive_zero_bytes because of broken pipe * Cleanup old disabled test for warning of following indefinitely
b4bc6ad
to
b339f6d
Compare
GNU testsuite comparison:
|
Very nice! |
…to reflect current development state.
…to reflect current development state.
…to reflect current development state.
Refactor
This pr also adds the missing warning because of
--follow
being ineffective under some special circumstances.The warnings and early exits are organized in dedidacted methods within the
Settings
struct providing:args::Settings::from
has no side effects anymore and the methods sole purpose is parsing and storing the initial configuration provided by the usertail
tail
This pr also adds more tests which originate from the main refactoring pr #3952. A lot of these tests (besides the ones testing the
warning
functionality) show some broken functionality oftail
or a bug and are therefore (partly)disabled_until_fixed
, here. However, many of them were fixed on the way of #3952 and are enabled there.There's also some additional code cleanup:
InputService
and move some of its functionality intoSettings
stdin_is_pipe_of_fifo
function