class documentation

class FineGrainedBuildManager: (source)

View In Hierarchy

Undocumented

Method __init__ Initialize fine-grained build based on a batch build.
Method flush_cache Flush AST cache.
Method trigger Trigger a specific target explicitly.
Method update Update previous build result by processing changed modules.
Method update_module Update a single modified module.
Method update_one Process a module from the list of changed modules.
Instance Variable blocking_error Undocumented
Instance Variable changed_modules Undocumented
Instance Variable deps Undocumented
Instance Variable graph Undocumented
Instance Variable manager Undocumented
Instance Variable previous_messages Undocumented
Instance Variable previous_modules Undocumented
Instance Variable previous_targets_with_errors Undocumented
Instance Variable processed_targets Undocumented
Instance Variable stale Undocumented
Instance Variable triggered Undocumented
Instance Variable updated_modules Undocumented
def __init__(self, result: BuildResult): (source)

Initialize fine-grained build based on a batch build. Args: result: Result from the initialized build. The manager and graph will be taken over by this class. manager: State of the build (mutated by this class) graph: Additional state of the build (mutated by this class)

def flush_cache(self): (source)

Flush AST cache. This needs to be called after each increment, or file changes won't be detected reliably.

def trigger(self, target: str) -> list[str]: (source)

Trigger a specific target explicitly. This is intended for use by the suggestions engine.

def update(self, changed_modules: list[tuple[str, str]], removed_modules: list[tuple[str, str]], followed: bool = False) -> list[str]: (source)

Update previous build result by processing changed modules. Also propagate changes to other modules as needed, but only process those parts of other modules that are affected by the changes. Retain the existing ASTs and symbol tables of unaffected modules. Reuses original BuildManager and Graph. Args: changed_modules: Modules changed since the previous update/build; each is a (module id, path) tuple. Includes modified and added modules. Assume this is correct; it's not validated here. removed_modules: Modules that have been deleted since the previous update or removed from the build. followed: If True, the modules were found through following imports Returns: A list of errors.

def update_module(self, module: str, path: str, force_removed: bool, followed: bool) -> tuple[list[tuple[str, str]], tuple[str, str], list[str]|None]: (source)

Update a single modified module. If the module contains imports of previously unseen modules, only process one of the new modules and return the remaining work to be done. Args: module: Id of the module path: File system path of the module force_removed: If True, consider module removed from the build even if path exists (used for removing an existing file from the build) followed: Was this found via import following? Returns: Tuple with these items: - Remaining modules to process as (module id, path) tuples - Module which was actually processed as (id, path) tuple - If there was a blocking error, the error messages from it

def update_one(self, changed_modules: list[tuple[str, str]], initial_set: set[str], removed_set: set[str], blocking_error: str|None, followed: bool) -> tuple[list[tuple[str, str]], tuple[str, str], list[str]|None]: (source)

Process a module from the list of changed modules. Returns: Tuple with these items: - Updated list of pending changed modules as (module id, path) tuples - Module which was actually processed as (id, path) tuple - If there was a blocking error, the error messages from it

blocking_error = (source)

Undocumented

changed_modules = (source)

Undocumented

Undocumented

Undocumented

Undocumented

previous_messages = (source)

Undocumented

previous_modules = (source)

Undocumented

previous_targets_with_errors = (source)

Undocumented

processed_targets: list[str] = (source)

Undocumented

Undocumented

triggered: list = (source)

Undocumented

updated_modules: list = (source)

Undocumented