diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-05-07 11:15:47 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-05-09 14:24:48 +0530 |
commit | 8cf29bd288cb67008a42a5c9503042f975c04a43 (patch) | |
tree | 8551ef78da98a87be4f83298be718942111136bc /mesonbuild/mesonlib.py | |
parent | 1570a90822941b3f0e6cc8efa50002eb528bee43 (diff) | |
download | meson-8cf29bd288cb67008a42a5c9503042f975c04a43.zip meson-8cf29bd288cb67008a42a5c9503042f975c04a43.tar.gz meson-8cf29bd288cb67008a42a5c9503042f975c04a43.tar.bz2 |
Completely overhaul caching of external dependencies
The old caching was a mess of spaghetti code layered over pasta code.
The new code is well-commented, is clear about what it's trying to do,
and uses a blacklist of keyword arguments instead of a whitelist while
generating identifiers for dep caching which makes it much more robust
for future changes.
The only side-effect of forgetting about a new keyword argument would
be that the dependency would not be cached unless the values of that
keyword arguments were the same in the cached and new dependency.
There are also more tests which identify scenarios that were broken
earlier.
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index fbd732a..16315d8 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -305,7 +305,7 @@ def version_compare(vstr1, vstr2, strict=False): return cmpop(varr1, varr2) def version_compare_many(vstr1, conditions): - if not isinstance(conditions, (list, tuple)): + if not isinstance(conditions, (list, tuple, frozenset)): conditions = [conditions] found = [] not_found = [] |