calva

pez 2025-05-08T07:26:45.217849Z

Dear Calva friends. Backseat Driver https://github.com/BetterThanTomorrow/calva-backseat-driver/releases/tag/v0.0.6 • Fix: https://github.com/BetterThanTomorrow/calva-backseat-driver/issues/5 Turns out the Cursor is using an older VS Code engine than this extension was depending on. calva

pez 2025-05-08T13:17:38.463999Z

Dear Calva friends: Backseat Driver https://github.com/BetterThanTomorrow/calva-backseat-driver/releases/tag/v0.0.7https://github.com/BetterThanTomorrow/calva-backseat-driver/issues/6 This tool hopefully will help the AI assistant to give you code that doesn’t break the structure with unbalanced brackets. And when it does, help it to heal the structure. curly_brace calva

2025-05-08T17:22:12.683779Z

I have sometimes my repl in a kind of "weired" state, in which all code evaluatins print "nothing", empty string. No error shown anywehre. I was not able to get out of this, even vscode restart did not fix it. Somehow I recovered, but never noticed what I "fixed" to recover. I finally noticed it. It seems to happen when I have an invalid "ns" expression in a clojure file:

(ns stuff.migrate
  [datomic.client.api :as d]
  )

2025-05-08T17:28:00.158149Z

Clearly re-producible. Having above ns declaration and re-jackin brings me in this strange state. When I am in this state code evaluations "seem" to work (no eror is shown), but they seem to result to an "empty string" So my repl window looks like this:

2025-05-08T17:29:04.732939Z

Each "code evaluation" just prints a new line in the repl window only showing the ns, but "No result"

2025-05-08T17:33:30.446229Z

To get out of it requires: 1. Fix ns declaratation 2. re-jackin (just re-eval the fixed ns declaration is not enough)

2025-05-13T17:49:34.802589Z

:require is missing....

pez 2025-05-13T18:14:38.883109Z

Haha. Lol. No kidding I was tired.

2025-05-13T18:19:30.936949Z

It took me as well a while to "see it". That's why I was a bit annoid by the "bug".... Calva / clj-kondo did not complain neither.

pez 2025-05-13T18:24:14.766499Z

Kondo complains when I try it.

pez 2025-05-13T18:30:18.892019Z

Calva complains when loading the namespace. Also the way to fix the namespace is to fix the ns form and run the command Calva: Load/Evaluate Current File and its Requires/Dependencies

pez 2025-05-13T18:31:46.667889Z

I think it is a bug in Calva to not give more clues when evaluating things when in this state. The nrepl log shows that we do get noticed that there is something wrong:

1747160858194 -> sent 
{
  id: '13',
  op: 'eval',
  ns: 'mini.foo',
  session: '87553b2a-389a-4dd3-896a-761d4abaa6df',
  code: '"foo"',
  file: '/var/folders/4w/bbbrdjb536z9tmsvmxk80c180000gn/T/betterthantomorrow.calva/ao9ee/src/mini/foo.clj',
  line: 5,
  column: 1,
  pprint: true
}

1747160858206 <- received 12ms
{
  id: '13',
  ns: 'mini.foo',
  session: '87553b2a-389a-4dd3-896a-761d4abaa6df',
  status: [ 'namespace-not-found', 'done', 'error' ]
}

1747160858207 <- received 1ms
{
  id: '13',
  session: '87553b2a-389a-4dd3-896a-761d4abaa6df',
  status: [ 'done' ]
}
Issue welcome.

2025-05-11T20:26:26.602149Z

@pez Is this a bug ?

pez 2025-05-11T20:32:14.669129Z

Sorry, have forgot to thank you for this report. Thanks! It’s clearly not optimal Ux. Behaviour in Clojure is a bit undefined when the ns isn’t properly created before used. I’m a bit tired here, help me understand what is invalid with that ns declaration, please?