coffee> client.lsSessions (err, result) -> console.log result
{ id: 'D554DFD6-8014-40D9-A298-F33F41AD6DF5',
op: 'ls-sessions' }
coffee> [ { id: 'D554DFD6-8014-40D9-A298-F33F41AD6DF5',
session: 'c915cda9-ab75-4445-95a0-66bf7027e661',
sessions: [],
status: [ 'done' ] } ]
undefined
coffee> client.eval "(println (range 100))", 'cljs.user', 'c915cda9-ab75-4445-95a0-66bf7027e661', (err, result) -> console.log err, result
send chunk: { op: 'eval',
code: '(println (range 100))',
ns: 'cljs.user',
session: 'c915cda9-ab75-4445-95a0-66bf7027e661',
id: undefined,
eval: undefined }
{ id: 'B4E0DE55-E082-41C2-9AC7-62692CAEAF03',
op: 'eval',
code: '(println (range 100))',
ns: 'cljs.user',
session: 'c915cda9-ab75-4445-95a0-66bf7027e661' }
coffee> null [ { id: 'B4E0DE55-E082-41C2-9AC7-62692CAEAF03',
session: 'c915cda9-ab75-4445-95a0-66bf7027e661',
status: [ 'done', 'unknown-session', 'error' ] } ]
I got some trouble understanding "session" in nREPL.
I copied session
value from last response, as my session argument
however it kept telling me "unknown-session"
If you want to use a session, you need to create one first
clone one..
got
=>> coffee client.coffee
send chunk: { op: 'eval',
code: '(println a)',
ns: 'user',
session: '6d931230-e646-4ba8-aef5-85127d3e9ff4',
id: undefined,
eval: undefined }
eval null [ { err:
'SyntaxError: Unexpected token .\n at <http://192.168.1.196:7000//cljs-runtime/shadow.cljs.devtools.client.browser.js:823:13\n> at Object.shadow$cljs$devtools$client$env$repl_call [as repl_call] (<http://192.168.1.196:7000//cljs-runtime/shadow.cljs.devtools.client.env.js:141:108>)\n at Object.shadow$cljs$devtools$client$browser$repl_invoke [as repl_invoke] (<http://192.168.1.196:7000//cljs-runtime/shadow.cljs.devtools.client.browser.js:821:46>)\n at shadow$cljs$devtools$client$browser$handle_message (<http://192.168.1.196:7000//cljs-runtime/shadow.cljs.devtools.client.browser.js:901:44>)\n at Object.shadow$cljs$devtools$client$env$process_ws_msg [as process_ws_msg] (<http://192.168.1.196:7000//cljs-runtime/shadow.cljs.devtools.client.env.js:261:102>)\n at WebSocket.<anonymous> (<http://192.168.1.196:7000//cljs-runtime/shadow.cljs.devtools.client.browser.js:1000:40>)',
id: '177DD78E-6ED6-4105-BA7A-05BDDE95F7C0',
session: '6d931230-e646-4ba8-aef5-85127d3e9ff4' },
{ id: '177DD78E-6ED6-4105-BA7A-05BDDE95F7C0',
session: '6d931230-e646-4ba8-aef5-85127d3e9ff4',
status: [ 'done' ] } ]
how about this error?
I don't know why it has syntax errors...
....probably caused by shadow-cljs.. will look into that. thx.