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

1.0.1 fails to build on macosx-10.9-x86_64-3.8 due to kFSEventStreamEventFlagItemCloned #732

Closed
shipmints opened this issue Dec 13, 2020 · 7 comments · Fixed by #733
Closed

Comments

@shipmints
Copy link

kFSEventStreamEventFlagItemCloned was added in macOS 10.13. Builds for older OS releases should wrap unsupported symbols for backward compatibility even at the loss of minor functionality.

    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/xxx/anaconda3/include -arch x86_64 -I/Users/xxx/anaconda3/include -arch x86_64 -DWATCHDOG_VERSION_STRING="1.0.1" -DWATCHDOG_VERSION_MAJOR=1 -DWATCHDOG_VERSION_MINOR=0 -DWATCHDOG_VERSION_BUILD=1 -I/Users/xxx/proj/macrotomic/play/venv/include -I/Users/xxx/anaconda/include/python3.8 -c src/watchdog_fsevents.c -o build/temp.macosx-10.9-x86_64-3.8/src/watchdog_fsevents.o -std=c99 -pedantic -Wall -Wextra -fPIC -Wno-nullability-completeness -Wno-nullability-extension -Wno-newline-eof -Wno-error=unused-command-line-argument
    src/watchdog_fsevents.c:160:25: error: use of undeclared identifier 'kFSEventStreamEventFlagItemCloned'
    FLAG_PROPERTY(IsCloned, kFSEventStreamEventFlagItemCloned)
                            ^
    src/watchdog_fsevents.c:272:63: warning: unused parameter 'event_ids' [-Wunused-parameter]
                                   const FSEventStreamEventId     event_ids[])
@shipmints
Copy link
Author

Seems it was this commit and the 1.0.1 release not back tested?

614ccfc

@CCP-Aporia
Copy link
Contributor

Thanks for the report, I'll add safe guards for this case though I won't be able to test them since I only have access to Big Sur machines.
Please also note that Apple no longer supports macOS 10.12 or earlier, so breakage may eventually occur.

@shipmints
Copy link
Author

Thanks for that. 10.12 is the most stable release of them all at this stage and we're reluctant to adopt newer OS just because they're new. New hardware, sadly, often mandates a new OS so there is a bit of a mix. That said, stability is more important than new features so we stick with 10.12 where we can. Apple's track record on OS stability has become progressively poor despite that they have access to the best engineers if they want us.

@CCP-Aporia
Copy link
Contributor

CCP-Aporia commented Dec 13, 2020

No problem, I very well understand the stability argument. :-) Please let me know if the fix in the PR works for you. As I mentioned, I am unfortunately unable to test this myself without considerable effort.

@shipmints
Copy link
Author

First glance suggests changes look okay. I can try to build on a local 10.12 box and let you know.

@shipmints
Copy link
Author

I checked it out and ran setup.py build and it built fine. I ran tox -e py38 (results below). Let me know if this is sufficient and thank you for the fast response.

platform darwin -- Python 3.8.5, pytest-6.2.0, py-1.10.0, pluggy-0.13.1
cachedir: .tox/py38/.pytest_cache
plugins: flaky-3.7.0, cov-2.10.1, timeout-1.4.2
collected 95 items / 3 skipped / 92 selected                                                                                            

tests/test_delayed_queue.py::test_delayed_get PASSED                                                                              [  1%]
tests/test_delayed_queue.py::test_nondelayed_get PASSED                                                                           [  2%]
tests/test_emitter.py::test_create SKIPPED (FIXME: issue #546.)                                                                   [  3%]
tests/test_emitter.py::test_create_wrong_encoding SKIPPED (Windows and macOS enforce proper encoding)                             [  4%]
tests/test_emitter.py::test_delete SKIPPED (FIXME: issue #546.)                                                                   [  5%]
tests/test_emitter.py::test_modify SKIPPED (FIXME: issue #546.)                                                                   [  6%]
tests/test_emitter.py::test_move SKIPPED (FIXME: issue #546.)                                                                     [  7%]
tests/test_emitter.py::test_move_to SKIPPED (FIXME: issue #546.)                                                                  [  8%]
tests/test_emitter.py::test_move_to_full SKIPPED (InotifyFullEmitter only supported in Linux)                                     [  9%]
tests/test_emitter.py::test_move_from SKIPPED (FIXME: issue #546.)                                                                [ 10%]
tests/test_emitter.py::test_move_from_full SKIPPED (InotifyFullEmitter only supported in Linux)                                   [ 11%]
tests/test_emitter.py::test_separate_consecutive_moves SKIPPED (FIXME: issue #546.)                                               [ 12%]
tests/test_emitter.py::test_delete_self SKIPPED (FIXME: issue #546.)                                                              [ 13%]
tests/test_emitter.py::test_fast_subdirectory_creation_deletion SKIPPED (FIXME: issue #546.)                                      [ 14%]
tests/test_emitter.py::test_passing_unicode_should_give_unicode SKIPPED (FIXME: issue #546.)                                      [ 15%]
tests/test_emitter.py::test_passing_bytes_should_give_bytes SKIPPED (FIXME: issue #546.)                                          [ 16%]
tests/test_emitter.py::test_recursive_on SKIPPED (FIXME: issue #546.)                                                             [ 17%]
tests/test_emitter.py::test_recursive_off SKIPPED (FIXME: issue #546.)                                                            [ 18%]
tests/test_emitter.py::test_renaming_top_level_directory SKIPPED (FIXME: issue #546.)                                             [ 20%]
tests/test_emitter.py::test_renaming_top_level_directory_on_windows SKIPPED (Non-Windows create another set of events for thi...) [ 21%]
tests/test_emitter.py::test_move_nested_subdirectories SKIPPED (FIXME: issue #546.)                                               [ 22%]
tests/test_emitter.py::test_move_nested_subdirectories_on_windows SKIPPED (Non-Windows create another set of events for this ...) [ 23%]
tests/test_events.py::test_file_deleted_event PASSED                                                                              [ 24%]
tests/test_events.py::test_file_delete_event_is_directory PASSED                                                                  [ 25%]
tests/test_events.py::test_file_modified_event PASSED                                                                             [ 26%]
tests/test_events.py::test_file_modified_event_is_directory PASSED                                                                [ 27%]
tests/test_events.py::test_file_created_event PASSED                                                                              [ 28%]
tests/test_events.py::test_file_moved_event PASSED                                                                                [ 29%]
tests/test_events.py::test_dir_deleted_event PASSED                                                                               [ 30%]
tests/test_events.py::test_dir_modified_event PASSED                                                                              [ 31%]
tests/test_events.py::test_dir_created_event PASSED                                                                               [ 32%]
tests/test_events.py::test_file_system_event_handler_dispatch PASSED                                                              [ 33%]
tests/test_fsevents.py::test_remove_watch_twice PASSED                                                                            [ 34%]
tests/test_fsevents.py::test_unschedule_removed_folder PASSED                                                                     [ 35%]
tests/test_fsevents.py::test_watchdog_recursive PASSED                                                                            [ 36%]
tests/test_logging_event_handler.py::test_logging_event_handler_dispatch PASSED                                                   [ 37%]
tests/test_observer.py::test_schedule_should_start_emitter_if_running PASSED                                                      [ 38%]
tests/test_observer.py::test_schedule_should_not_start_emitter_if_not_running PASSED                                              [ 40%]
tests/test_observer.py::test_start_should_start_emitter PASSED                                                                    [ 41%]
tests/test_observer.py::test_stop_should_stop_emitter PASSED                                                                      [ 42%]
tests/test_observer.py::test_unschedule_self PASSED                                                                               [ 43%]
tests/test_observer.py::test_schedule_after_unschedule_all PASSED                                                                 [ 44%]
tests/test_observer.py::test_2_observers_on_the_same_path PASSED                                                                  [ 45%]
tests/test_observer.py::test_start_failure_should_not_prevent_further_try PASSED                                                  [ 46%]
tests/test_observers_api.py::test_observer_constructor PASSED                                                                     [ 47%]
tests/test_observers_api.py::test_observer__eq__ PASSED                                                                           [ 48%]
tests/test_observers_api.py::test_observer__ne__ PASSED                                                                           [ 49%]
tests/test_observers_api.py::test_observer__repr__ PASSED                                                                         [ 50%]
tests/test_observers_api.py::test_event_emitter PASSED                                                                            [ 51%]
tests/test_observers_api.py::test_event_dispatcher PASSED                                                                         [ 52%]
tests/test_observers_api.py::test_observer_basic PASSED                                                                           [ 53%]
tests/test_observers_polling.py::test___init__ PASSED                                                                             [ 54%]
tests/test_observers_polling.py::test_delete_watched_dir PASSED                                                                   [ 55%]
tests/test_pattern_matching_event_handler.py::test_dispatch PASSED                                                                [ 56%]
tests/test_pattern_matching_event_handler.py::test_handler PASSED                                                                 [ 57%]
tests/test_pattern_matching_event_handler.py::test_ignore_directories PASSED                                                      [ 58%]
tests/test_pattern_matching_event_handler.py::test_ignore_patterns PASSED                                                         [ 60%]
tests/test_pattern_matching_event_handler.py::test_patterns PASSED                                                                [ 61%]
tests/test_patterns.py::test_match_path[/users/gorakhargosh/foobar.py-included_patterns0-excluded_patterns0-True-True] PASSED     [ 62%]
tests/test_patterns.py::test_match_path[/users/gorakhargosh/foobar.py-included_patterns1-excluded_patterns1-True-True] PASSED     [ 63%]
tests/test_patterns.py::test_match_path[/users/gorakhargosh/-included_patterns2-excluded_patterns2-False-False] PASSED            [ 64%]
tests/test_patterns.py::test_match_path[/users/gorakhargosh/foobar.py-included_patterns3-excluded_patterns3-False-ValueError] PASSED [ 65%]
tests/test_patterns.py::test_filter_paths[None-None-True-None] PASSED                                                             [ 66%]
tests/test_patterns.py::test_filter_paths[None-None-False-None] PASSED                                                            [ 67%]
tests/test_patterns.py::test_filter_paths[included_patterns2-excluded_patterns2-True-expected2] PASSED                            [ 68%]
tests/test_patterns.py::test_match_any_paths[None-None-True-True] PASSED                                                          [ 69%]
tests/test_patterns.py::test_match_any_paths[None-None-False-True] PASSED                                                         [ 70%]
tests/test_patterns.py::test_match_any_paths[included_patterns2-excluded_patterns2-True-True] PASSED                              [ 71%]
tests/test_patterns.py::test_match_any_paths[included_patterns3-None-False-False] PASSED                                          [ 72%]
tests/test_patterns.py::test_match_any_paths[included_patterns4-None-True-False] PASSED                                           [ 73%]
tests/test_regex_matching_event_handler.py::test_dispatch PASSED                                                                  [ 74%]
tests/test_regex_matching_event_handler.py::test_handler PASSED                                                                   [ 75%]
tests/test_regex_matching_event_handler.py::test_ignore_directories PASSED                                                        [ 76%]
tests/test_regex_matching_event_handler.py::test_ignore_regexes PASSED                                                            [ 77%]
tests/test_regex_matching_event_handler.py::test_regexes PASSED                                                                   [ 78%]
tests/test_regex_matching_event_handler.py::test_logging_event_handler_dispatch PASSED                                            [ 80%]
tests/test_skip_repeats_queue.py::test_basic_queue PASSED                                                                         [ 81%]
tests/test_skip_repeats_queue.py::test_allow_nonconsecutive PASSED                                                                [ 82%]
tests/test_skip_repeats_queue.py::test_prevent_consecutive PASSED                                                                 [ 83%]
tests/test_skip_repeats_queue.py::test_consecutives_allowed_across_empties PASSED                                                 [ 84%]
tests/test_skip_repeats_queue.py::test_eventlet_monkey_patching PASSED                                                            [ 85%]
tests/test_snapshot_diff.py::test_pickle PASSED                                                                                   [ 86%]
tests/test_snapshot_diff.py::test_move_to PASSED                                                                                  [ 87%]
tests/test_snapshot_diff.py::test_move_from PASSED                                                                                [ 88%]
tests/test_snapshot_diff.py::test_move_internal PASSED                                                                            [ 89%]
tests/test_snapshot_diff.py::test_move_replace PASSED                                                                             [ 90%]
tests/test_snapshot_diff.py::test_dir_modify_on_create PASSED                                                                     [ 91%]
tests/test_snapshot_diff.py::test_dir_modify_on_move PASSED                                                                       [ 92%]
tests/test_snapshot_diff.py::test_detect_modify_for_moved_files PASSED                                                            [ 93%]
tests/test_snapshot_diff.py::test_replace_dir_with_file PASSED                                                                    [ 94%]
tests/test_snapshot_diff.py::test_permission_error PASSED                                                                         [ 95%]
tests/test_snapshot_diff.py::test_ignore_device PASSED                                                                            [ 96%]
tests/test_snapshot_diff.py::test_empty_snapshot PASSED                                                                           [ 97%]
tests/test_watchmedo.py::test_load_config_valid PASSED                                                                            [ 98%]
tests/test_watchmedo.py::test_load_config_invalid PASSED                                                                          [100%]

---------- coverage: platform darwin, python 3.8.5-final-0 -----------
Name                                                                                 Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------------------------------------------
.tox/py38/lib/python3.8/site-packages/watchdog/__init__.py                               0      0   100%
.tox/py38/lib/python3.8/site-packages/watchdog/events.py                               182     31    83%   132, 135, 153, 181, 395, 397, 399-400, 438, 511-523, 537-545
.tox/py38/lib/python3.8/site-packages/watchdog/observers/__init__.py                    29     20    31%   61-64, 69-90
.tox/py38/lib/python3.8/site-packages/watchdog/observers/api.py                        151      1    99%   246
.tox/py38/lib/python3.8/site-packages/watchdog/observers/fsevents.py                    72     21    71%   95-110, 122-125, 164-165, 170
.tox/py38/lib/python3.8/site-packages/watchdog/observers/fsevents2.py                  128    128     0%   17-246
.tox/py38/lib/python3.8/site-packages/watchdog/observers/inotify.py                     77     77     0%   18-214
.tox/py38/lib/python3.8/site-packages/watchdog/observers/inotify_buffer.py              48     48     0%   17-98
.tox/py38/lib/python3.8/site-packages/watchdog/observers/inotify_c.py                  306    306     0%   18-587
.tox/py38/lib/python3.8/site-packages/watchdog/observers/kqueue.py                     233    233     0%   18-708
.tox/py38/lib/python3.8/site-packages/watchdog/observers/polling.py                     52      4    92%   86, 128, 143-144
.tox/py38/lib/python3.8/site-packages/watchdog/observers/read_directory_changes.py      57     57     0%   19-134
.tox/py38/lib/python3.8/site-packages/watchdog/observers/winapi.py                     179    179     0%   38-393
.tox/py38/lib/python3.8/site-packages/watchdog/tricks/__init__.py                       85     85     0%   18-200
.tox/py38/lib/python3.8/site-packages/watchdog/utils/__init__.py                        48     17    65%   56, 60, 99-103, 124-139
.tox/py38/lib/python3.8/site-packages/watchdog/utils/bricks.py                          16      0   100%
.tox/py38/lib/python3.8/site-packages/watchdog/utils/delayed_queue.py                   45     13    71%   40-44, 54, 57-58, 78-83
.tox/py38/lib/python3.8/site-packages/watchdog/utils/dirsnapshot.py                    141      8    94%   139, 268, 276-277, 328, 337, 340, 343
.tox/py38/lib/python3.8/site-packages/watchdog/utils/echo.py                            64     64     0%   9-161
.tox/py38/lib/python3.8/site-packages/watchdog/utils/patterns.py                        24      0   100%
.tox/py38/lib/python3.8/site-packages/watchdog/utils/platform.py                        25      6    76%   30, 33-38
.tox/py38/lib/python3.8/site-packages/watchdog/version.py                                6      0   100%
.tox/py38/lib/python3.8/site-packages/watchdog/watchmedo.py                            212    129    39%   54, 67-68, 89-93, 109-117, 134-139, 165-201, 230-252, 315-345, 423-442, 512-559, 581, 585
------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                 2180   1427    35%

===Flaky Test Report===

test_delayed_get passed 1 out of the required 1 times. Success!
test_nondelayed_get passed 1 out of the required 1 times. Success!

===End Flaky Test Report===

==================================================== 75 passed, 23 skipped in 27.94s ====================================================
________________________________________________________________ summary ________________________________________________________________
  py38: commands succeeded
  congratulations :)

@CCP-Aporia
Copy link
Contributor

Thanks for checking this out, looks like #733 is good then. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants