Skip to content

Commit 358bff7

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
Copy domains pdl files
To support the upcoming pdl file split, this CL prepares DevTools that browser_protocol.pdl might comprise of multiple files. Bug: 431083788 Change-Id: I77796f7f354ca886efb59dc585a125502f8c25be Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6827356 Reviewed-by: Simon Zünd <[email protected]> Commit-Queue: Alex Rudenko <[email protected]>
1 parent 034b49c commit 358bff7

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

scripts/deps/roll_deps.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import os
1414
import subprocess
1515
import sys
16+
import shutil
1617

1718

1819
def node_path(options):
@@ -31,6 +32,7 @@ def node_path(options):
3132
'v8/include/js_protocol.pdl',
3233
'third_party/blink/renderer/core/css/css_properties.json5',
3334
'third_party/blink/renderer/core/html/aria_properties.json5',
35+
'third_party/blink/public/devtools_protocol/domains',
3436
'third_party/blink/public/devtools_protocol/browser_protocol.pdl',
3537
'third_party/blink/renderer/core/frame/deprecation/deprecation.json5',
3638
]
@@ -106,9 +108,18 @@ def copy_files(options):
106108
os.path.normpath(to_path))
107109
print(f'{os.path.normpath(from_path)} => {os.path.normpath(to_path)}')
108110

111+
if not os.path.exists(from_path_full):
112+
if from_path_full.endswith("/domains"):
113+
continue
114+
raise Exception(f'{os.path.normpath(from_path)} does not exist')
115+
109116
# Create destination directory if it doesn't exist
110117
os.makedirs(os.path.dirname(to_path_full), exist_ok=True)
111118

119+
if os.path.isdir(from_path_full):
120+
shutil.copytree(from_path_full, to_path_full, dirs_exist_ok=True)
121+
continue
122+
112123
with open(from_path_full, 'r', encoding='utf-8') as infile:
113124
content = infile.read()
114125

scripts/devtools_paths.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,5 @@ def package_json_path():
123123
return path.join(devtools_root_path(), 'package.json')
124124

125125

126-
def browser_protocol_path():
127-
return path.join(third_party_path(), 'blink', 'public',
128-
'devtools_protocol', 'browser_protocol.pdl')
129-
130-
131126
def custom_devtools_frontend_path(target):
132127
return path.join(root_path(), 'out', target, 'gen', 'front_end')

0 commit comments

Comments
 (0)