Fork me on GitHub
David Pham05:03:22

Is it also on clojure-lsp?


I posted on #emacs :) But no, it's required to have lsp-mode running to use this that is in dap-mode, but clojure-lsp has nothing related with that

Shantanu Kumar13:03:54

Can anybody tell me why is SQLite used in Clojure-LSP?


Hi, we use sqlite to persit the analysis from classpath after the first analysis


so next startups are really faster as we read from a local sqlite file


we could use transit or something simpler, but we would lose the advantage of transaction making sure we always persist correctly the analysis

Shantanu Kumar21:03:47

@UKFSJSM38 I saw that db/read-deps and db/save-deps are being called only in crawler, which leads up to crawler/initialize-project being called from handlers/initialize, which is called from main/server.

Shantanu Kumar21:03:46

Is there any race condition in main/server that may require any transactional isolation?

Shantanu Kumar21:03:47

And I can see only one row being persisted in db/save-deps

Shantanu Kumar21:03:44

So, the data being written is not so much, and the read/write could be technically isolated by locking on an interned absolute string filename.

Shantanu Kumar21:03:09

Just trying to think aloud here on how to achieve isolation/safety without using a database.


Yes, it turns out clojure-lsp process can end any time if user restart the server, close project, close editor etc


I discussed that with @U0BUV7XSA other day, we could probably change to use transit and accept this tradeoff, if the data from the file is corrupted/non parseable, we drop the analysis and re analyze

Shantanu Kumar21:03:50

Are there going to be multiple Clojure-LSP processes competing to write to the same file?


I don't think so


Also this would allow we compile clojure-lsp with graalvm static flag


ATM xerial sqlite does not support that


hey I would like to work towards the incoming references feature in clojure-lsp this week end. I'm learning Clojure (I write Haskell at my day job), and I'm mostly interested in copying the workflows, tools and thought processes from clojurians, so if someone wants to pair (I can drive) that would be amazing 😀


Really cool! LMK if need help with setup for coding in clojure-lsp


thanks @UKFSJSM38! I'll ping you if something comes to mind! 🙏

👍 3

BTW incoming references are already implemented, you probably meant outcoming call hierarchy?


If not, I'd like to start to implement 🙂

🎉 3

Hey @UKFSJSM38, please feel free to start working on it! I'd hate the feature to be delayed on my account! Can't wait to try it!


Thanks 🙂 I already implemented, it was not hard after the work done by incoming call hierarchy 😄 I'm doing some tests and fixing some user cases


awesome! Can't wait for the new release 😛

🤞 3