MCPcopy Create free account
hub / github.com/SolaWing/xcode-build-server / parse_compile_swift_module

Method parse_compile_swift_module

xclog_parser.py:104–129  ·  view source on GitHub ↗
(self, line: str)

Source from the content-addressed store, hash-verified

102 self._pch_info = {} # {condition => pch_file_path}
103
104 def parse_compile_swift_module(self, line: str):
105 if not line.startswith("CompileSwiftSources "):
106 return
107
108 li = read_until_empty_line(self._input)
109 if not li:
110 return
111
112 command = li[-1] # type: str
113 if not self.skip_validate_bin and self.swiftc_exec not in command:
114 echo(f"Error: ================= Can't found {self.swiftc_exec}\n" + command)
115 return
116
117 module = {}
118 directory = next((cmd_split(i)[1] for i in li if i.startswith("cd ")), None)
119 if directory:
120 module["directory"] = directory
121 module["command"] = command
122 files = extract_swift_files_from_swiftc(command)
123 module["module_name"] = files[2]
124 module["files"] = files[0]
125 module["fileLists"] = files[1]
126 if files[3]:
127 self.index_store_path.add(files[3])
128 echo(f"CompileSwiftModule {module['module_name']}")
129 return module
130
131 def parse_swift_error(self, line: str):
132 regexp_str: Optional[str] = None

Callers

nothing calls this directly

Calls 4

read_until_empty_lineFunction · 0.85
echoFunction · 0.85
cmd_splitFunction · 0.70

Tested by

no test coverage detected