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

Method sourceKitOptions

server.py:146–162  ·  view source on GitHub ↗
(self, uri)

Source from the content-addressed store, hash-verified

144 self.observed_uri.remove(uri)
145
146 def sourceKitOptions(self, uri):
147 file_path = uri2realpath(uri)
148 flags = GetFlags(file_path, self.compile_file, store=self.store)
149 if not flags and env.new_file:
150 if newfileForCompileFile(file_path, self.compile_file, store=self.store):
151 flags = GetFlags(file_path, self.compile_file, store=self.store)
152 self.notify_target_changes()
153
154 if not flags and file_path.endswith(".swift"):
155 flags = InferFlagsForSwift(file_path, self.compile_file, store=self.store)
156
157 if result := self.optionsForFlags(flags):
158 return {
159 "compilerArguments": result["options"],
160 "workingDirectory": result["workingDirectory"],
161 }
162 return None
163
164 def optionsForFile(self, uri):
165 file_path = uri2realpath(uri)

Callers 1

Calls 6

notify_target_changesMethod · 0.95
optionsForFlagsMethod · 0.95
GetFlagsFunction · 0.90
newfileForCompileFileFunction · 0.90
InferFlagsForSwiftFunction · 0.90
uri2realpathFunction · 0.85

Tested by

no test coverage detected