Fork me on GitHub
#calva
<
2023-02-08
>
Thierry11:02:35

Does anyone else experience your cursor moving back to the start of an indented line while typing causing your code to be malformed? This is on Windows 11 with VSCode.

pez13:02:17

Not seen that one before. Can it be some other extension in play?

Thierry13:02:40

Could be, dunno which but would need to find out how to check this

pez13:02:01

There is an extension bisect item in the meatballs menu of the Extensions pane.

Thierry13:02:37

thanks for the tip, will have a go at tjat

pez13:02:25

A faster way could be to install VS Code Insiders and then only Calva there.

Thierry15:02:23

Well thats shite

Thierry15:02:16

as outcome i mean

Thierry15:02:21

was hoping it wasnt calva

pez15:02:39

Haha, I didn't expect that. Does it misbehave if you use only Calva?

Thierry15:02:49

gonna try that now

Thierry15:02:12

well thats annoying, no reload with this extension only option hehe

Thierry15:02:37

@U0ETXRFEW yes, it misbehaves

pez15:02:10

> no reload with this extension only option That's why I suggested using VS Code Insiders.

pez15:02:26

I want you to try VS Code Insiders anyway. To rule out that it is about a borked VS Code install.

Thierry15:02:31

running extensions (cant disable the others)

Thierry15:02:15

It doesn't happen in the repl file (not jacked in) but does in a file thats excluded from kondo and ls

pez15:02:43

Interesting...

pez15:02:49

Could it be lsp anyway...

Thierry15:02:49

let me try some more files

Thierry15:02:30

seems like its to do with the indenteer

pez15:02:03

Yeah, could be. How do you figure it seems like it?

Thierry15:02:32

I see the cursor jump to an indented position, I type quite fast so maybe im faster then the indenter?

pez15:02:22

What's your setting for the ”use new indent engine”?

Thierry15:02:35

that was on just now

Thierry15:02:39

just flicked it off

Thierry15:02:11

then the typing starts at the beginning of the line instead of indented but jumps ahead instead of back

pez15:02:50

Try with clojure-lsp off?

pez15:02:47

Tried with Insiders yet?

Thierry15:02:58

need to download it first

Thierry15:02:02

with lsp stopped, still happens

🙏 2
Thierry15:02:10

will dl insiders first and report back

pez15:02:23

> I type quite fast Try typing slowly.

Thierry15:02:00

still happens :melting_face:

Thierry15:02:08

it only happens in a comment block

Thierry15:02:27

tried outside of a comment block and no issues

Thierry15:02:36

:man-facepalming:

Thierry15:02:13

thats probably why its not happening in other files. in my code dump where i type test code i put everything in comment blocks 😁

Thierry15:02:47

ah dammit, spoke too soon

Thierry16:02:04

will try with insiders build tomorrow, have to go now. thanks for now @U0ETXRFEW!

🙏 2
pez16:02:32

comment block as in (comment ...)?

Thierry16:02:57

aye, but when I turn the treat comment block ending parentheses thing of it happens outside too. maybe better to try with the insiders build and then try to find the source of it

pez16:02:51

Very, very strange all of it. Also strange that that comment setting would have any effect on this. Did you switch back to the new indent engine?

phill22:02:44

In Linux the keys I type get scattered in this way if I type too fast when using Calva. It feels related to the issue that if I backspace too fast (over parentheses, brackets, or braces) the file gets imbalanced.

pez23:02:03

That's awful! I wonder what could be going on. Tried quite a lot now to reproduce it, but I can't type fast enough it seems. Has it been like this for long, @U0HG4EHMH, or has it started happening lately?

Thierry07:02:00

I am using the Insider version now as I start my work day. I'll keep you informed of my findings

Thierry07:02:26

Okay, so I just noticed its still there but also outside a comment block. It happens when inside parens as the cursor gets lined out with the correct indentation. I was jacked-in and my project was running, plus I had enabled 2 extra extensions which I will disable now and test again.

pez07:02:19

Thanks. Seems this is the real thing. Please file an issue.

Thierry07:02:00

I will, just checking if returns after disabling these 2 extensions

Thierry07:02:21

Just noticed it did, will file an issue

Thierry07:02:30

need to get some work done:melting_face:

pez09:02:01

Here's a VSIX that might fix the issue. • https://output.circle-artifacts.com/output/job/85547ee0-bd5b-46a3-abc9-d94c3af6fb3f/artifacts/0/tmp/artifacts/calva-2.0.332-pez-displaced-edits-d857a819.vsix I can't reproduce the issue on my computer, so help from people who see the issue is super appreciated. 🙏

Thierry09:02:09

yes will try now

❤️ 2
Thierry09:02:16

Installed, will report back

Thierry09:02:45

still happens, but only in a comment block?

Thierry09:02:09

:melting_face:

pez09:02:40

Only in a comment block... That's pretty extra strange. So in some other form it does not happen?

Thierry09:02:56

ill do some more tests, have to go in a meeting now

pez09:02:18

What are your settings for: • new indent engine • special comment form treatment

Thierry10:02:38

and new indent engine is on aswell

pez10:02:03

New VSIX, with a blind attempt to await a promise + some debug logging. It will log out some relevant configuration parameters in the VS Code Developer console. These log entries include Issue #2071 to make them easier to find.: • https://output.circle-artifacts.com/output/job/0a6b5b3e-d293-4eb0-910f-ebaf1ce38900/artifacts/0/tmp/artifacts/calva-2.0.332-pez-displaced-edits-04faf37b.vsix

Thierry10:02:35

Just installed, will report

Thierry11:02:43

Still happens in a comment, not outside a comment but! I just noticed it's doing this in files that are outside my main project folder. At first I thought it was because I exclude files/folders in a config.edn for kondo and a config.edn for lsp, but it didnt happen after creating a clojure file inside an excluded folder inside my main project folder. I then proceeded to create a new clojure file in a folder outside my main project folder and it still didnt happen in- or outside a comment... damn. So back to the file where it did happen and viewing the developer tools, here's the error message:

console.ts:137 [Extension Host] No ns form found.
log.ts:313   ERR Cannot read properties of undefined (reading 'catch'): TypeError: Cannot read properties of undefined (reading 'catch')
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-d857a819\out\extension.js:2:543928
	at Generator.next (<anonymous>)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-d857a819\out\extension.js:2:542120
	at new Promise (<anonymous>)
	at l (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-d857a819\out\extension.js:2:541865)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-d857a819\out\extension.js:2:543827
	at e.default.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-d857a819\out\extension.js:2:544203)
	at Generator.next (<anonymous>)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-d857a819\out\extension.js:2:542120
	at new Promise (<anonymous>)
	at l (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-d857a819\out\extension.js:2:541865)
	at e.default.provideCompletionItems (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-d857a819\out\extension.js:2:543759)
	at te.provideCompletionItems (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:51894)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:77036
	at Z._withAdapter (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:67207)
	at Z.$provideCompletionItems (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:77011)
	at o._doInvokeHandler (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:13691)
	at o._invokeHandler (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:13373)
	at o._receiveRequest (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:12092)
	at o._receiveOneMessage (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:10845)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:8952
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at c.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:19006)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:17079
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at c.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:19006)
	at i._receiveMessage (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:23593)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:21127
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at p.acceptChunk (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:15837)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:14967
	at Socket.l (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:26303)
	at Socket.emit (node:events:390:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Socket.Readable.push (node:internal/streams/readable:228:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)

Thierry11:02:12

This is thrown the moment the cursor jumps back

Thierry11:02:39

And I just noticed its the wrong version

Thierry11:02:45

weird, I did install the newer one

Thierry11:02:48

going to do that again

Thierry11:02:28

Startup error:

mainThreadExtensionService.ts:80 TypeError: Cannot read properties of null (reading '1')
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:569085
	at ChildProcess.exithandler (node:child_process:397:7)
	at ChildProcess.emit (node:events:390:28)
	at maybeClose (node:internal/child_process:1064:16)
	at Socket.<anonymous> (node:internal/child_process:450:11)
	at Socket.emit (node:events:390:28)
	at Pipe.<anonymous> (node:net:687:12)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:80
_doInvokeHandler @ rpcProtocol.ts:455
_invokeHandler @ rpcProtocol.ts:440
_receiveRequest @ rpcProtocol.ts:370
_receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
fire @ ipc.net.ts:638
_receiveMessage @ ipc.net.ts:959
(anonymous) @ ipc.net.ts:832
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
acceptChunk @ ipc.net.ts:382
(anonymous) @ ipc.net.ts:338
E @ ipc.net.ts:70
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199
console.ts:137 [Extension Host] Latest deps.clj.jar version: v1.11.1.1208

Thierry11:02:09

@U0ETXRFEW Same error the moment the cursor jumps:

ERR Cannot read properties of undefined (reading 'catch'): TypeError: Cannot read properties of undefined (reading 'catch')
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544276
	at Generator.next (<anonymous>)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:542468
	at new Promise (<anonymous>)
	at l (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:542213)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544175
	at e.default.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544551)
	at Generator.next (<anonymous>)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:542468
	at new Promise (<anonymous>)
	at l (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:542213)
	at e.default.provideCompletionItems (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544107)
	at te.provideCompletionItems (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:51894)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:77036
	at Z._withAdapter (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:67207)
	at Z.$provideCompletionItems (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:77011)
	at o._doInvokeHandler (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:13691)
	at o._invokeHandler (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:13373)
	at o._receiveRequest (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:12092)
	at o._receiveOneMessage (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:10845)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:8952
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at c.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:19006)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:17079
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at c.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:19006)
	at i._receiveMessage (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:23593)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:21127
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at p.acceptChunk (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:15837)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:14967
	at Socket.l (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:26303)
	at Socket.emit (node:events:390:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Socket.Readable.push (node:internal/streams/readable:228:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)

pez12:02:21

Thanks! This is great feedback. Can you also paste the debug messages with Issue #2071?

Thierry12:02:47

as comment? sure

pez12:02:06

I don't see it. 😃 In the console you should find debug messages ”tagged” Issue #2071. I'd like to have those so that we can see what settings are active, together with the various test reports you provide.

Thierry12:02:33

Not seeing them? If I search for 2071 nothing comes up

pez12:02:46

Makes me wonder if I pasted the right VSIX link...

Thierry12:02:05

this one? calva-2.0.332-pez-displaced-edits-04faf37b.vsix

pez12:02:35

That's the right commit... The log should include stuff like:

deps.edn launcher check, executing: 'clojure --version' ...
extensionHostProcess.js:100
Current deps.clj.jar version: v1.11.1.1208
extensionHostProcess.js:100
Issue #2071: languageConfiguration {onEnterRules: Array(0)}
Issue #2071: formatOnType? true
extensionHostProcess.js:100
Issue #2071: newIndentEngine? true
extensionHostProcess.js:100
Calva activate END
extensionHostProcess.js:100
deps.edn launcher check - 'clojure --version' - stdout: Clojure CLI version 1.11.1.1208

Thierry12:02:09

okay let me reload my window

Thierry12:02:42

ah there it is, its in the start of the log

metal 2
Thierry12:02:21

WARN [redhat.vscode-yaml]: Cannot register 'redhat.telemetry.enabled'. This property is already registered.
TMScopeRegistry.ts:47 Overwriting grammar scope name to file mapping for scope source.clojure.
Old grammar file: file:///f%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/clojure/syntaxes/clojure.tmLanguage.json.
New grammar file: file:///c%3A/Users/thier/.vscode/extensions/betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b/clojure.tmLanguage.json
register @ TMScopeRegistry.ts:47
A @ TMGrammarFactory.ts:73
_getOrCreateGrammarFactory @ abstractTextMateService.ts:240
await in _getOrCreateGrammarFactory (async)
createTokenizationSupport @ abstractTextMateService.ts:264
_create @ tokenizationRegistry.ts:146
resolve @ tokenizationRegistry.ts:140
getOrCreate @ tokenizationRegistry.ts:72
(anonymous) @ abstractTextMateService.ts:165
_handle @ extensionsRegistry.ts:143
acceptUsers @ extensionsRegistry.ts:134
_handleExtensionPoint @ abstractExtensionService.ts:1259
_doHandleExtensionPoints @ abstractExtensionService.ts:1193
_startLocalExtensionHost @ electronExtensionService.ts:592
await in _startLocalExtensionHost (async)
_scanAndHandleExtensions @ electronExtensionService.ts:554
_initialize @ abstractExtensionService.ts:755
await in _initialize (async)
(anonymous) @ electronExtensionService.ts:115
requestIdleCallback (async)
e.runWhenIdle @ async.ts:1148
(anonymous) @ electronExtensionService.ts:114
Promise.then (async)
Gc @ electronExtensionService.ts:112
I @ sandboxExtensionService.ts:12
_createInstance @ instantiationService.ts:110
_createServiceInstance @ instantiationService.ts:230
_createServiceInstanceWithOwner @ instantiationService.ts:219
_createAndCacheServiceInstance @ instantiationService.ts:208
_safeCreateAndCacheServiceInstance @ instantiationService.ts:151
_getOrCreateServiceInstance @ instantiationService.ts:135
_createInstance @ instantiationService.ts:88
createInstance @ instantiationService.ts:76
acquireInstantiationService @ configurationService.ts:487
(anonymous) @ workbench.ts:211
invokeFunction @ instantiationService.ts:61
initServices @ workbench.ts:205
startup @ workbench.ts:139
open @ desktop.main.ts:121
await in open (async)
Z @ desktop.main.ts:392
m.load.configureDeveloperSettings @ workbench.js:32
(anonymous) @ bootstrap-window.js:181
o._invokeFactory @ loader.js:1199
o.complete @ loader.js:1209
o._onModuleComplete @ loader.js:1839
o._onModuleComplete @ loader.js:1851
o._resolve @ loader.js:1796
o.defineModule @ loader.js:1439
y @ loader.js:1889
define @ loader.js:1965
(anonymous) @ workbench.common.main.ts:144
(anonymous) @ fake:1
TMScopeRegistry.ts:47 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///f%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///c%3A/Users/thier/.vscode/extensions/redhat.vscode-yaml-1.11.0/syntaxes/yaml.tmLanguage.json
register @ TMScopeRegistry.ts:47
A @ TMGrammarFactory.ts:73
_getOrCreateGrammarFactory @ abstractTextMateService.ts:240
await in _getOrCreateGrammarFactory (async)
createTokenizationSupport @ abstractTextMateService.ts:264
_create @ tokenizationRegistry.ts:146
resolve @ tokenizationRegistry.ts:140
getOrCreate @ tokenizationRegistry.ts:72
(anonymous) @ abstractTextMateService.ts:165
_handle @ extensionsRegistry.ts:143
acceptUsers @ extensionsRegistry.ts:134
_handleExtensionPoint @ abstractExtensionService.ts:1259
_doHandleExtensionPoints @ abstractExtensionService.ts:1193
_startLocalExtensionHost @ electronExtensionService.ts:592
await in _startLocalExtensionHost (async)
_scanAndHandleExtensions @ electronExtensionService.ts:554
_initialize @ abstractExtensionService.ts:755
await in _initialize (async)
(anonymous) @ electronExtensionService.ts:115
requestIdleCallback (async)
e.runWhenIdle @ async.ts:1148
(anonymous) @ electronExtensionService.ts:114
Promise.then (async)
Gc @ electronExtensionService.ts:112
I @ sandboxExtensionService.ts:12
_createInstance @ instantiationService.ts:110
_createServiceInstance @ instantiationService.ts:230
_createServiceInstanceWithOwner @ instantiationService.ts:219
_createAndCacheServiceInstance @ instantiationService.ts:208
_safeCreateAndCacheServiceInstance @ instantiationService.ts:151
_getOrCreateServiceInstance @ instantiationService.ts:135
_createInstance @ instantiationService.ts:88
createInstance @ instantiationService.ts:76
acquireInstantiationService @ configurationService.ts:487
(anonymous) @ workbench.ts:211
invokeFunction @ instantiationService.ts:61
initServices @ workbench.ts:205
startup @ workbench.ts:139
open @ desktop.main.ts:121
await in open (async)
Z @ desktop.main.ts:392
m.load.configureDeveloperSettings @ workbench.js:32
(anonymous) @ bootstrap-window.js:181
o._invokeFactory @ loader.js:1199
o.complete @ loader.js:1209
o._onModuleComplete @ loader.js:1839
o._onModuleComplete @ loader.js:1851
o._resolve @ loader.js:1796
o.defineModule @ loader.js:1439
y @ loader.js:1889
define @ loader.js:1965
(anonymous) @ workbench.common.main.ts:144
(anonymous) @ fake:1
log.ts:313   ERR [Extension Host] (node:22040) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `Code --trace-warnings ...` to show where the warning was created)
console.ts:137 [Extension Host] (node:22040) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `Code --trace-warnings ...` to show where the warning was created)
I @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:455
_invokeHandler @ rpcProtocol.ts:440
_receiveRequest @ rpcProtocol.ts:370
_receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
fire @ ipc.net.ts:638
_receiveMessage @ ipc.net.ts:959
(anonymous) @ ipc.net.ts:832
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
acceptChunk @ ipc.net.ts:382
(anonymous) @ ipc.net.ts:338
E @ ipc.net.ts:70
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199
log.ts:313   ERR [Extension Host] (node:22040) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
console.ts:137 [Extension Host] (node:22040) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
I @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:455
_invokeHandler @ rpcProtocol.ts:440
_receiveRequest @ rpcProtocol.ts:370
_receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
fire @ ipc.net.ts:638
_receiveMessage @ ipc.net.ts:959
(anonymous) @ ipc.net.ts:832
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
acceptChunk @ ipc.net.ts:382
(anonymous) @ ipc.net.ts:338
E @ ipc.net.ts:70
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199
console.ts:137 [Extension Host] Calva activate START
console.ts:137 [Extension Host] Creating new LSP client using file:///d%3A/thier/Documents/GoogleDrive-Thorax/Dev/aorta-develop as the project root
console.ts:137 [Extension Host] No user config.edn found
log.ts:313   ERR [Extension Host] Could not read clojure-lsp version file. ENOENT: no such file or directory, open 'c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\clojure-lsp-version'
console.ts:137 [Extension Host] Could not read clojure-lsp version file. ENOENT: no such file or directory, open 'c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\clojure-lsp-version'

Thierry12:02:27

[Extension Host] deps.edn launcher check, executing: 'clojure --version' ...
console.ts:137 [Extension Host] Current deps.clj.jar version: v1.11.1.1208
console.ts:137 [Extension Host] Issue #2071: languageConfiguration {onEnterRules: Array(0)}
console.ts:137 [Extension Host] Issue #2071: formatOnType? true
console.ts:137 [Extension Host] Issue #2071: newIndentEngine? true
console.ts:137 [Extension Host] Calva activate END
console.ts:137 [Extension Host] deps.edn launcher check - 'clojure --version' - stdout: Clojure CLI version (deps.clj) 1.11.1.1208
console.ts:137 [Extension Host] deps.edn launcher check - 'clojure --version' - stderr: 
console.ts:137 [Extension Host] deps.edn launcher check: 'clojure --version' command works, using 'clojure'
mainThreadExtensionService.ts:79 [[object Object]]Cannot read properties of null (reading '1')
$onExtensionRuntimeError @ mainThreadExtensionService.ts:79
_doInvokeHandler @ rpcProtocol.ts:455
_invokeHandler @ rpcProtocol.ts:440
_receiveRequest @ rpcProtocol.ts:370
_receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
fire @ ipc.net.ts:638
_receiveMessage @ ipc.net.ts:959
(anonymous) @ ipc.net.ts:832
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
acceptChunk @ ipc.net.ts:382
(anonymous) @ ipc.net.ts:338
E @ ipc.net.ts:70
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199
mainThreadExtensionService.ts:80 TypeError: Cannot read properties of null (reading '1')
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:569085
	at ChildProcess.exithandler (node:child_process:397:7)
	at ChildProcess.emit (node:events:390:28)
	at maybeClose (node:internal/child_process:1064:16)
	at Socket.<anonymous> (node:internal/child_process:450:11)
	at Socket.emit (node:events:390:28)
	at Pipe.<anonymous> (node:net:687:12)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:80
_doInvokeHandler @ rpcProtocol.ts:455
_invokeHandler @ rpcProtocol.ts:440
_receiveRequest @ rpcProtocol.ts:370
_receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
fire @ ipc.net.ts:638
_receiveMessage @ ipc.net.ts:959
(anonymous) @ ipc.net.ts:832
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
acceptChunk @ ipc.net.ts:382
(anonymous) @ ipc.net.ts:338
E @ ipc.net.ts:70
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199
console.ts:137 [Extension Host] Downloading clojure-lsp from 
console.ts:137 [Extension Host] Latest deps.clj.jar version: v1.11.1.1208
console.ts:137 [Extension Host] deps.clj.jar is up to date
console.ts:137 [Extension Host] Clojure-lsp artifact downloaded to c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\clojure-lsp-native-windows-amd64.zip
console.ts:137 [Extension Host] Unzipping file
console.ts:137 [Extension Host] Error downloading clojure-lsp. Error: ENOENT: no such file or directory, chmod 'c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\clojure-lsp'
semanticTokensProviderStyling.ts:108 Overlapping semantic tokens detected at lineNumber 28, column 1

Thierry12:02:58

thats the complete startup log

Thierry12:02:57

And this one while jacking in

ERR Cannot read properties of undefined (reading '0'): TypeError: Cannot read properties of undefined (reading '0')
	at e.currentTopLevelDefined (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:582742)
	at v (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:585360)
	at m (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:585467)
	at Object.e.currentContext (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:586537)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:549306
	at Generator.next (<anonymous>)
	at i (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:548076)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)

Thierry12:02:34

And this in the file the jump back occurs:

console.ts:137 [Extension Host] No ns form found.

pez12:02:35

The jack-in one is interesting. And could explain ”only happens in comments”. Can you share a complete file where this happens?

Thierry12:02:36

It's a clj file that I use for code testing that I test in the repl, it doesnt contain a namespace name. I treat is at a text file with clojure code

Thierry12:02:57

let me find one without sensitive information

Thierry12:02:49

I have one, but for some reason the jump back doesnt seem to happen but the error produces is logged

Thierry12:02:22

just checking the info in it and will share it here

pez13:02:08

Here we go! 😃

pez13:02:19

I think this error:

ERR Cannot read properties of undefined (reading 'catch'): TypeError: Cannot read properties of undefined (reading 'catch')
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544276
	at Generator.next (<anonymous>)
Is related to that neither the REPL, nor lsp is not started and we don't handle the error of having no completion provider. > The moment the cursor jumps It could be ”The moment Calva tries to find completions”. You could test this by making sure clojure-lsp is running, and see if the error stops appearing then.

Thierry13:02:58

lsp is running, in my project.

pez13:02:23

Are we talking about the same error? It is not the same as this error:

ERR Cannot read properties of undefined (reading '0'): TypeError: Cannot read properties of undefined (reading '0')
	at e.currentTopLevelDefined (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:582742)

Thierry13:02:08

I dont know what you mean, lsp is running and started in my project.

Thierry13:02:29

I see more errors now:

console.ts:137 [Extension Host] No ns form found.
console.ts:137 [Extension Host] Failed to get results from completions provider 'lsp' Error: The request {:id 1917, :method "textDocument/completion"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)
log.ts:313   ERR [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 1931, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)
console.ts:137 [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 1931, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)
I @ console.ts:137
log.ts:313   ERR [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 2057, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)
console.ts:137 [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 2057, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)

pez13:02:03

It could be that the error I speculated was about clojure-lsp not running, is because clojure-lsp is having some problems, or Calva is not letting clojure-lsp finish, or something. This latest trace seems to say there is something up with this, at least.

pez13:02:44

In any case. I don't think these errors have something to do with the displaces edits. I could be wrong, but I also get these errors if I stop clojure-lsp, and the editing still behaves. I think an error that could have to do with the displaced edits is the one which includes:

Cannot read properties of undefined (reading '0')
	at e.currentTopLevelDefined 

Thierry14:02:29

can I do anything else here?

pez14:02:42

A mini-project where you can reproduce the displaced typing reliably would be awesome. Since it seems a bit tricky even for you to figure the repro out, it might not be a thing with yours or mine machine. So chances are I could repro it to with such a mini-project.

Thierry14:02:12

I will think about this and how to reproduce it

pez15:02:03

Other than that... I'll use your current info and logs to try remove as many errors from it as I can. So that we can at least get rid of the errors that are not related to the displaced errors. Should leave us with the ”right” errors and also a better Calva in general. So I might post a VSIX here now and then and you can help me test it. 😃

Thierry08:02:39

@U0ETXRFEW you are indeed correct about clojure-lsp not running while in the file that has these issues. I can see the clojure-lsp icon go from filled in dot to an open dot when switching tabs. from file inside project folder to file outside project folder. and on top of that clojure-lsp is excluding these folders in a setting.

Thierry08:02:59

I just started clojure-lsp inside the folder outside my main project folder and the issue is gone

Thierry08:02:35

so, can it be something to do with the parinfer when in a folder where clojure-lsp is not doing anything e.g. not started?

Thierry09:02:48

The moment I stop lsp inside the folder outside my project the issue returns

pez09:02:03

With the problem is gone, do you mean that you don't get any displaced edits in comment forms?

Thierry09:02:34

doing some more tests

Thierry09:02:40

to see if it is actually gone

pez09:02:42

Wow. What on earth could be going on...

Thierry09:02:45

or if i missed it

Thierry09:02:08

Out of 20 lines within parens it only jumped back once when lsp was started. Going to try with lsp disabled again

Thierry09:02:10

With lsp disabled I get these errors:

console.ts:137 [Extension Host] No ns form found.
log.ts:313   ERR Cannot read properties of undefined (reading 'catch'): TypeError: Cannot read properties of undefined (reading 'catch')
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544276
	at Generator.next (<anonymous>)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:542468
	at new Promise (<anonymous>)
	at l (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:542213)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544175
	at e.default.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544551)
	at Generator.next (<anonymous>)
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:542468
	at new Promise (<anonymous>)
	at l (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:542213)
	at e.default.provideCompletionItems (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:544107)
	at te.provideCompletionItems (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:51894)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:77036
	at Z._withAdapter (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:67207)
	at Z.$provideCompletionItems (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:77011)
	at o._doInvokeHandler (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:13691)
	at o._invokeHandler (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:13373)
	at o._receiveRequest (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:12092)
	at o._receiveOneMessage (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:10845)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:95:8952
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at c.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:19006)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:17079
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at c.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:19006)
	at i._receiveMessage (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:23593)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:21127
	at w.invoke (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:145)
	at b.deliver (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:2266)
	at p.fire (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:61:1844)
	at p.acceptChunk (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:15837)
	at f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:14967
	at Socket.l (f:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:69:26303)
	at Socket.emit (node:events:390:28)
	at addChunk (node:internal/streams/readable:315:12)
	at readableAddChunk (node:internal/streams/readable:289:9)
	at Socket.Readable.push (node:internal/streams/readable:228:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)
log.ts:313   ERR [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 60, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)
console.ts:137 [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 60, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)

Thierry09:02:05

with lsp enabled its these:

[Extension Host] Failed to get results from completions provider 'lsp' Error: The request {:id 33, :method "textDocument/completion"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)
3
console.ts:137 [Extension Host] No ns form found.
log.ts:313   ERR [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 64, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)
console.ts:137 [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 64, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)
log.ts:313   ERR [Extension Host] Definition lookup failed for provider 'lsp', is clojure-lsp running and configured correctly? Error: The request {:id 65, :method "textDocument/definition"} has been cancelled.
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656320
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656614
	at Immediate.<anonymous> (c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-04faf37b\out\extension.js:2:656976)
	at processImmediate (node:internal/timers:464:21)

pez09:02:39

At line 165 in the test file you provided, there is a symbol that cljfmt does not like java.util.Date/. I don't think it is related, but if you remove that symbol/fix it, do you still get the displacement edit errors?

Thierry09:02:34

ah i see indeed, its a typo

pez09:02:30

It's good that we have the typo. Good test case 😃

Thierry09:02:58

My guess is that its just a coincidence that theres that typo. But, these files I write test code in for running on the repl have more then 1 errors, which is why I disabled the check for these folders in lsp and kondo config

Thierry09:02:25

Ill see what happens when I remove them disablement from the configs

pez09:02:18

Since the problem seems to be there when no clojure-lsp is running, I think we should keep them disabled in config.

Thierry09:02:44

I agree, just to check if its indeed the disablement

Thierry09:02:17

Well there goes the neighbourhood haha, why I have them disabled:

😂 2
Thierry09:02:23

okay, installed

pez09:02:27

I can't reproduce the other error logs, so that will be trickier to fix. Not to mention the displacement errors....

Thierry09:02:53

Whate are these?

TypeError: Cannot read properties of null (reading '1')
	at c:\Users\thier\.vscode\extensions\betterthantomorrow.calva-2.0.332-pez-displaced-edits-eb11e612\out\extension.js:2:569092
	at ChildProcess.exithandler (node:child_process:397:7)
	at ChildProcess.emit (node:events:390:28)
	at maybeClose (node:internal/child_process:1064:16)
	at Socket.<anonymous> (node:internal/child_process:450:11)
	at Socket.emit (node:events:390:28)
	at Pipe.<anonymous> (node:net:687:12)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:80
_doInvokeHandler @ rpcProtocol.ts:455
_invokeHandler @ rpcProtocol.ts:440
_receiveRequest @ rpcProtocol.ts:370
_receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
fire @ ipc.net.ts:638
_receiveMessage @ ipc.net.ts:959
(anonymous) @ ipc.net.ts:832
invoke @ event.ts:622
deliver @ event.ts:824
fire @ event.ts:785
acceptChunk @ ipc.net.ts:382
(anonymous) @ ipc.net.ts:338
E @ ipc.net.ts:70
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199

Thierry09:02:59

thats after installing the new vsix

pez09:02:55

You had them before too. And I have no idea whatsoever. You might need to run Calva in development mode to get a better coordinate to where this happens.

Thierry09:02:37

okay, how?

pez09:02:59

1. Have nodejs and clojure CLI installed 2. Fork the repo and clone to your machine 3. Open the project in VS Code 4. Start the build task ctrl+shift+b and wait for all watchers to calm down 5. Start the development extension host F5

Thierry09:02:54

okay, little more then I bargained for, will do this when I have time.

🙏 2
pez09:02:28

You will want to checkout the branch where I am trying to fix this problem, so when you fork, select to fork all branches. (I think the default is to fork only the trunk.)

Thierry10:02:48

Haven't had time to test yet. Have been able to solve the issue with a work-around tho. The folder this file is in is outside my project workspace but added as extra folder in the .code-workspace file. I removed this addition from the .code-workspace file and added a symlink to this folder somewhere inside my main project folder and I then excluded this symlink from lsp and kondo in their config.edn's. No more rubberbanding!

Thierry10:02:32

Unfortunately Google-Drive:face_vomiting: where I store the project doesn't like symlinks somehow and crashes :melting_face:

Thierry11:02:41

@U0ETXRFEW I wonder whats going on. I have been trying different locations to put my folder with code note files and for some reason Calva keeps crashing. Now I can't even jack-in? INFO UNRESPONSIVE extension host: starting to profile NOW log.ts:307 WARN UNRESPONSIVE extension host: 'betterthantomorrow.calva' took 83% of 5149.085ms, saved PROFILE here: 'file:///c%3A/Users/thier/AppData/Local/Temp/exthost-697f52.cpuprofile'

Thierry11:02:57

Tried going back to a release version of Calva but thats no use

Thierry11:02:35

It started happening after I enabled Joyride (which worked and jackin did too) one folder up from my main project.

pez11:02:49

Ouch! See if it’s just your project or if it happens in some mini-project as well. And also check if it behaves like that in VS Code insiders.

Thierry11:02:51

Openened another project, in another folder that also does not include the large codenote folder and without joyride. same issue

Thierry11:02:28

going to try vscode insiders now

Thierry11:02:44

right, I might need to reinstall vscode. insiders build works fine, doesnt report this issue at all

pez11:02:40

Sadly VS Code accrues dirty state at times. Been seeing this all too often lately.

Thierry12:02:47

Insiders seems like 200% faster, but this could be me haha. I think I will just stay on Insiders, I really dig the mint coloured icon 👀

pez13:02:05

I doubt there is anything particularly faster with Insiders. Probably a reset of your regular VS Code would speed things up the same amount. But it's cool if you stay on Insiders. You'll be a canary in that coal mine for when new VS Code versions might cause Calva problems. 😃

Thierry08:02:55

This error is still there in the Calva version that was released 10 hours ago: mainThreadExtensionService.ts:80 TypeError: Cannot read properties of null (reading '1') at c:\Users\thier\.vscode-insiders\extensions\betterthantomorrow.calva-2.0.332\out\extension.js:2:570199 at ChildProcess.exithandler (node:child_process:399:7) at ChildProcess.emit (node:events:526:28) at maybeClose (node:internal/child_process:1092:16) at Socket.<anonymous> (node:internal/child_process:451:11) at Socket.emit (node:events:526:28) at Pipe.<anonymous> (node:net:687:12)

pez08:02:17

Can I haz an issue? Include reproduction steps, if you can, because as it stands it is very hard to fix.

Thierry08:02:48

Didnt you already fix this with the vsix you made? Let me check, hold on

pez08:02:07

I doubt it. The code for that VSIX is merged in latest Calva.

Thierry09:02:42

Indeed, okay will check whats going on here as lsp seems to be loading for infinity now

Tuomas-Matti Soikkeli13:02:50

I have some temp files which I’d like to open, the app logged them into repl output, is it possible to cmd+click a file path in repl output to open it?

pez13:02:12

I think only URLs work. You might get away by typing file:// in front of the paths you have there.

Tuomas-Matti Soikkeli14:02:58

hey that works! thanks! 🎉

🙏 2
Alexander Kouznetsov22:02:16

Does calva format code as you type it? Or is it VSCode built-in ability? I’m constantly fighting something reformatting the code as I type which doesn’t match my default code formatter that runs on save. I also see behaviors similar to what Thierry described above. Basically the cursor is behind the updates in the code and typings occur at random incorrect places. https://clojurians.slack.com/archives/CBE668G4R/p1675855895843909

pez22:02:29

Calva indents the code as you type by default. You can disable this in settings, Editor: Format On Type.

🙌 2
pez22:02:17

As for the random typings... Worrying. This is something new. Are you also on Windows 11?

Alexander Kouznetsov22:02:58

Thanks for the exact setting name. Disabling it helped a lot. I was looking for such setting in the Calva settings page and didn’t find it there (already disable everything related to formatting).

Alexander Kouznetsov22:02:13

I’ll monitor the situation for a bit.

🙏 2
pez22:02:21

You might also want to unbind Calva's formatter from tab, if you haven't already.

🙌 2
Thierry11:02:51

Openened another project, in another folder that also does not include the large codenote folder and without joyride. same issue