lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
2021-03-19T05:53:22.022100Z

Is it also on clojure-lsp?

ericdallo 2021-03-19T12:15:06.022300Z

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 Kumar 2021-03-19T13:08:54.023200Z

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

ericdallo 2021-03-19T13:09:23.023300Z

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

ericdallo 2021-03-19T13:09:36.023500Z

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

ericdallo 2021-03-19T13:10:28.023700Z

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

ericdallo 2021-03-19T13:11:34.023900Z

Here you can find more info as well: https://github.com/clojure-lsp/clojure-lsp/issues/234

1
william 2021-03-19T17:25:06.027200Z

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 😀

ericdallo 2021-03-20T12:43:40.032600Z

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

ericdallo 2021-03-27T00:34:26.136900Z

Hey @meditans, are you looking this? https://github.com/clojure-lsp/clojure-lsp/issues/384

ericdallo 2021-03-27T00:34:59.137200Z

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

🎉 1
william 2021-03-27T08:59:57.138400Z

Hey @ericdallo, 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!

ericdallo 2021-03-27T13:24:14.138900Z

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

ericdallo 2021-03-27T22:30:07.139500Z

If you want to give a try: https://github.com/clojure-lsp/clojure-lsp/pull/387

william 2021-03-29T20:20:16.146100Z

awesome! Can't wait for the new release 😛

🤞 1
ericdallo 2021-03-19T17:29:44.027300Z

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

william 2021-03-19T17:36:37.027500Z

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

👍 1
Shantanu Kumar 2021-03-19T21:41:47.027800Z

@ericdallo 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 Kumar 2021-03-19T21:42:46.028Z

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

Shantanu Kumar 2021-03-19T21:43:47.028200Z

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

Shantanu Kumar 2021-03-19T21:48:44.028400Z

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 Kumar 2021-03-19T21:51:09.028600Z

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

ericdallo 2021-03-19T21:58:16.028800Z

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

ericdallo 2021-03-19T21:58:57.029Z

I discussed that with @snoe 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 Kumar 2021-03-19T21:59:50.029200Z

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

ericdallo 2021-03-19T22:00:19.029400Z

I don't think so

Shantanu Kumar 2021-03-19T22:01:02.029600Z

Then your summary https://clojurians.slack.com/archives/CPABC1H61/p1616191137029000?thread_ts=1616159334.023200&cid=CPABC1H61 sounds like a good plan to me.

ericdallo 2021-03-19T22:18:43.029900Z

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

ericdallo 2021-03-19T22:18:53.030100Z

ATM xerial sqlite does not support that