Fork me on GitHub
#cursive
<
2019-02-14
>
cfleming01:02:08

@gfredericks So I haven’t tried it, but I’m not aware of any reason that shouldn’t work.

gfredericks01:02:34

I suspect it's just a regular ole' defn-wrapping-macro

cfleming01:02:39

Debugging Clojure is weird sometimes though, and occasionally fails for unknown reasons.

cfleming01:02:44

Right, that shouldn’t cause any problems.

gfredericks01:02:58

okay, well maybe I'll get more info on the morrow

cfleming01:02:14

Definitely. If they’re sure that doesn’t work properly I can test it too.

👍 5
gfredericks19:02:45

@cfleming on closer inspection it was a false alarm; works as expected

grzm21:02:24

Next Cursive + deps + WSL hurdle: how do we open a Clojure deps project in IntelliJ without a path to clj? Or rather, how do we let Cursive know clj is in the WSL environment?

cfleming21:02:28

@grzm You can’t. IntelliJ operates in Windows-land, which can’t access WSL in a useful way.

grzm21:02:14

So, are we stuck? I'm really hoping there's some way to get around this.

cfleming21:02:22

The best way to set deps and Cursive up on Windows is to use the “Use tools.deps directly” option, which doesn’t require the command line tools.

cfleming21:02:51

(in Settings-&gt;Build, Execution, Development-&gt;Build Tools-&gt;Clojure Deps)

grzm21:02:07

Cheers. Giving that a shot right now.

cfleming21:02:12

You will have to specify the version of tools.deps.alpha you want to use, usually the latest version.

cfleming21:02:02

> On systems which support the CLI tools (e.g. Mac & Linux) Cursive will use those by default. On Windows, which doesn’t have CLI tools as of the time of this writing, you can choose instead to use the tools.deps library directly. This has some caveats, in particular the system deps.edn is bundled with Cursive, so it will always use the current version as of the time of this writing. There is some consideration being given to bundling that into the tools.deps jar rather than installing it via the CLI tools, if that happens this limitation will go away. > The configuration of this is currently a little clunky. You can configure it either at Settings->Build, Execution, Deployment->Build Tools->Clojure Deps or in the global settings section when setting up a new project. Select “Use tools.deps directly”, then press the “Refresh” button to get the list of available versions. Select the version you want to use (by default the latest is selected) and then press “Download” to fetch the artifacts from Maven. If required, you can also customise the path to your user deps.edn file if you want to do so. > Note that this doesn’t require or use WSL at all, and in fact it can’t - IntelliJ lives entirely in Windows land and can only read files from WSL. If you’ve been using deps under WSL you’ll probably have to copy your user deps.edn somewhere accessible, or point Cursive to it as described above. Any feedback about how well all this works is very welcome.

cfleming21:02:12

I think the best option is to have your user deps.edn in Windows so you can point Cursive to it, and then tell the WSL install to use that one using (IIRC) CLJ_CONFIG.

cfleming21:02:41

That way you can use the command line tools in WSL, and Cursive will work too.

grzm21:02:46

Cool. Thanks. We clicked "Refresh" and see the latest tools.deps version is 0.6.488, and we're still seeing "Press Refresh to see available tools.deps versions" when we click "OK"

cfleming21:02:49

If you change the value in the combo box and then change it back, does that help?

Alex Miller (Clojure team)21:02:20

that version came out yesterday btw

cfleming21:02:53

Yeah, Cursive reads the versions from Maven

grzm21:02:50

Changing the value in the combo box to any value (including back to the 0.6.448) gives the same "Press Refresh" response.

cfleming22:02:07

Can you send a screenshot of that?

grzm22:02:02

Where would you like it? In the channel or elsewhere?

cfleming22:02:38

In the channel is fine

cfleming22:02:56

Unless it has sensitive stuff in the background, in which case by DM or email is fine too.

Ryan Scott22:02:07

I'm the one @grzm is trying to help with this. Here is a screen shot.

cfleming22:02:12

That’s very strange. Does pressing Refresh again help with that?

cfleming22:02:41

Seriously, who would have a stateful UI?

cfleming22:02:07

Sorry, I can’t see why that isn’t working. I’ll keep investigating.

grzm22:02:16

Cheers. We're kind of stuck here. @ryan.t.scott73 is new to Clojure and I don't have access to a Windows machine. If I were more familiar with Windows and had access to a machine, I'd be all over the #clj-on-windows channel helping that effort move forward.

cfleming22:02:19

Wait a minute

cfleming22:02:36

That dialog is when you’re importing a project, not from the preference page.

cfleming22:02:01

@ryan.t.scott73 Can you go to Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps and try it there?

cfleming22:02:38

Then if you can set it up there, once that’s done the import will work.

cfleming22:02:16

I’ve just seen that IntelliJ calls the validation step at extra points when importing.

Ryan Scott22:02:58

That worked. Thanks!

cfleming22:02:25

Great, I’ll fix that for the next drop.

grzm22:02:37

👍 Thanks, @cfleming!

cfleming22:02:48

No worries!

grzm22:02:51

@ryan.t.scott73 and I now have a REPL in Cursive on Windows! 🙂