MCPcopy Index your code
hub / github.com/nodejs/node / detect_reclient

Function detect_reclient

deps/v8/tools/dev/gm.py:196–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194# Note: this function is reused by update-compile-commands.py. When renaming
195# this, please update that file too!
196def detect_reclient():
197 if not GCLIENT_FILE_PATH.exists():
198 return Reclient.NONE
199 content = GCLIENT_FILE_PATH.read_text()
200 try:
201 config_dict = {}
202 exec(content, config_dict)
203 except SyntaxError as e:
204 print("# Can't detect reclient due to .gclient syntax errors.")
205 return Reclient.NONE
206 v8_solution = get_v8_solution(config_dict["solutions"])
207 if not v8_solution:
208 print("# Can't detect reclient due to missing v8 gclient solution.")
209 return Reclient.NONE
210 custom_vars = v8_solution.get("custom_vars", {})
211 if "rbe_instance" in custom_vars:
212 return Reclient.CUSTOM
213 if "download_remoteexec_cfg" in custom_vars:
214 return Reclient.GOOGLE
215 return Reclient.NONE
216
217
218# Note: this function is reused by update-compile-commands.py. When renaming

Callers 1

gm.pyFile · 0.85

Calls 5

get_v8_solutionFunction · 0.85
getMethod · 0.65
execFunction · 0.50
printFunction · 0.50
existsMethod · 0.45

Tested by

no test coverage detected