Closed fare closed 2 months ago
e.g. I just used ##vector-set
that we should definitely export somewhere (probably in :gerbil/gambit
if not in <core>
).
proper-list?
isn't exported, I had to use ##proper-list?
@chiefnoah Do you want to assign this issue to yourself? Should be a nice and easy way to slip into deeper maintainership.
Sure, I'd like some direction on how we want to approach this though :slightly_smiling_face:
I would like a test in src/gerbil/test
that would (1) collect a list of symbols from gambit, (2) collect a list of symbols from a set of modules, filtered by whether they are bound to a direct gambit symbol, (3) append a list of "do not export" symbols, (4) compute the difference.
Note that in this case, vector-set
is available without ##
in gsi
(in upstream gambit) and in gxi
, but not from gxc
. We should focus on the symbols available without ##
first.
Ok, I think I have some infrastructure to do this set up, what modules should we be looking at?
I suppose all the modules loaded when your gerbil process is started—visible somehow by introspection, I presume—or else by looking at the source for what the runtime, prelude, expander and compiler define. Presumably only the runtime and prelude import things from Gambit.
^ @vyzo can you advise on whether there is introspection available for what modules exist? Maybe through the __*modules*
variable defined in runtime/eval.ss
?
And if not, what we should be looking at beside the (module ...)
forms in prelude/core.ss
It does not mark exports in any way, and honestly this should not be a runtime check at all!
I think the right way yo do it is to have a tool (part of the future linter perhaps) that reads and expands gerbil core/gambit, finds the runtime symbols and pethaps uses appropos or gambit's global variable table.
Note that the runtime modules are slated for some refactoring in the near future.
this is done now, all symbols from gambit.sld are part of the runtime exports.
... or explicity mark symbols for non-reexport, as appropriate.
This way, when Gambit changes its set of provided identifiers, we will know and take action.