The patch fixes the cases of IC invalidation when symbols are modified:
adding and removing inline, data, in, out, suspend qualifiers.
For that purpose an extra hash is used.
It is written in a direct dependency graph into an IC cache metadata file.
For inline functions a transitive hash is used.
For non-inline functions, classes, and others a symbol hash is used.
The invalidation routine marks the file as dirty
(with 'updated imports' state) if hash is modified.
^KT-51083 Fixed
^KT-51088 Fixed
^KT-51090 Fixed
^KT-51099 Fixed
Replace loading the whole world IR with loading only exported (reachable) IR.
For that purpose the direct and inverse dependency graph is used.
It is stored in a cache directory and the cache updater keeps it up to date.
If after loading it is found that other files must be also implicitly rebuilt
(see rebuilt reasons below), IR for that files also will be loaded.
This algorithm repeats until the number of implicitly rebuilt files is not 0.
More rebuilt reasons (dirty state) have been added:
- added file: this is a new file;
- modified ir: ir of the file has been updated;
- updated exports: exports from the file have been added or removed
(e.g. a function has been used from another file);
- updated inline imports: imported inline function has been modified
(transitively);
- removed inverse depends: a dependent file has been removed;
- removed direct depends: a dependency file has been removed;
- removed file: this file has been removed.
Incremental cache tests has been refactored:
- The supporting of all rebuilt reasons (dirty states) has been added;
- New file name format "*.$suffix.kt" for the test steps has been allowed,
so the syntax highlight works now;
- Explicit stdlib dependency usage has been removed.