rhombus doesn't show all its exports and imports?
greghendershott opened this issue · comments
A recent discourse thread started with me asking about completion candidates for #lang rhombus
(I had forgotten how my own racket-xp-mode
gives a union of imports from all submodules, even configure-runtime
. Doh. Fortunately pdb
is already smarter in this regard.)
So that thread started off with me being a bit of a dunce. However, as I dug in more I realized that:
- rhombus doesn't seem to show all its exports in fully-expanded code.
- rhombus uses for prefixed imports "portal" syntax with AFAICT no documented grammar.
Knowing about all exports and imports matters for finding definitions and references -- basic provenance and relations (also completion candidates, but that's the least of it).
I thought the idea with Racket langs is that they expand to a documented grammar for fully-expanded programs, which includes information about exports and imports. That is the premise of this library.
Sure, I've had to submit a few PRs to racket, to preserve srcloc for identifiers, or to add syntax-properties to reveal the provenances of exported/imported identifiers composed from multiple other identifiers. But at least those composed identifiers were shown as exported/imported.
And sure, I realize that programs can smuggle in anything via dynamic-require
, and things built upon it like lazy-require
or rackunit
's require/expose
. But I figured that if programs do hacks like that, and it's invisible to pdb
, that's probably understandable and acceptable to users.
What I didn't expect is a major #lang
to be opaque, seemingly on purpose?
Maybe the status quo is only because rhombus is a prototype? Maybe the fully-expanded grammar will be updated and/or other mechanisms supplied?
Meanwhile I don't see how to proceed.
(In fact this feels pretty discouraging; pdb
has been a long slog, and now it seems like the end isn't in sight after all.)