Fork me on GitHub
#lsp
<
2022-08-10
>
jacob.maine00:08:28

The latest nightly https://clojurians.slack.com/archives/C032YH7P0R2/p1660085003180609 removes clojure-lsp’s dependency on lsp4j. A few of us have been testing this for awhile, but still, this is a big change at the very foundations of clojure-lsp, so we’d appreciate beta testers.

🙏 3
👀 1
ericdallo00:08:17

c/c <!subteam^S03BGSAUPTQ|@calva-team>

dharrigan07:08:32

I've switched to this beta (by building the master branch). I'll raise any issues if I come across them 🙂

gratitude 1
pez07:08:57

Isn't there an M1 built nightly? This breaks assumptions in Calva so that M1 users can't use the nightly setting. This is the link Calva will use on an M1/M2 computer using M1/M2 versions of VS Code: https://nightly.link/clojure-lsp/clojure-lsp/workflows/nightly/master/clojure-lsp-native-macos-aarch64.zip

ericdallo10:08:00

@U0ETXRFEW I think the nightly M1 native is not being properly built, we should fix that indeed c/c @U04V15CAJ, I think we should make that main task build for nightly too or have a different link for nightly arm64 macos

pez11:08:49

Would be awesome if it could be that link I posted. The logic for selecting binary is a bit complicated as it is. 😃 But if that's trouble on your end, I'd be happy to update Calva.

ericdallo12:08:34

I'll work on make that work for clojure-lsp to be just like the other builds

pez12:08:26

Sweet! What a nice timing.

borkdude12:08:42

Sorry to spoil the party, but this is only for self-hosted runners. CirrusCI which lsp is currently using is the only thing free public thing I know of that can build it.

ericdallo12:08:00

well, I don't think we can make the nightly link to work for the cirrus build, we will need to think on something else so

borkdude12:08:18

> well, I don't think we can make the nightly link to work for the cirrus build what is blocking you?

ericdallo12:08:47

Is there a way to have a direct link to the binary cirrus built @U04V15CAJ?

ericdallo12:08:26

otherwise calva wouldn't be able to download automatically

ericdallo12:08:41

only manually via #clojure-lsp-builds if we post the cirrus build there

borkdude12:08:52

you can upload the binary to Github release manually, like I do with babashka, clj-kondo, etc etc

borkdude12:08:03

I think this is also already happening with clojure-lsp

ericdallo12:08:11

is not a release, it's a master build

borkdude12:08:49

You can make a dev snapshot release where you upload it. Every master commit from babashka is uploaded here, including the cirrus one https://github.com/babashka/babashka-dev-builds

ericdallo12:08:39

hum, I'd like to avoid that, as we are only having this issue for arm64 m1, all other builds are working being stored on github action summary like https://github.com/clojure-lsp/clojure-lsp/actions/runs/2828714594

ericdallo12:08:57

if cirrus provide just a direct link to the binary like github does, that would work

ericdallo12:08:14

I managed to find a link: https://api.cirrus-ci.com/v1/artifact/task/6274753567653888/binaries/clojure-lsp-native-macos-aarch64.zip the issue is that it points to a task run id, it'd be nice if something like latest work

ericdallo12:08:11

Right, we won't have the same link @U0ETXRFEW following nightly standard, but we do have a link for macos arm64 This link: https://api.cirrus-ci.com/v1/artifact/github/clojure-lsp/clojure-lsp/main/binaries/clojure-lsp-native-macos-aarch64.zip

ericdallo12:08:58

Wait a sec, I have an idea, we could configure a A alias to a sub domain and make it work for all cases following the same standard I guess

pez12:08:37

That sounds great to me.

pez12:08:15

Another option might be to have a Github action build that just copies the artifact from cirrus? (Not that I know what I am talking about, but anyway.)

ericdallo12:08:06

Yeah, I think so, it'd be a little bit tricky to link when cirrus finished then trigger another build on github action or so, but it's an option I guess

pez12:08:18

The DNS solution is good because it makes things future compatible should providers change.

👍 1
ericdallo12:08:27

@U0ETXRFEW AFAICS there is no way to make a specific subdomain link to specific URL, only to another domain/subdomain, so if we do that links would still follow different standards, so I guess the only available option for now is use a different link for mac arm64 😢 I'll have to make the same change https://github.com/clojure-lsp/clojure-lsp/blob/master/install, so maybe could be a way to calva use that script instead of manually doing on your side as well?

pez12:08:52

Do Windows machines have bash?

ericdallo13:08:01

No, but maybe we should have a install.bat or something? I don't see babashka or clj-kondo doing that though, is there any reason for that @U04V15CAJ?

borkdude13:08:25

I don't get why you're not going with the solution I proposed, it seems much simpler.

borkdude13:08:35

And also CI-independent

ericdallo13:08:02

yeah, I was taking a look and it seems would work good enough too

ericdallo13:08:14

will take a look how babashka does that, thanks

ericdallo16:08:48

It's working :) https://github.com/clojure-lsp/clojure-lsp-dev-builds/releases Will update nightly link to link to those releases

pez17:08:05

🙏 I’ll update the issue.

👍 1
jacob.maine00:08:49

@jlle I was reviewing clojure-lsp’s deps-lock.json and was wondering if it could or should be “cleaned up” at all. It has a lot of deps that are used only during development. Is that a problem? Or a feature? 🙂 Does clj-nix pull in deps from all the aliases in the deps.edn files? Is there any way to exclude certain aliases?

jose14:08:36

I consider it a feature, since the goal is to capture all the dependencies (you can use any alias during nix build time) But maybe we could add an option to the CLI to generate a lock file for only certain aliases. In the case of clojure-lsp it's a bit more complex since we have multiple deps.edn files, we need to define the deps.edn and the alias

jose14:08:28

Are you having issues with nix fetching too many dependencies?

ericdallo16:08:33

Not really, we just wanted to know if it was possible to exclude some unnecessary deps

jose21:08:54

Currently the only way is to modify manually the lock file, I'll think about a new option to the deps-lock command to fetch the deps for only one alias

👍 1
jacob.maine02:08:21

Thanks for the explanation. I’m so new to nix that I don’t know if I’m asking the right questions. The first question I should be asking, I think, is what’s the point of the nix code @ericdallo? Does it provide a dev environment from which you can reproducibly build a clojure-lsp executable? If so, then we need clj-nix to pull in dependencies in the :build alias, and maybe in the :debug alias too. Or is it a runtime environment from which can reproducibly run a clojure-lsp executable? In that case maybe we’d benefit from cutting out the deps from certain aliases. (Or do these questions themselves expose my ignorance? 😅 )

ericdallo12:08:51

No problem, valid questions! The point is to have a way to build clojure-lsp using nix/flakes, in a pure way, specifying all necessary deps and locking them, with nix we have reliable way to repro the same executable on different envs. So I do think we want clj-nix to use the same aliases we use for prod binary indeed

borkdude08:08:00

@ericdallo I started editing some code and ended up editing code in my "target" folder again when navigating to a function. I think this was reported and fixed a couple of times now. It happens a lot in the babashka.cli project after I've done a release (which creates a target folder in the project) ❤️

ericdallo10:08:59

Yeah, it should be fixed, maybe it's something with babashka.cli project, I can take a look soon

Josip Gracin16:08:08

Hi! I submitted https://github.com/clojure-lsp/clojure-lsp/pull/1179. It should fix issue #1084 with resolve-macro-as.

ericdallo16:08:51

thanks will take a look

👍 1