The default bug view has changed. See this FAQ.

GCLI REPL syntax should default to JS code

RESOLVED DUPLICATE of bug 717978

Status

()

Firefox
Developer Tools: Console
RESOLVED DUPLICATE of bug 717978
5 years ago
5 years ago

People

(Reporter: dherman, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
The new GCLI in Nightly requires you to prefix JS code with a '{' character. I spent a while trying to figure out how to evaluate the number 3. Non of the following worked:

    3
    { 3
    { 3 }

Whereas the following do:

    { 3; }
    { +3
    {(3)}

All REPLs/consoles I've seen in history default to JS code, and provide special REPL commands with a special syntax that is syntactically invalid in the language being evaluated. For example, the Node.js repl would expect

    .console
    .echo
    .help
    .inspect

Other REPL's I've seen use a colon:

    :console
    :echo
    :help
    :inspect

Either way would work fine for JS, since they're both syntactically invalid ways to start the Program non-terminal.

Having new special commands in the console is great, but it's got the defaults wrong.

Dave

Comment 1

5 years ago
This is epically cryptic. We should definitely match what other REPLs like Node do.
(Reporter)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 717978

Comment 3

5 years ago
The current plan is to turn GCLI back off in the Web Console (before the next Aurora). The feedback we've been getting in Nightly has been helpful.

GCLI will come back in a new developer toolbar (bug 717915).

I would point you to the bug to pref off GCLI, but I can't find it at the moment (perhaps it doesn't exist yet).

You can set devtools.gcli.enable to false right now to restore the JS entry behavior.
You need to log in before you can comment on or make changes to this bug.