class FineGrainedBuildManager: (source)
Undocumented
Method | __init__ |
Initialize fine-grained build based on a batch build. |
Method | flush |
Flush AST cache. |
Method | trigger |
Trigger a specific target explicitly. |
Method | update |
Update previous build result by processing changed modules. |
Method | update |
Update a single modified module. |
Method | update |
Process a module from the list of changed modules. |
Instance Variable | blocking |
Undocumented |
Instance Variable | changed |
Undocumented |
Instance Variable | deps |
Undocumented |
Instance Variable | graph |
Undocumented |
Instance Variable | manager |
Undocumented |
Instance Variable | previous |
Undocumented |
Instance Variable | previous |
Undocumented |
Instance Variable | previous |
Undocumented |
Instance Variable | processed |
Undocumented |
Instance Variable | stale |
Undocumented |
Instance Variable | triggered |
Undocumented |
Instance Variable | updated |
Undocumented |
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)
Flush AST cache. This needs to be called after each increment, or file changes won't be detected reliably.
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.
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
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