A message wrapping the SCC structure computed by the coordinator.
| 5358 | |
| 5359 | |
| 5360 | class SccsDataMessage(IPCMessage): |
| 5361 | """A message wrapping the SCC structure computed by the coordinator.""" |
| 5362 | |
| 5363 | def __init__(self, *, sccs: list[SCC]) -> None: |
| 5364 | self.sccs = sccs |
| 5365 | |
| 5366 | @classmethod |
| 5367 | def read(cls, buf: ReadBuffer) -> SccsDataMessage: |
| 5368 | sccs = [ |
| 5369 | SCC(set(read_str_list(buf)), read_int(buf), read_int_list(buf)) |
| 5370 | for _ in range(read_int_bare(buf)) |
| 5371 | ] |
| 5372 | return SccsDataMessage(sccs=sccs) |
| 5373 | |
| 5374 | def write(self, buf: WriteBuffer) -> None: |
| 5375 | write_tag(buf, SCCS_DATA_MESSAGE) |
| 5376 | write_int_bare(buf, len(self.sccs)) |
| 5377 | for scc in self.sccs: |
| 5378 | write_str_list(buf, sorted(scc.mod_ids)) |
| 5379 | write_int(buf, scc.id) |
| 5380 | write_int_list(buf, sorted(scc.deps)) |
| 5381 | |
| 5382 | |
| 5383 | class GraphMessage(IPCMessage): |
no outgoing calls
no test coverage detected
searching dependent graphs…