Fork me on GitHub

Hello, friends! I’m cross-posting, in hopes that someone here might now whether it’s possible to set up a smoother dynamic workflow for Quil via VS Code and Calva. It would be super awesome if it’s possible to render the output in a new tab within VS Code as well, but I’m not sure whether it’s possible to “embed” OpenGL in VS Code like that.

👀 1

Hello all. Just wanted to notify that calva.jackInEnv setting is not working in the latest version 2.0.232. I just tested it by upgrading the extension. Had to downgrade to version 2.0.231 to get it to work. I don't know if it's just on my system though.

👀 1

Thanks for the heads-up! Can you file an issue about it? Preferrably from VS Code’s Help-menu, so that we get some system info from your machine with it.

👍 2

@U0ETXRFEW I did some investigation and it turns out I was mistaken, the env vars do work. But the problem is with deps.edn projects. I have a main (mono) repo where all the deps and their versions are defined (in a particular profile called deps). I also add that profile as an alias in the calva.myCljAliases setting. Then I refer them in my sub-projects using :mvn/version "_" . But when I start my REPL by jacking in, that _ is not overridden to the version defined in the alias in the deps.edn file of the project path specified by the CLJ_CONFIG env var. Now I don't know where the problem is; in the alias setting or with calva+deps.edn project. Could you help me a little investigating this further?


I have not seen :mvn/version "_" before. What is it supposed to do?


Also, what is a “profile” in this context?


Profile is an alias and the "_" for versions are resolved based on deps defined in the alias . More info here


I don’t see "_" mentioned there.


Sorry, _ is just like a placeholder, which will be overridden with version defined inside the deps.edn (which will be contained in the project path specified by CLJ_CONFIG env var), in it's alias (which we are using to start the repl, while jacking in). So you could have anything in there as it'll be overridden.


@U5BRU7X8Q FYI: You probably want to avoid an alias called :deps since that's a standard alias defined in the root deps.edn file (to bring in tools.deps.alpha).

👍 1

Are you use :override-deps here? When we used to do that, we typically had {} for the coordinate -- we didn't even specify :mvn/version at all (since the overriding deps could be local or git deps). We gave up on that approach tho' and we stopped using CLJ_CONFIG too (because it prevents developers having their own additional dev-only aliases).

👍 1

I don't know if you've seen my series of blog posts about our monorepo at World Singles Networks but I talk a lot in the early posts in that series about the various setups we tried and abandoned (and why).

seancorfield18:01:01 if you're interested.

👍 1

@U04V70XH6 Thanks a lot for the pointers! I'll read your blogs :thumbsup:


@U0ETXRFEW Same issue with v2.0.233 as well.


@U5BRU7X8Q can you make a small repro project exposing this?


@U0ETXRFEW Sure I can, please see the attached zip file. It contains a deps.edn file in the root-project folder, where all my deps are defined under the alias deps-override. Inside the folder there is a small project under sub-projects/hello-world which has it's own deps.edn file but I am using an underscore (`_`) as a placeholder to be replaced by the one defined in the root project folder. Now if you try to spin up a REPL using jack-in and select the deps-override profile (as it's defined in root-project/.vscode/settings.json), you'll be able to start it if you are on the version 2.0.231 of calva. But if you try to start it with 2.0.232 or 2.0.233, you'll see the error:

clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.9.0"},cider/cider-nrepl {:mvn/version,"0.27.4"}}}' -M:deps-override -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
Error building classpath. Could not find artifact org.clojure:clojure:jar:_ in central ()
Jack-in process exited. Status: 1
NOTE: I have added .vscode/settings.json file in multiple places (one in root and another in one of the sub projects) for your convenience. But please make sure you change the path value for CLJ_CONFIG env var in those files according to you. It should be equal to where you extract the project folder, like, <extracted-path>/root-project.


I’ll don’t have time to test this until tonight. But looking at the changelog for 232, I am suspecting this change:


So if you use the Copy Jack-in command line (or something, I don’t recall the exact command name) to copy the command line and change -M to -A, does the command then work? (If so you can then use the Connect command to connect the REPL, until we have figured out what the fix for the issue is.)


@U0ETXRFEW Yes, you are right. If I change the command from -M to -A, it works.


If -A works and -M does not, I think you are running an old Clojure CLI and need to upgrade @U5BRU7X8Q -- run clojure -version and check that against (if clojure -version doesn't work you have a very old version)


@U0ETXRFEW @U04V70XH6 clojure -version didn't work as I had 1.10.1 version. I upgraded it and now my deps.edn project works with the latest calva. Thanks for all the help guys! 🙏


I like to use brew (even on Linux) to help keep my clojure/tools/clojure CLI up-to-date. Something to consider.

👍 1

We haven’t added support for that yet. Please file an issue about it.

👍 1

Important fix regarding some outdated analysis (including semantic-tokens) and some deadlocks

🙏 1
clojure-lsp 1