This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-15
Channels
- # admin-announcements (3)
- # aws (1)
- # beginners (1)
- # boot (73)
- # cider (1)
- # clojure (146)
- # clojure-japan (4)
- # clojure-nl (3)
- # clojure-russia (90)
- # clojurescript (72)
- # community-development (17)
- # core-async (10)
- # cursive (60)
- # datomic (15)
- # devcards (7)
- # emacs (5)
- # events (5)
- # hoplon (3)
- # instaparse (3)
- # ldnclj (48)
- # leiningen (5)
- # off-topic (27)
- # om (120)
- # onyx (31)
- # re-frame (7)
- # reagent (7)
- # ring-swagger (17)
- # yada (3)
@cfleming: I have been using cursive for a while now and love it. But I've now run in to a bug I think. might have started at one of the more recent EAP builds. I noticed my debug configurations don't use the most recent project.clj file and now see that I don't have the "Synchronize leinigen project" pre launch step. Any idea if there is something I missed?
I am trying to launch figwheel like done here: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
Actually right now doing it with this way, also figwheel but different script: https://github.com/omcljs/om/wiki/Components%2C-Identity-%26-Normalization
When you make changes there, they are not synced to your project automatically. You need to either run the action Refresh Leiningen Projects, or hit the refresh button in the leiningen toolwindow after making changes.
@bbss: Once you’ve hit the refresh button and it’s finished syncing, open Project Structure (Cmd-;), and check Modules->(your module)->Dependencies and check whether the new dependency shows up there.
@bbss: So if you stop and restart your REPL process, it should then have that dependency on the classpath.
Ok, sorry, I hadn’t read the second link you sent. So you’re actually running a local REPL using Leiningen?
This is because the lein REPL reads the project.clj from disk to build the classpath every time you run it.
If you can file that issue, I’ll check why that’s not working and fix it. In the meantime, manually syncing after changes should work.
No problem, still have to learn more about what is going on under the hood anyway, so this is kind of hassle is educational as I am rather new to the JVM and clojure.
I also need to write up how the classpath calculation works for the various different REPL types, since it’s very confusing.
For the Run nREPL with lein option, Leiningen always calculates the classpath and IntelliJ really has nothing to do with it. In theory this should be exactly what you get with lein itself.
So for that you don’t need the Sync before-run task, since lein always reads the file from disk and IntelliJ should save it automatically on run.
The other two options use the classpath for the selected module as calculated by IntelliJ, i.e. based on the source paths and attached libraries.
The synchronisation of the lein project (either by refreshing the project or importing a new one) basically reads that info from lein and tries to replicate it into the IntelliJ project, creating libs for the dependencies and so on.
So this is generally more or less the same classpath as lein will calculate, but it’s an imperfect process and it might get screwed up by lein middleware or other craziness.
I’m going to release a new lein integration soon which should make that process better.
So for those two options, if you modify project.clj and re-run your process without syncing first, you will not get your new deps.
Hmm there is still something funky going on. When I run in the command line: lein run -m clojure.main script/repl.clj
Everything works as expected. But when I do refresh to the project and run it with the clojure.main in normal JVM option I get an old version of React.
@bbss: that sounds like a caching issue?
@danielcompton: any maven cache perhaps? I only know lein clean but that only seems to clear target and the js output directory
@bbss: You can check the command line generated for your run config - it’s the first line output in the REPL window. The versions there should always correspond to the versions you see in the Project Structure view.
And the versions you see in the Project Structure view should correspond to your project.clj after doing a sync.
@cfleming I don't have react as a direct dependency, some of the other deps do, but with lein deps :tree none of them has such a low version.
And also in the project structure. What decides which dependencies are there? Not just lein right?
Success! Compilation failed after removing the old react via the project structure view but adding exclusions for two conflicting projects that both needed react and refreshing lein projects seems to have done the trick