~technomancy/fennel#91: 
,complete command is finicky

I've noticed that not all locals are being available to the ,complete command.

For example:

Welcome to Fennel 1.0.0-dev on Lua 5.4!
Use ,help to see available commands.
>> (local lazy (require :lazy-seq))
nil
>> ,complete l
lua	length	local	let	lshift	lambda	load	loadfile
>> ,complete la
lambda

I can't figure out what's causing it, but some times it just works, and some times it don't.

Welcome to Fennel 1.0.0-dev on Lua 5.4!
Use ,help to see available commands.
>> (local {: map : filter &as lazy} (require :lazy-seq))
nil
>> ,complete m
macros	macrodebug	macro	match	map	math
>> ,complete f
fn	for	filter
>> ,complete l
lua	length	let	lshift	local	lambda	loadfile	load
>> (local {: map : filter : doall &as lazy} (require :lazy-seq))
nil
>> ,complete do
doc	do	doto	dofile

For example, this time there was map and filter, but no lazy and doall

Status
RESOLVED FIXED
Submitter
~andreyorst
Assigned to
No-one
Submitted
a month ago
Updated
27 days ago
Labels
No labels applied.

~technomancy a month ago

This is very likely to be the same problem as #85. I haven't merged that fix to main yet. Do you have this problem on the new-locals-saving branch?

~andreyorst a month ago*

yes, the outputs up there are from that branch, I think I saw this on main branch as well though, but testing it now shows no issue on main. It's a bit weird, as I surely remember encountering it before

~technomancy a month ago

I see; thanks for the clarification. So in this case the repl can successfully see the locals; it's just the completion doesn't see them? And it happens to the same kind of modules as the other bug?

~andreyorst a month ago

So in this case the repl can successfully see the locals; it's just the completion doesn't see them?

Yes, seems like it.

And it happens to the same kind of modules as the other bug?

Yes, tested on the same module as in #85:

Welcome to Fennel 1.0.0-dev on Lua 5.4!
Use ,help to see available commands.
>> (local {: foo &as bug} (require :bug))
nil
>> ,complete f
for	fn
>> ,complete b
bor	bnot	bxor	band

After a bit more testing on main I wasn't able to reproduce it. Perhpaps it was fixed indirectly in some commit on main branch, so yeah, this is all on new-locals-saving

~andreyorst a month ago

I remember now - it was the opposite on the main branch: complete knew about the symbol, but the REPL was unable resolve it. Sorry for mixing up

~technomancy REPORTED FIXED 27 days ago

I ended up not merging this branch; this problem does not seem to manifest on the original implementation.

Register here or Log in to comment, or comment via email.