From b9acfa6ab04d05d9ad34f3e203bfc498a1bf2f11 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 30 May 2023 08:25:25 -0700 Subject: til: find explicitly set experimental modules b9123bbb added describing incoming preexisting settings, but the spec's returned values omitted experimental modules. This resulted in breaking the ability to say things like --module=rkt to access the experimental rkt module despite it not showing in the interactive setup list of values. This commit includes experimental modules in the spec's values when being produced for a preexisting, undescribed setting. Restoring one's ability to access experimental modules via the CLI. --- src/til.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/til.c b/src/til.c index d006c08..2fa0978 100644 --- a/src/til.c +++ b/src/til.c @@ -279,7 +279,13 @@ int til_module_setup(const til_settings_t *settings, til_setting_t **res_setting int r; for (unsigned i = 0, j = 0; i < nelems(modules); i++) { - if ((modules[i]->flags & TIL_MODULE_EXPERIMENTAL)) + /* XXX: This only skips experimental modules when no module setting was pre-specified, + * which allows accessing the experimental modules via the CLI without showing them + * in the interactive setup where the desc provides the displayed list of values before + * the module setting gets added. It seems a big kludge-y and fragile, but works well + * enough for now to get at the experimental modules during testing/development. + */ + if (!name && (modules[i]->flags & TIL_MODULE_EXPERIMENTAL)) continue; values[j] = modules[i]->name; -- cgit v1.2.3