Open btwiuse opened 2 years ago
I did a grep on the source tree, found 5 occurrences of throw_on_side_effect
, and 4 of them are set to None
by default
$ git grep throw_on_side_effect:
cli/cdp.rs: pub throw_on_side_effect: Option<bool>,
cli/cdp.rs: pub throw_on_side_effect: Option<bool>,
cli/tools/repl/editor.rs: throw_on_side_effect: Some(true),
cli/tools/repl/session.rs: throw_on_side_effect: None
cli/tools/repl/session.rs: throw_on_side_effect: None,
cli/tools/repl/session.rs: throw_on_side_effect: None
cli/tools/repl/session.rs: throw_on_side_effect: None,
Is there any special reason why it is set to Some(true)
in cli/tools/repl/editor.rs ?
Hi, I'm building a online repl playground called Subshell for the deno.land/x/polkadot library using deno, but found some issue with tab completion functionality in deno repl, and added a small patch to fix that.
However I'm not sure if there are better ways to do it.
Steps to reproduce:
First save the following snippet to
tini.ts
:Then start a repl using tini.ts as eval-file. Pressing tab(s) on the following input doesn't show any completion:
(The equivalent code in Node.js will give such output:)
And after some trial and error, I have located the relevant bit in deno's source tree that causes the problem.
By changing this line from
https://github.com/denoland/deno/blob/8d82ba729937baf83011354242cabc3d50c13dc2/cli/tools/repl/editor.rs#L132
to
tab completion will work again:
I'm wondering if we can safely disable
throw_on_side_effect
in deno by default, so I don't have to maintain a separate fork. Or should there be a command line switch allowing people to disable this flag?