Fork me on GitHub
#lsp
<
2021-03-19
>
David Pham05:03:22

Is it also on clojure-lsp?

ericdallo12:03:06

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?

ericdallo13:03:23

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

ericdallo13:03:36

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

ericdallo13:03:28

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.

ericdallo21:03:16

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

ericdallo21:03:57

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?

ericdallo22:03:19

I don't think so

ericdallo22:03:43

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

ericdallo22:03:53

ATM xerial sqlite does not support that

Carlo17:03:06

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 😀

ericdallo17:03:44

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

Carlo17:03:37

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

👍 3
ericdallo12:03:40

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

ericdallo00:03:59

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

🎉 3
Carlo08:03:57

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!

ericdallo13:03:14

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

Carlo20:03:16

awesome! Can't wait for the new release 😛

🤞 3