@@ -19,49 +19,6 @@ def is_cpp_file(path):
1919 return path .endswith ('.cc' ) or path .endswith ('.h' )
2020
2121
22- def _CheckNnbdSdkSync (input_api , output_api ):
23- files = [git_file .LocalPath () for git_file in input_api .AffectedTextFiles ()]
24- unsynchronized_files = []
25- for file in files :
26- if file .startswith ('sdk/' ):
27- nnbd_file = 'sdk_nnbd/' + file [4 :]
28- if not nnbd_file in files :
29- unsynchronized_files .append (nnbd_file )
30- if unsynchronized_files :
31- return [
32- output_api .PresubmitPromptWarning (
33- 'Changes were made to sdk/ that were not made to sdk_nnbd/\n '
34- 'Please update these files as well:\n '
35- '\n '
36- '%s' % ('\n ' .join (unsynchronized_files )))
37- ]
38- return []
39-
40-
41- def _CheckSdkDdcRuntimeSync (input_api , output_api ):
42- files = [git_file .LocalPath () for git_file in input_api .AffectedTextFiles ()]
43- unsynchronized_files = []
44- runtime_lib = 'lib/_internal/js_dev_runtime/private/ddc_runtime/'
45- for nnbd_file in files :
46- if nnbd_file .startswith ('sdk_nnbd/' + runtime_lib ):
47- file = 'sdk/' + nnbd_file [9 :]
48- if not file in files :
49- unsynchronized_files .append (file )
50- if unsynchronized_files :
51- return [
52- output_api .PresubmitPromptWarning (
53- 'Changes were made to '
54- 'sdk_nnbd/lib/_internal/js_dev_runtime/private/ddc_runtime/ '
55- 'that were not made to '
56- 'sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/ '
57- 'Please copy those changes (without Null Safety syntax) to '
58- 'these files as well:\n '
59- '\n '
60- '%s' % ('\n ' .join (unsynchronized_files )))
61- ]
62- return []
63-
64-
6522def _CheckNnbdTestSync (input_api , output_api ):
6623 """Make sure that any forked SDK tests are kept in sync. If a CL touches
6724 a test, the test's counterpart (if it exists at all) should be in the CL
@@ -369,8 +326,6 @@ def test_matrix_filter(affected_file):
369326
370327def _CommonChecks (input_api , output_api ):
371328 results = []
372- results .extend (_CheckNnbdSdkSync (input_api , output_api ))
373- results .extend (_CheckSdkDdcRuntimeSync (input_api , output_api ))
374329 results .extend (_CheckNnbdTestSync (input_api , output_api ))
375330 results .extend (_CheckValidHostsInDEPS (input_api , output_api ))
376331 results .extend (_CheckDartFormat (input_api , output_api ))
0 commit comments