Add ParamInformation and callback can be a coroutine
This commit is contained in:
@ -30,7 +30,9 @@ from ..error import ConfigError, ConflictError
|
||||
|
||||
|
||||
class CacheOptionDescription(BaseOption):
|
||||
__slots__ = ('_cache_force_store_values',)
|
||||
__slots__ = ('_cache_force_store_values',
|
||||
'_cache_dependencies_information',
|
||||
)
|
||||
|
||||
def impl_already_build_caches(self) -> bool:
|
||||
return self.impl_is_readonly()
|
||||
@ -42,7 +44,9 @@ class CacheOptionDescription(BaseOption):
|
||||
currpath: List[str]=None,
|
||||
cache_option=None,
|
||||
force_store_values=None,
|
||||
display_name=None) -> None:
|
||||
dependencies_information=None,
|
||||
display_name=None,
|
||||
) -> None:
|
||||
"""validate options and set option has readonly option
|
||||
"""
|
||||
# _consistencies is None only when we start to build cache
|
||||
@ -52,6 +56,7 @@ class CacheOptionDescription(BaseOption):
|
||||
if __debug__:
|
||||
cache_option = []
|
||||
force_store_values = []
|
||||
dependencies_information = {}
|
||||
currpath = []
|
||||
else:
|
||||
init = False
|
||||
@ -73,8 +78,11 @@ class CacheOptionDescription(BaseOption):
|
||||
sub_currpath,
|
||||
cache_option,
|
||||
force_store_values,
|
||||
dependencies_information,
|
||||
display_name)
|
||||
else:
|
||||
for information in option.get_dependencies_information():
|
||||
dependencies_information.setdefault(information, []).append(option)
|
||||
is_multi = option.impl_is_multi()
|
||||
if not option.impl_is_symlinkoption():
|
||||
properties = option.impl_getproperties()
|
||||
@ -102,6 +110,7 @@ class CacheOptionDescription(BaseOption):
|
||||
option._set_readonly()
|
||||
if init:
|
||||
self._cache_force_store_values = force_store_values
|
||||
self._cache_dependencies_information = dependencies_information
|
||||
self._path = self._name
|
||||
self._set_readonly()
|
||||
|
||||
|
Reference in New Issue
Block a user