Fork me on GitHub
#calva
<
2021-12-28
>
fabrao02:12:12

Hello, I don´t know what is happenig, but the tests is including some spaces to the result, like

; Evaluating file: adapters_test.clj
#'unit.microservice-boilerplate.adapters-test/->wallet-history-test
; Running tests for unit.microservice-boilerplate.adapters-test...





; 5 tests finished, all passing 👍, ns: 1, vars: 5

Marc O'Morain18:12:49

Can you log a bug on GitHub and tag me in it please?

Marc O'Morain18:12:13

I think I know what's up here.

Kurt Harriger17:12:48

How can I install an unoptimized build calva? I can periodically reproduce the following bug https://github.com/BetterThanTomorrow/calva/issues/1189 and I see fsPath error in debug window but the symbols have been “optimized” so its hard to determine the callstack. I tried to follow https://github.com/BetterThanTomorrow/calva/wiki/How-to-Hack-on-Calva but and I can open and build the project but its not clear to me if VSCode is actually using the local clone of the extension in this or other vscode instances… I’m guessing not as simply opening and building the project did not seem to give me more info. I then tried to follow instructions to create a visx package and tweaked replaced shadow-cljs release with compile in the release-cljs script hoping the resulting package would be unoptimized but instead I just get “mainThreadExtensionService.ts:95 Activating extension ‘betterthantomorrow.calva’ failed: ENOENT: no such file or directory, open ‘/Users/kurt.harriger/.vscode/extensions/.shadow-cljs/builds/calva-lib/dev/out/cljs-runtime/goog.debug.error.js’.” trying to use the invoke commands after installing this custom package

Kurt Harriger18:12:02

so I recompiled the visx with --debug added to release-cljs step instead of changing compile to release… I now see an extension.js.map file in the out/extensions folder (if it wasn’t there before I’m not certain) so maybe next time I get the issue I’ll have a file and line number 🤞

pez20:12:23

Running a Calva development build will run a dev compiled calva-lib. No optimizations/minifications.

Kurt Harriger21:12:30

ah I see if I run the calva build it opens a new instance of visual studio…. Unfortunately the new instance does not immediately encounter the problem

Kurt Harriger21:12:14

hmm I also wonder if advanced optimizations might even be the reason this occurs… perhaps fsPath is getting renamed as part of optimizations

Kurt Harriger21:12:24

although I don’t see fsPaht in the cljs-lib.. I assumed the optimized names were from clojure compile but maybe its a wepback optimization as well

Kurt Harriger21:12:08

anyway I’ll try to do development in the new vs instance to see if I hit the error again at some point while running the dev build

Kurt Harriger22:12:16

Hmm I’m I still see mangled names… I disable the calva extension in vscode then launched and ran calva project to open a new vscode with calva active. I then tried to start a repl with in the cavla project of the new instance and I see an error in getTokenCursor displayed (Ive seen this error before but it is unrelated to the fsPath error doesn’t seem to cause any issues) and the stack trace seems to have optimized names…

Kurt Harriger22:12:39

although now that I think about I may need to do a clean rebuild from vscode before running as I last build a visx module from commandline it might be picking up those artifacts

Kurt Harriger22:12:38

oh that was it… progress now seeing proper stack trace… here is the stack trace for the getTokenCursor error

Kurt Harriger22:12:55

Interesting I found that if I cleaned my project folder such that it deleted calva and .lsp folders I was able to sorta reproduce the symptoms of the issue… the “Happy coding” message but no prompt…

Kurt Harriger22:12:38

I think this is because Clojure LSP is still initializing and as shown by the spinner next to my name in status bar

Kurt Harriger22:12:15

I also got an error replace on undefined which I’ve also seen occasionally

Kurt Harriger22:12:46

I’m curious if I’ll eventually get a repl prompt when LSP is ready but it seems to take awhile

Kurt Harriger22:12:49

hmm maybe not closing and reopening the project the initializing Clojure language features is spinning but I’m able to start a repl without issue

Kurt Harriger22:12:29

I reloaded the window as I started seeing some parse namespace errors in console issues that I realized were same cause as the getTokenCursor on undefined and then noticed the fsPath error, in this case I had not yet attempted to connect the repl

Kurt Harriger22:12:13

okay it seems I cannot start a repl not entirely sure exactly how to reproduce but here is screenshot with repl listening no repl prompt and error in console

Kurt Harriger22:12:55

updated the issue with some screenshots from above

bringe02:12:13

Thanks for updating the issue. Just FYI, clojure-lsp does not do anything related to the REPL connection, so I don’t think it would cause this issue. I suppose there could possibly be some chance that an error thrown that’s related to clojure-lsp could effect the jack-in / connect process, but I doubt it.