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

Method register_uri

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

Source from the content-addressed store, hash-verified

120 return output_lock_path(self._compile_file)
121
122 def register_uri(self, uri):
123 self.observed_uri.add(uri)
124
125 file_path = uri2realpath(uri)
126 flags = GetFlags(file_path, self.compile_file, store=self.store)
127
128 if not flags and env.new_file:
129 if filekeys := newfileForCompileFile(
130 file_path, self.compile_file, store=self.store
131 ):
132 # add new file success, update options for module files
133 for v in self.observed_uri:
134 if filekey(uri2filepath(v)) in filekeys:
135 self.notify_option_changed(v)
136 return
137
138 if not flags and file_path.endswith(".swift"):
139 flags = InferFlagsForSwift(file_path, self.compile_file, store=self.store)
140
141 self._notify_option_changed(uri, self.optionsForFlags(flags))
142
143 def unregister_uri(self, uri):
144 self.observed_uri.remove(uri)

Callers 1

Calls 9

notify_option_changedMethod · 0.95
optionsForFlagsMethod · 0.95
GetFlagsFunction · 0.90
newfileForCompileFileFunction · 0.90
filekeyFunction · 0.90
InferFlagsForSwiftFunction · 0.90
uri2realpathFunction · 0.85
uri2filepathFunction · 0.85

Tested by

no test coverage detected