Maintains a user-friendly improvement from a few years back to make it
easier to use module-sets to grab a wide set of modules without having
to disable individual modules that weren't present at that time.
The log directories are stored in a central directory in the
BuildContext so that we know which ones we're supposed to reuse. But
this only happens on first use. If this first use happens during an
async build it won't be properly persisted, so each succeeding build
will think it's the first one to need a log directory.
This can happen for modules that use a log directory different from the
global directory.
It turns out that there is a code path where ksb::Module objects in the
process of being created do not have ModuleResolver::_applyOptions()
called on them to ensure that deferred options (from "options" blocks in
the config file) as applied if necessary.
This affected modules like libdbusmenu-qt, which if processed as part of
generating the build list from the config file would *NOT* have
_applyOptions() called (because expandModuleSets only ran this on
ksb::ModuleSets being expanded, and the resolveSingleSelector call that
otherwise would have run applyOptions is only called when modules are
passed as cmdline "selectors").
Fix by pushing _applyOptions to be called for all modules processed
through expandModuleSets (which despite the name gets a cut at every
module in the module list), and removing applyOptions from
resolveSingleSelector since it's redundant now.
BUG:382172
FIXED-IN:17.08
In other words, we separate parsing of options blocks from whether
existing modules or module-sets have already been seen. Instead we
decide later (when expanding module-sets or modules) whether there are
any relevant options blocks to apply (this is the 'deferred option'
handling).
Now you should be able to declare options blocks that contain options
appropriate for module-sets, even if no module-set is defined with that
name (e.g. if you're doing weirdness with 'include' declarations).
This does require that you don't use the same name for modules and for
module-sets, but that is essentially already a requirement anyways.
There's no good way to always disambiguate that.
BUG:366594
FIXED-IN:16.10
This is intended to split off idea of reading cmdline options to apply
from the idea of reading 'options' blocks to later apply. Right now the
processing for both are intermingled.
This makes it more convenient to work with baseline configurations (that
are 'include'd) without changing the upstream configuration.
Still to do: add a warning when modules and module-sets end up sharing
the same name somehow.
BUG:365813
FIXED-IN:16.08
As opposed to only kde-projects modules also present in the rc-file.
E.g. this rc-file
---
global
branch-group kf5-qt5
end global
module-set
repository kde-projects
use-modules plasma-desktop
include-dependencies true
end module-set
---
...still lists 83 modules to build if you run kdesrc-build.
We also needed to ensure that each module generated by user selectors
knows to propagate the 'needs dependencies' flag.
There are currently various different paths to creating a Module (the
internal representation of a module from the rc-file). Depending on how
the Module is created you might get different options set for the Module
since the options are only available near the beginning (and are spread
across many different variables).
Consolidate some of this; this also has the side benefit of making
ksb::Application less of a dumping ground, and let's us get rid of a
'module-option-fixing callback' that needed to be used with a separate
'module-creating-by-name' callback.
Additionally this means that modules take only the options of the
module-set they were actually declared in, instead of the module-set in
use when the module was found (which may be different when using
--include-dependencies).
BUG:345192
FIXED-IN:15.05