From 8cf29bd288cb67008a42a5c9503042f975c04a43 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sun, 7 May 2017 11:15:47 +0530 Subject: 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. --- mesonbuild/mesonlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/mesonlib.py') 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 = [] -- cgit v1.1