https://bugzilla.wikimedia.org/show_bug.cgi?id=72503
Fabian <CommodoreFabianus(a)gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |CommodoreFabianus(a)gmx.de
--- Comment #4 from Fabian <CommodoreFabianus(a)gmx.de> ---
(In reply to Merlijn van Deen from comment #3)
Essentially it's our config singleton biting us
again...
The current version of 'generate_family_file' could be run without a user
config (like generate_user_files). The problem is just that pwb.py doesn't know
that. Although the question is how can we pwb.py let it know? We could have
just a list of files which don't require a user config, but then we need to
make sure it's kept in sync with the file name(s).
Or only load the (user) config as soon as the script requires it which would be
the default. So in generate_family_file it's setting a environment variable to
say "user config is optional" and only then it queries the code to load the
config. The problem here is when a file doesn't need it but depends on a file
which does. If the default (when nothing is done about it) is to require the
user config (so we only need to change generate_family_file) and a file does
request that it doesn't need a user config it sets that variable. Later it
depends then on something which does require the user config but doesn't set
the variable because by default it doesn't need to.
Both scenarios sound like I'm overthinking it so maybe someone has a better and
easier idea.
But thinking about it, it'd be nice if generate_family_file knows which family
file directories are configured to give the user the configured directories to
choose from. But that would require an “load user-config.py if possible but
ignore otherwise” option.
--
You are receiving this mail because:
You are the assignee for the bug.