This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-29
Channels
- # aleph (2)
- # architecture (1)
- # beginners (5)
- # boot (7)
- # cider (24)
- # clara (28)
- # cljs-dev (7)
- # cljsjs (3)
- # cljsrn (24)
- # clojure (145)
- # clojure-italy (2)
- # clojure-nl (7)
- # clojure-uk (54)
- # clojurescript (159)
- # cursive (49)
- # data-science (8)
- # datomic (23)
- # editors (10)
- # emacs (2)
- # fulcro (123)
- # graphql (12)
- # hoplon (2)
- # java (23)
- # jobs (1)
- # jobs-discuss (2)
- # leiningen (17)
- # mount (5)
- # nrepl (5)
- # off-topic (20)
- # om (2)
- # onyx (25)
- # parinfer (2)
- # pedestal (1)
- # re-frame (8)
- # reagent (7)
- # ring-swagger (1)
- # shadow-cljs (24)
- # spacemacs (7)
- # specter (6)
- # tools-deps (7)
- # vim (2)
I use clojurescript + boot-cljs+cursive , I can't create a repl, the Context module show <unkown>, and get a error: Run Configuration Error: No modules containning clojure.main found. So how I can do now ?
@arlicle How are you creating your project in IntelliJ? Using lein and boot-lein-generate
?
I have create it, I can run repl, but I can't connect to boot repl run in my terminal
That’s why I’m asking how you create your project - that error message normally means that you don’t have Clojure attached to your project anywhere.
@arlicle Have you seen this? This is the recommended approach: https://github.com/boot-clj/boot/wiki/For-Cursive-Users
Basically, you generate a project.clj from your boot file, and then import that into Cursive so it will set up your dependencies correctly.
@arlicle So you have generated a project.clj and then imported it into Cursive? If you open the Leiningen tool window (View->Tool Windows->Leiningen), do you see your project registered there? If not, does right-clicking it in the project toolwindow and selecting “Add as Leiningen project” help?
I can connect to the remote repl now , but still have error : java.lang.ClassNotFoundException: cljs.analyzer clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: cljs.analyzer, compiling:(reagent/debug.clj:49:12)
I fixed it by this way https://www.davidtanzer.net/david's%20blog/2015/08/22/clojure-compilerexception-java-lang-exception-nothing-specified-to-load-compiling-file-name.html
change `(ns naotu.core (:require [reagent.core :as reagent] [ajax.core :refer [GET POST]] [cljs-uuid-utils.core :as uuid] ))` to `(ns naotu.core #?(:cljs (:require [reagent.core :as reagent] [ajax.core :refer [GET POST]] [cljs-uuid-utils.core :as uuid] )))`
Just ran into an issue where Cursive throws an exception if I right click on a project.clj and click "Add as leiningen project" and a project with that name already exists. Cursive will add the most recent one and throw an exception. I would've expected some warning message that I already have a project with that name in my projects list.
That's how I ran into the above exception. I suppose you'll have to handle that more elegantly? 🙂
There really isn’t a good solution for that unfortunately - that’s the best I could come up with.
Alex is going to write about some discussions they’ve had around this, but he’s been busy.
Oh cool. Just to spitball, perhaps if the project has Git enabled you could use part of the Git URI.
Possibly - the problem is knowing which part to use, and also that the results will be different if you check the project out without git.
I could also use more of the full project path, but again knowing how much to use is difficult.
TBH I don't care what IntelliJ/Cursive names the project. I navigate everything based on directory. So maybe you could name each project based on the full path and give it a "nickname" based on the parent dir.
One possibility is to use module groups for intermediate directories. There’s still lots of potential edge cases though, such as modules outside the project base dir (which you know someone is going to do sooner or later)
How about name of the parent directory and if two modules have the same parent, include the parent's parent in the name. Apply recursively until unique.
The problem is that due to the way that the IntelliJ external system integration works, I can’t look at information from other modules when determining the name.
This is a higher-level API than the one I used for Leiningen. It makes lots of things easier, but some things harder. I’m still not sure it’s a good trade-off.
I could force the user to supply a name and then write it to an auxiliary file, but… yuk.
Are you able to detect if a module with a particular name exists when adding a new module?