From d2569dc26751464f9e42df9c4723d53458a86ed2 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 20 Dec 2022 10:36:47 -0800 Subject: Address feedback from mwichmann in PR --- CHANGES.txt | 4 ++-- RELEASE.txt | 4 ++-- SCons/Node/FS.py | 15 +++++++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c46f9b6..bbc2800 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -34,8 +34,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER read packaging/etc/README.txt if you are interested. - Added --experimental=tm_v2, which enables Andrew Morrow's new NewParallel Job implementation. This should scale much better for highly parallel builds. You can also enable this via SetOption(). - - Fixed setting diskcheck to 'none' via command line works --diskcheck=none. Apparently it has never worked - even though SetOption('diskcheck','none') did work. + - Fixed command line argument --diskcheck: previously a value of 'none' was ignored. + SetOption('diskcheck','none') is unaffected, as it did not have the problem. From Dan Mezhiborsky: - Add newline to end of compilation db (compile_commands.json). diff --git a/RELEASE.txt b/RELEASE.txt index 40852fe..32094bf 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -64,8 +64,8 @@ FIXES - Ninja: Fix execution environment sanitation for launching ninja. Previously if you set an execution environment variable set to a python list it would crash. Now it will create a string joining the list with os.pathsep -- Fixed setting diskcheck to 'none' via command line works --diskcheck=none. Apparently it has never worked - even though SetOption('diskcheck','none') did work. +- Fixed command line argument --diskcheck: previously a value of 'none' was ignored. + SetOption('diskcheck','none') is unaffected, as it did not have the problem. IMPROVEMENTS ------------ diff --git a/SCons/Node/FS.py b/SCons/Node/FS.py index aadcba5..67e1ff6 100644 --- a/SCons/Node/FS.py +++ b/SCons/Node/FS.py @@ -380,8 +380,10 @@ else: class DiskChecker: """ - This Class will hold various types of logic for checking if a file/dir on disk matches - the type which is expected. And allow Options to decide to enable or disable said check + Implement disk check variation. + + This Class will hold functions to determine what this particular disk + checking implementation should do when enabled or disabled. """ def __init__(self, disk_check_type, do_check_function, ignore_check_function): self.disk_check_type = disk_check_type @@ -392,7 +394,12 @@ class DiskChecker: def __call__(self, *args, **kw): return self.func(*args, **kw) - def set(self, disk_check_type_list): + def enable(self, disk_check_type_list): + """ + If the current object's disk_check_type matches any in the list passed + :param disk_check_type_list: List of disk checks to enable + :return: + """ if self.disk_check_type in disk_check_type_list: self.func = self.do_check_function else: @@ -429,7 +436,7 @@ diskcheckers = [ def set_diskcheck(enabled_checkers): for dc in diskcheckers: - dc.set(enabled_checkers) + dc.enable(enabled_checkers) def diskcheck_types(): -- cgit v0.12