Chromium Code Reviews

Issue 64723005: Use the polling watcher by default in pub tests for now. (Closed)

Created:
7 years, 1 month ago by nweiz
Modified:
7 years, 1 month ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Use the polling watcher by default in pub tests for now. This adds a few tests that explicitly exercise the native watcher. R=rnystrom@google.com BUG=14941 Committed: https://code.google.com/p/dart/source/detail?r=30094

Patch Set 1 #

Total comments: 8

Patch Set 2 : code review #

Total comments: 4
Unified diffs Side-by-side diffs Stats (+178 lines, -92 lines)
M sdk/lib/_internal/pub/lib/src/barback.dart View 3 chunks +12 lines, -3 lines 2 comments
M sdk/lib/_internal/pub/lib/src/barback/sources.dart View 3 chunks +51 lines, -4 lines 2 comments
M sdk/lib/_internal/pub/lib/src/command/build.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/lib/src/command/serve.dart View 2 chunks +7 lines, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/does_not_get_first_if_a_dependency_is_removed_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/does_not_get_first_if_git_url_did_not_change_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/does_not_get_first_if_locked_version_matches_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/gets_first_if_dependency_added_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/gets_first_if_dependency_version_changed_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/gets_first_if_dev_dependency_changed_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/gets_first_if_git_ref_changed_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/gets_first_if_git_url_changed_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/gets_first_if_no_lockfile_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/gets_first_if_path_dependency_changed_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/gets_first_if_source_changed_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/invalid_method_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/invalid_urls_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/missing_asset_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/missing_dependency_file_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/missing_file_test.dart View 1 chunk +1 line, -1 line 0 comments
A + sdk/lib/_internal/pub/test/serve/native_watch_added_file_test.dart View 2 chunks +6 lines, -2 lines 0 comments
A + sdk/lib/_internal/pub/test/serve/native_watch_modified_file_test.dart View 2 chunks +6 lines, -2 lines 0 comments
A + sdk/lib/_internal/pub/test/serve/native_watch_removed_file_test.dart View 2 chunks +6 lines, -2 lines 0 comments
M sdk/lib/_internal/pub/test/serve/serve_from_app_asset_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/serve_from_app_lib_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/serve_from_app_web_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/serve_from_dependency_asset_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/serve_from_dependency_lib_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/unknown_dependency_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/utils.dart View 2 chunks +17 lines, -8 lines 0 comments
M sdk/lib/_internal/pub/test/serve/watch_added_file_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/watch_modified_file_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/watch_removed_file_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/web_socket/converts_asset_ids_to_urls_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/web_socket/converts_urls_to_asset_ids_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_bad_commands_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/serve/web_socket/returns_errors_on_invalid_assets_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/can_use_read_input_as_string_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/configuration/configuration_defaults_to_empty_map_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/configuration/passes_configuration_to_a_transformer_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/configuration/with_configuration_only_instantiates_configurable_transformers_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/allows_import_in_dart_code_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/compiles_generated_dart_file_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/compiles_generated_file_from_dependency_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/compiles_imported_generated_file_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/converts_entrypoint_in_web_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/does_not_compile_if_disabled_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/ignores_entrypoint_in_dependency_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/ignores_entrypoint_outside_web_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/ignores_nonentrypoint_in_web_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/takes_flag_minify_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/dart2js/unminified_by_default_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/detects_a_transformer_cycle_test.dart View 1 chunk +1 line, -2 lines 0 comments
M sdk/lib/_internal/pub/test/transformer/detects_an_ordering_dependency_cycle_test.dart View 1 chunk +1 line, -2 lines 0 comments
M sdk/lib/_internal/pub/test/transformer/does_not_run_a_transform_on_an_input_in_another_package_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/fails_to_load_a_file_that_defines_no_transforms_test.dart View 2 chunks +2 lines, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/fails_to_load_a_non_existent_transform_test.dart View 2 chunks +2 lines, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_config_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/fails_to_load_a_transform_from_a_non_dependency_test.dart View 2 chunks +2 lines, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/fails_to_load_a_transform_with_a_syntax_error_test.dart View 2 chunks +2 lines, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/fails_to_load_a_transform_with_an_import_error_test.dart View 2 chunks +2 lines, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/fails_to_load_an_unconfigurable_transformer_when_config_is_passed_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/loads_a_diamond_transformer_dependency_graph_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/loads_ordering_dependencies_in_the_correct_order_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/mode_defaults_to_debug_in_serve_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/prefers_transformer_to_library_name_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/prints_a_transform_error_in_apply_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/prints_a_transform_interface_error_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/runs_a_local_transform_on_the_application_package_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/runs_a_third_party_transform_on_the_application_package_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/runs_a_third_party_transformer_on_a_local_transformer_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/runs_a_transform_on_a_dependency_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/runs_a_transformer_group_test.dart View 1 chunk +1 line, -1 line 0 comments
M sdk/lib/_internal/pub/test/transformer/runs_one_third_party_transformer_on_another_test.dart View 1 chunk +1 line, -1 line 0 comments

Messages

Total messages: 8 (0 generated)
nweiz
7 years, 1 month ago (2013-11-08 00:57:36 UTC) #1
Bob Nystrom
https://codereview.chromium.org/64723005/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart File sdk/lib/_internal/pub/lib/src/barback.dart (right): https://codereview.chromium.org/64723005/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart#newcode128 sdk/lib/_internal/pub/lib/src/barback.dart:128: return new PollingDirectoryWatcher(directory); How about making this a factory ...
7 years, 1 month ago (2013-11-08 01:32:31 UTC) #2
nweiz
https://codereview.chromium.org/64723005/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart File sdk/lib/_internal/pub/lib/src/barback.dart (right): https://codereview.chromium.org/64723005/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart#newcode128 sdk/lib/_internal/pub/lib/src/barback.dart:128: return new PollingDirectoryWatcher(directory); On 2013/11/08 01:32:32, Bob Nystrom wrote: ...
7 years, 1 month ago (2013-11-08 01:44:24 UTC) #3
nweiz
Bob verbally lgtm'd this before he left for the day.
7 years, 1 month ago (2013-11-08 01:47:55 UTC) #4
nweiz
Committed patchset #2 manually as r30094 (presubmit successful).
7 years, 1 month ago (2013-11-08 01:49:19 UTC) #5
Bob Nystrom
https://codereview.chromium.org/64723005/diff/70001/sdk/lib/_internal/pub/lib/src/barback.dart File sdk/lib/_internal/pub/lib/src/barback.dart (right): https://codereview.chromium.org/64723005/diff/70001/sdk/lib/_internal/pub/lib/src/barback.dart#newcode129 sdk/lib/_internal/pub/lib/src/barback.dart:129: return new PollingDirectoryWatcher(directory); Did you miss uploading a change ...
7 years, 1 month ago (2013-11-08 19:29:08 UTC) #6
Bob Nystrom
lgtm
7 years, 1 month ago (2013-11-08 19:29:16 UTC) #7
nweiz
7 years, 1 month ago (2013-11-08 19:32:09 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/64723005/diff/70001/sdk/lib/_internal/pub/lib...
File sdk/lib/_internal/pub/lib/src/barback.dart (right):

https://codereview.chromium.org/64723005/diff/70001/sdk/lib/_internal/pub/lib...
sdk/lib/_internal/pub/lib/src/barback.dart:129: return new
PollingDirectoryWatcher(directory);
On 2013/11/08 19:29:08, Bob Nystrom wrote:
> Did you miss uploading a change here? This should just pass in the watcher
now,
> right?

Yeah, I just forgot to upload the change that got rid of this.

https://codereview.chromium.org/64723005/diff/70001/sdk/lib/_internal/pub/lib...
File sdk/lib/_internal/pub/lib/src/barback/sources.dart (right):

https://codereview.chromium.org/64723005/diff/70001/sdk/lib/_internal/pub/lib...
sdk/lib/_internal/pub/lib/src/barback/sources.dart:113: static const AUTO =
const _AutoWatcherType();
On 2013/11/08 19:29:08, Bob Nystrom wrote:
> I think top-level functions may be usable as const expressions. If so, you can
> get rid of the subclasses and just do functions. Either way is fine, though.

It feels weird to me to me to have multiple objects with different
implementations of a method done via closures passed to the constructor, even if
it is terser.

Powered by Google App Engine