-
-
Couldn't load subscription status.
- Fork 684
Description
Since #19917, tab completion on libgap returns a fixed list. As noted there, new global functions and objects introduced when loading packages remain therefore hidden. Now that loading packages in libgap is much better supported, this is really becoming an issue.
Proposal, after discussion with GAP devs: use the same implementation as in the plain gap interface (namely ask GAP for the list of global names), without a cache.
Pros:
-
Principle of less surprise: keep plain GAP, Sage's
gapand Sage'slibgapconsistent; -
Follow the design decisions of GAP to take advantage of their expertise;
-
Supports loading packages and advertising their content (this support was postponed to a later ticket in Libgap tab completion #19917);
-
No need any more to maintain in Sage a list of "important" GAP functions.
-
With libgap, fetching the list of global GAP symbols is quasi instantaneous:
sage: %time a = [str(x) for x in libgap.NamesSystemGVars()] CPU times: user 21.2 ms, sys: 0 ns, total: 21.2 ms Wall time: 20.9 msHence the implementation is simple; we need not worry about caching, invalidating the cache upon loading packages, ...
Con:
- This makes for a larger tab completion list
CC: @vbraun @tscrim @dimpase @embray
Component: interfaces
Keywords: gap libgap
Issue created by migration from https://trac.sagemath.org/ticket/27923