REPL mode to avoid re-loading from source
Closed this issue · 3 comments
This could especially be useful when loading with types, as it can easily take seconds to load even a small program if we need type information.
We could have something like readline:
$ gogrep -repl
> -x expr
[...]
> -x expr -g expr_with_types
[...]
> ^D
$
This seems like it might be the start of a slippery slope to me. If the problem is that it's too slow to gain access to type information, then maybe there's another way of fixing that (for example with some kind of persistent service that can be used to query type info and can be reused for other tools).
Yeah, that's another route. I would prefer caching on disk, similar to $GOPATH/pkg
. I believe @dominikh is working on something like that, so maybe I could piggyback on that in the future. Not looking forward to implementing this on my own if someone else is already working on it, to be honest.
Either way, you're right, this is a sloppy workaround.
Yes, I will eventually (within a couple months) release a loader implementation that uses disk-based caching.