GNU bug report logs -
#49828
[PATCH 00/20] Add minetest mods
Previous Next
Reported by: Maxime Devos <maximedevos <at> telenet.be>
Date: Mon, 2 Aug 2021 15:48:02 UTC
Severity: normal
Tags: patch
Done: Leo Prikler <leo.prikler <at> student.tugraz.at>
Bug is archived. No further changes may be made.
Full log
Message #95 received at 49828 <at> debbugs.gnu.org (full text, mbox):
Hi,
Am Dienstag, den 03.08.2021, 13:10 +0200 schrieb Maxime Devos:
> (patches (search-patches "Add-environment-variable-
> MINETEST_MOD_PATH.patch"))
This line is a bit long. Even if might look a little weird, I think
it's better split in three.
> ++ // XXX: for some reason, simply writing
> ++ // Strfnd mod_search_paths (std::string(c_modpath));
> ++ // leads to a compilation error:
> ++ //
> ++ // request for member ‘at_end’ in ‘mod_search_paths’, which is
> of
> ++ // non-class type ‘Strfnd(std::__cxx11::string)
> ++ // {aka BasicStrfnd<char>(std::__cxx11::basic_string<char>)}’
> ++ std::string modpath = std::string(c_modpath);
> ++ Strfnd mod_search_paths(modpath);
Try Strfnd mod_search_paths{modpath}. The normal bracket style
confuses C++, because it can also be parsed as a function declaration.
> + * core.get_modpath() (possible in async calls)
> +- * returns path to global modpath
> ++ * returns path to global modpath, where mods can be installed
> ++* core.get_modpaths() (possible in async calls)
> ++ * returns list of paths to global modpaths, where mods have
> been installed
> ++
> ++ The difference with "core.get_modpath" is that no mods should
> be installed in these
> ++ directories by Minetest -- they might be read-only.
This is a somewhat weird interface imo. I think core.get_modpath
should be the first element of core.get_modpaths and documented in that
way, so that any GUI that deals with "all known mods" needs to simply
call the latter, whereas any GUI that deals with installing can
comfortably use either the former or whatever Lua has for car. WDYT?
Otherwise LGTM.
This bug report was last modified 3 years and 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.