Opening leiningen project in emacs/cider raises classpath error











up vote
0
down vote

favorite












I'm learning Clojure with 'Clojure for the Brave and True' book and use emacs, cider and leiningen. I've created a project.



lein new app the-divine-cheese-code


Then I've added to source files to the project.



the-divine-cheese-codesrcthe_divine_cheese_codecore.clj
the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj



In 'core.clj' I refer to the 'svg.clj' namespace.



the-divine-cheese-codesrcthe_divine_cheese_codecore.clj



(ns the-divine-cheese-code.core)
;; Ensure that the SVG code is evaluated
(require 'the-divine-cheese-code.visualization.svg)
;; Refer the namespace so that you don't have to use the
;; fully qualified name to reference svg functions
(refer 'the-divine-cheese-code.visualization.svg)

(def heists [{:location "Cologne, Germany"
:cheese-name "Archbishop Hildebold's Cheese Pretzel"
:lat 50.95
:lng 6.97}
{:location "Zurich, Switzerland"
:cheese-name "The Standard Emmental"
:lat 47.37
:lng 8.55}
{:location "Marseille, France"
:cheese-name "Le Fromage de Cosquer"
:lat 43.30
:lng 5.37}
{:location "Zurich, Switzerland"
:cheese-name "The Lesser Emmental"
:lat 47.37
:lng 8.55}
{:location "Vatican City"
:cheese-name "The Cheese of Turin"
:lat 41.90
:lng 12.45}])

(defn -main
[& args]
(println (points heists)))


the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj



(ns the-divine-cheese-code.visualization.svg)

(defn latlng->point
"Convert lat/lng map to comma-separated string"
[latlng]
(str (:lat latlng) "," (:lng latlng)))

(defn points
[locations]
(clojure.string/join " " (map latlng->point locations)))


Here is the project's entire dir structure.



the-divine-cheese-code              
the-divine-cheese-code.gitignore
the-divine-cheese-code.hgignore
the-divine-cheese-code.nrepl-port
the-divine-cheese-codeCHANGELOG.md
the-divine-cheese-codedoc
the-divine-cheese-codedocintro.md
the-divine-cheese-codeLICENSE
the-divine-cheese-codeproject.clj
the-divine-cheese-codeREADME.md
the-divine-cheese-coderesources
the-divine-cheese-codesrc
the-divine-cheese-codesrcthe_divine_cheese_code
the-divine-cheese-codesrcthe_divine_cheese_codecore.clj
the-divine-cheese-codesrcthe_divine_cheese_codevisualization
the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj
the-divine-cheese-codetarget
the-divine-cheese-codetargetdefault
the-divine-cheese-codetargetdefaultclasses
the-divine-cheese-codetargetdefaultclassesMETA-INF
the-divine-cheese-codetargetdefaultclassesMETA-INFmaven
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-code
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-codethe-divine-cheese-code
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-codethe-divine-cheese-codepom.properties
the-divine-cheese-codetargetdefaultrepl-port


the-divine-cheese-codetargetdefaultstale

the-divine-cheese-codetargetdefaultstaleleiningen.core.classpath.extract-native-dependencies

the-divine-cheese-codetest

the-divine-cheese-codetestthe_divine_cheese_code

the-divine-cheese-codetestthe_divine_cheese_codecore_test.clj



When I run the project with 'lein run' it executes successfully. However, when I open the core.clj file with emacs/cider and try to compile it, I get classpath error.



CompilerException java.io.FileNotFoundException: Could not locate 
the_divine_cheese_code/visualization/svg__init.class or
the_divine_cheese_code/visualization/svg.clj on classpath. Please check
that namespaces with dashes use underscores in the Clojure file name.,
compiling:(c:/temp/the-divine-cheese-code/src/the_divine_cheese_code/core.clj:2:1)


CIDER compiles sources sucessfully if I put them in the same directory (changing namespace correspondingly).



(ns the-divine-cheese-code.core)
(require 'the-divine-cheese-code.svg)
(refer 'the-divine-cheese-code.svg)

(def heists [{:location "Cologne, Germany"
...


So maybe the issue is dealt with OS. I use Windows 7, which is not primary OS for Emacs/CIDER.



After some experimenting I found that the CIDER works without :refer



(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg]))


This looks like a CIDER bug and 'lein run' predictably gives error in this case.
If I make it the right way



(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))


the CIDER now gives another error:



Caused by java.lang.IllegalStateException
latlng->point already refers to:
#'the-divine-cheese-code.svg/latlng->point in namespace:
the-divine-cheese-code.core









share|improve this question
























  • Have you tried using the ns macro instead?
    – Aleph Aleph
    Nov 13 at 20:15










  • @AlephAleph I haven't quite understand the comment. I already use ns macro in both source files. The key point of this sample application is referring one name space from another one. Also, let me note once again, the project is executed successfully with 'lein run'. So the namespaces are resolved successfully in that case. I've edited the question and added complete sources.
    – Alex
    Nov 14 at 10:29















up vote
0
down vote

favorite












I'm learning Clojure with 'Clojure for the Brave and True' book and use emacs, cider and leiningen. I've created a project.



lein new app the-divine-cheese-code


Then I've added to source files to the project.



the-divine-cheese-codesrcthe_divine_cheese_codecore.clj
the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj



In 'core.clj' I refer to the 'svg.clj' namespace.



the-divine-cheese-codesrcthe_divine_cheese_codecore.clj



(ns the-divine-cheese-code.core)
;; Ensure that the SVG code is evaluated
(require 'the-divine-cheese-code.visualization.svg)
;; Refer the namespace so that you don't have to use the
;; fully qualified name to reference svg functions
(refer 'the-divine-cheese-code.visualization.svg)

(def heists [{:location "Cologne, Germany"
:cheese-name "Archbishop Hildebold's Cheese Pretzel"
:lat 50.95
:lng 6.97}
{:location "Zurich, Switzerland"
:cheese-name "The Standard Emmental"
:lat 47.37
:lng 8.55}
{:location "Marseille, France"
:cheese-name "Le Fromage de Cosquer"
:lat 43.30
:lng 5.37}
{:location "Zurich, Switzerland"
:cheese-name "The Lesser Emmental"
:lat 47.37
:lng 8.55}
{:location "Vatican City"
:cheese-name "The Cheese of Turin"
:lat 41.90
:lng 12.45}])

(defn -main
[& args]
(println (points heists)))


the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj



(ns the-divine-cheese-code.visualization.svg)

(defn latlng->point
"Convert lat/lng map to comma-separated string"
[latlng]
(str (:lat latlng) "," (:lng latlng)))

(defn points
[locations]
(clojure.string/join " " (map latlng->point locations)))


Here is the project's entire dir structure.



the-divine-cheese-code              
the-divine-cheese-code.gitignore
the-divine-cheese-code.hgignore
the-divine-cheese-code.nrepl-port
the-divine-cheese-codeCHANGELOG.md
the-divine-cheese-codedoc
the-divine-cheese-codedocintro.md
the-divine-cheese-codeLICENSE
the-divine-cheese-codeproject.clj
the-divine-cheese-codeREADME.md
the-divine-cheese-coderesources
the-divine-cheese-codesrc
the-divine-cheese-codesrcthe_divine_cheese_code
the-divine-cheese-codesrcthe_divine_cheese_codecore.clj
the-divine-cheese-codesrcthe_divine_cheese_codevisualization
the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj
the-divine-cheese-codetarget
the-divine-cheese-codetargetdefault
the-divine-cheese-codetargetdefaultclasses
the-divine-cheese-codetargetdefaultclassesMETA-INF
the-divine-cheese-codetargetdefaultclassesMETA-INFmaven
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-code
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-codethe-divine-cheese-code
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-codethe-divine-cheese-codepom.properties
the-divine-cheese-codetargetdefaultrepl-port


the-divine-cheese-codetargetdefaultstale

the-divine-cheese-codetargetdefaultstaleleiningen.core.classpath.extract-native-dependencies

the-divine-cheese-codetest

the-divine-cheese-codetestthe_divine_cheese_code

the-divine-cheese-codetestthe_divine_cheese_codecore_test.clj



When I run the project with 'lein run' it executes successfully. However, when I open the core.clj file with emacs/cider and try to compile it, I get classpath error.



CompilerException java.io.FileNotFoundException: Could not locate 
the_divine_cheese_code/visualization/svg__init.class or
the_divine_cheese_code/visualization/svg.clj on classpath. Please check
that namespaces with dashes use underscores in the Clojure file name.,
compiling:(c:/temp/the-divine-cheese-code/src/the_divine_cheese_code/core.clj:2:1)


CIDER compiles sources sucessfully if I put them in the same directory (changing namespace correspondingly).



(ns the-divine-cheese-code.core)
(require 'the-divine-cheese-code.svg)
(refer 'the-divine-cheese-code.svg)

(def heists [{:location "Cologne, Germany"
...


So maybe the issue is dealt with OS. I use Windows 7, which is not primary OS for Emacs/CIDER.



After some experimenting I found that the CIDER works without :refer



(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg]))


This looks like a CIDER bug and 'lein run' predictably gives error in this case.
If I make it the right way



(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))


the CIDER now gives another error:



Caused by java.lang.IllegalStateException
latlng->point already refers to:
#'the-divine-cheese-code.svg/latlng->point in namespace:
the-divine-cheese-code.core









share|improve this question
























  • Have you tried using the ns macro instead?
    – Aleph Aleph
    Nov 13 at 20:15










  • @AlephAleph I haven't quite understand the comment. I already use ns macro in both source files. The key point of this sample application is referring one name space from another one. Also, let me note once again, the project is executed successfully with 'lein run'. So the namespaces are resolved successfully in that case. I've edited the question and added complete sources.
    – Alex
    Nov 14 at 10:29













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm learning Clojure with 'Clojure for the Brave and True' book and use emacs, cider and leiningen. I've created a project.



lein new app the-divine-cheese-code


Then I've added to source files to the project.



the-divine-cheese-codesrcthe_divine_cheese_codecore.clj
the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj



In 'core.clj' I refer to the 'svg.clj' namespace.



the-divine-cheese-codesrcthe_divine_cheese_codecore.clj



(ns the-divine-cheese-code.core)
;; Ensure that the SVG code is evaluated
(require 'the-divine-cheese-code.visualization.svg)
;; Refer the namespace so that you don't have to use the
;; fully qualified name to reference svg functions
(refer 'the-divine-cheese-code.visualization.svg)

(def heists [{:location "Cologne, Germany"
:cheese-name "Archbishop Hildebold's Cheese Pretzel"
:lat 50.95
:lng 6.97}
{:location "Zurich, Switzerland"
:cheese-name "The Standard Emmental"
:lat 47.37
:lng 8.55}
{:location "Marseille, France"
:cheese-name "Le Fromage de Cosquer"
:lat 43.30
:lng 5.37}
{:location "Zurich, Switzerland"
:cheese-name "The Lesser Emmental"
:lat 47.37
:lng 8.55}
{:location "Vatican City"
:cheese-name "The Cheese of Turin"
:lat 41.90
:lng 12.45}])

(defn -main
[& args]
(println (points heists)))


the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj



(ns the-divine-cheese-code.visualization.svg)

(defn latlng->point
"Convert lat/lng map to comma-separated string"
[latlng]
(str (:lat latlng) "," (:lng latlng)))

(defn points
[locations]
(clojure.string/join " " (map latlng->point locations)))


Here is the project's entire dir structure.



the-divine-cheese-code              
the-divine-cheese-code.gitignore
the-divine-cheese-code.hgignore
the-divine-cheese-code.nrepl-port
the-divine-cheese-codeCHANGELOG.md
the-divine-cheese-codedoc
the-divine-cheese-codedocintro.md
the-divine-cheese-codeLICENSE
the-divine-cheese-codeproject.clj
the-divine-cheese-codeREADME.md
the-divine-cheese-coderesources
the-divine-cheese-codesrc
the-divine-cheese-codesrcthe_divine_cheese_code
the-divine-cheese-codesrcthe_divine_cheese_codecore.clj
the-divine-cheese-codesrcthe_divine_cheese_codevisualization
the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj
the-divine-cheese-codetarget
the-divine-cheese-codetargetdefault
the-divine-cheese-codetargetdefaultclasses
the-divine-cheese-codetargetdefaultclassesMETA-INF
the-divine-cheese-codetargetdefaultclassesMETA-INFmaven
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-code
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-codethe-divine-cheese-code
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-codethe-divine-cheese-codepom.properties
the-divine-cheese-codetargetdefaultrepl-port


the-divine-cheese-codetargetdefaultstale

the-divine-cheese-codetargetdefaultstaleleiningen.core.classpath.extract-native-dependencies

the-divine-cheese-codetest

the-divine-cheese-codetestthe_divine_cheese_code

the-divine-cheese-codetestthe_divine_cheese_codecore_test.clj



When I run the project with 'lein run' it executes successfully. However, when I open the core.clj file with emacs/cider and try to compile it, I get classpath error.



CompilerException java.io.FileNotFoundException: Could not locate 
the_divine_cheese_code/visualization/svg__init.class or
the_divine_cheese_code/visualization/svg.clj on classpath. Please check
that namespaces with dashes use underscores in the Clojure file name.,
compiling:(c:/temp/the-divine-cheese-code/src/the_divine_cheese_code/core.clj:2:1)


CIDER compiles sources sucessfully if I put them in the same directory (changing namespace correspondingly).



(ns the-divine-cheese-code.core)
(require 'the-divine-cheese-code.svg)
(refer 'the-divine-cheese-code.svg)

(def heists [{:location "Cologne, Germany"
...


So maybe the issue is dealt with OS. I use Windows 7, which is not primary OS for Emacs/CIDER.



After some experimenting I found that the CIDER works without :refer



(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg]))


This looks like a CIDER bug and 'lein run' predictably gives error in this case.
If I make it the right way



(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))


the CIDER now gives another error:



Caused by java.lang.IllegalStateException
latlng->point already refers to:
#'the-divine-cheese-code.svg/latlng->point in namespace:
the-divine-cheese-code.core









share|improve this question















I'm learning Clojure with 'Clojure for the Brave and True' book and use emacs, cider and leiningen. I've created a project.



lein new app the-divine-cheese-code


Then I've added to source files to the project.



the-divine-cheese-codesrcthe_divine_cheese_codecore.clj
the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj



In 'core.clj' I refer to the 'svg.clj' namespace.



the-divine-cheese-codesrcthe_divine_cheese_codecore.clj



(ns the-divine-cheese-code.core)
;; Ensure that the SVG code is evaluated
(require 'the-divine-cheese-code.visualization.svg)
;; Refer the namespace so that you don't have to use the
;; fully qualified name to reference svg functions
(refer 'the-divine-cheese-code.visualization.svg)

(def heists [{:location "Cologne, Germany"
:cheese-name "Archbishop Hildebold's Cheese Pretzel"
:lat 50.95
:lng 6.97}
{:location "Zurich, Switzerland"
:cheese-name "The Standard Emmental"
:lat 47.37
:lng 8.55}
{:location "Marseille, France"
:cheese-name "Le Fromage de Cosquer"
:lat 43.30
:lng 5.37}
{:location "Zurich, Switzerland"
:cheese-name "The Lesser Emmental"
:lat 47.37
:lng 8.55}
{:location "Vatican City"
:cheese-name "The Cheese of Turin"
:lat 41.90
:lng 12.45}])

(defn -main
[& args]
(println (points heists)))


the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj



(ns the-divine-cheese-code.visualization.svg)

(defn latlng->point
"Convert lat/lng map to comma-separated string"
[latlng]
(str (:lat latlng) "," (:lng latlng)))

(defn points
[locations]
(clojure.string/join " " (map latlng->point locations)))


Here is the project's entire dir structure.



the-divine-cheese-code              
the-divine-cheese-code.gitignore
the-divine-cheese-code.hgignore
the-divine-cheese-code.nrepl-port
the-divine-cheese-codeCHANGELOG.md
the-divine-cheese-codedoc
the-divine-cheese-codedocintro.md
the-divine-cheese-codeLICENSE
the-divine-cheese-codeproject.clj
the-divine-cheese-codeREADME.md
the-divine-cheese-coderesources
the-divine-cheese-codesrc
the-divine-cheese-codesrcthe_divine_cheese_code
the-divine-cheese-codesrcthe_divine_cheese_codecore.clj
the-divine-cheese-codesrcthe_divine_cheese_codevisualization
the-divine-cheese-codesrcthe_divine_cheese_codevisualizationsvg.clj
the-divine-cheese-codetarget
the-divine-cheese-codetargetdefault
the-divine-cheese-codetargetdefaultclasses
the-divine-cheese-codetargetdefaultclassesMETA-INF
the-divine-cheese-codetargetdefaultclassesMETA-INFmaven
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-code
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-codethe-divine-cheese-code
the-divine-cheese-codetargetdefaultclassesMETA-INFmaventhe-divine-cheese-codethe-divine-cheese-codepom.properties
the-divine-cheese-codetargetdefaultrepl-port


the-divine-cheese-codetargetdefaultstale

the-divine-cheese-codetargetdefaultstaleleiningen.core.classpath.extract-native-dependencies

the-divine-cheese-codetest

the-divine-cheese-codetestthe_divine_cheese_code

the-divine-cheese-codetestthe_divine_cheese_codecore_test.clj



When I run the project with 'lein run' it executes successfully. However, when I open the core.clj file with emacs/cider and try to compile it, I get classpath error.



CompilerException java.io.FileNotFoundException: Could not locate 
the_divine_cheese_code/visualization/svg__init.class or
the_divine_cheese_code/visualization/svg.clj on classpath. Please check
that namespaces with dashes use underscores in the Clojure file name.,
compiling:(c:/temp/the-divine-cheese-code/src/the_divine_cheese_code/core.clj:2:1)


CIDER compiles sources sucessfully if I put them in the same directory (changing namespace correspondingly).



(ns the-divine-cheese-code.core)
(require 'the-divine-cheese-code.svg)
(refer 'the-divine-cheese-code.svg)

(def heists [{:location "Cologne, Germany"
...


So maybe the issue is dealt with OS. I use Windows 7, which is not primary OS for Emacs/CIDER.



After some experimenting I found that the CIDER works without :refer



(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg]))


This looks like a CIDER bug and 'lein run' predictably gives error in this case.
If I make it the right way



(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))


the CIDER now gives another error:



Caused by java.lang.IllegalStateException
latlng->point already refers to:
#'the-divine-cheese-code.svg/latlng->point in namespace:
the-divine-cheese-code.core






cider






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 at 17:26

























asked Nov 13 at 11:36









Alex

334




334












  • Have you tried using the ns macro instead?
    – Aleph Aleph
    Nov 13 at 20:15










  • @AlephAleph I haven't quite understand the comment. I already use ns macro in both source files. The key point of this sample application is referring one name space from another one. Also, let me note once again, the project is executed successfully with 'lein run'. So the namespaces are resolved successfully in that case. I've edited the question and added complete sources.
    – Alex
    Nov 14 at 10:29


















  • Have you tried using the ns macro instead?
    – Aleph Aleph
    Nov 13 at 20:15










  • @AlephAleph I haven't quite understand the comment. I already use ns macro in both source files. The key point of this sample application is referring one name space from another one. Also, let me note once again, the project is executed successfully with 'lein run'. So the namespaces are resolved successfully in that case. I've edited the question and added complete sources.
    – Alex
    Nov 14 at 10:29
















Have you tried using the ns macro instead?
– Aleph Aleph
Nov 13 at 20:15




Have you tried using the ns macro instead?
– Aleph Aleph
Nov 13 at 20:15












@AlephAleph I haven't quite understand the comment. I already use ns macro in both source files. The key point of this sample application is referring one name space from another one. Also, let me note once again, the project is executed successfully with 'lein run'. So the namespaces are resolved successfully in that case. I've edited the question and added complete sources.
– Alex
Nov 14 at 10:29




@AlephAleph I haven't quite understand the comment. I already use ns macro in both source files. The key point of this sample application is referring one name space from another one. Also, let me note once again, the project is executed successfully with 'lein run'. So the namespaces are resolved successfully in that case. I've edited the question and added complete sources.
– Alex
Nov 14 at 10:29












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Would suggest to use the options provided by the ns macro instead of naked require and refer statements - this is the recommended way of doing imports/requires in Clojure and most of the tooling is written with this way of managing namespaces in mind. Even if the below code still doesn't work in CIDER, it will be easier to diagnose it:



;; the-divine-cheese-codesrcthe_divine_cheese_codecore.clj

(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))

(def heists ...)

(defn- main ...)





share|improve this answer





















  • As you expected, this still doesn't work in CIDER. The error is the same.
    – Alex
    Nov 14 at 12:23












  • Are you using cider-jack-in to connect to the REPL in CIDER?
    – Aleph Aleph
    Nov 14 at 13:41










  • Yes, I use cider-jack-in. I've also added some more information to the question.
    – Alex
    Nov 14 at 17:29










  • This message latlng->point already refers to: #'the-divine-cheese-code.svg/latlng->point probably means that you had a file the_divine_cheese_code/svg.clj and then moved its contents to another file. Have you tried restarting the CIDER repl?
    – Aleph Aleph
    Nov 15 at 9:18












  • I've tried 'cider-quit', 'cider-jack-in' and after that I've got the original classpath error.
    – Alex
    Nov 15 at 16:38











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53280177%2fopening-leiningen-project-in-emacs-cider-raises-classpath-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Would suggest to use the options provided by the ns macro instead of naked require and refer statements - this is the recommended way of doing imports/requires in Clojure and most of the tooling is written with this way of managing namespaces in mind. Even if the below code still doesn't work in CIDER, it will be easier to diagnose it:



;; the-divine-cheese-codesrcthe_divine_cheese_codecore.clj

(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))

(def heists ...)

(defn- main ...)





share|improve this answer





















  • As you expected, this still doesn't work in CIDER. The error is the same.
    – Alex
    Nov 14 at 12:23












  • Are you using cider-jack-in to connect to the REPL in CIDER?
    – Aleph Aleph
    Nov 14 at 13:41










  • Yes, I use cider-jack-in. I've also added some more information to the question.
    – Alex
    Nov 14 at 17:29










  • This message latlng->point already refers to: #'the-divine-cheese-code.svg/latlng->point probably means that you had a file the_divine_cheese_code/svg.clj and then moved its contents to another file. Have you tried restarting the CIDER repl?
    – Aleph Aleph
    Nov 15 at 9:18












  • I've tried 'cider-quit', 'cider-jack-in' and after that I've got the original classpath error.
    – Alex
    Nov 15 at 16:38















up vote
0
down vote













Would suggest to use the options provided by the ns macro instead of naked require and refer statements - this is the recommended way of doing imports/requires in Clojure and most of the tooling is written with this way of managing namespaces in mind. Even if the below code still doesn't work in CIDER, it will be easier to diagnose it:



;; the-divine-cheese-codesrcthe_divine_cheese_codecore.clj

(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))

(def heists ...)

(defn- main ...)





share|improve this answer





















  • As you expected, this still doesn't work in CIDER. The error is the same.
    – Alex
    Nov 14 at 12:23












  • Are you using cider-jack-in to connect to the REPL in CIDER?
    – Aleph Aleph
    Nov 14 at 13:41










  • Yes, I use cider-jack-in. I've also added some more information to the question.
    – Alex
    Nov 14 at 17:29










  • This message latlng->point already refers to: #'the-divine-cheese-code.svg/latlng->point probably means that you had a file the_divine_cheese_code/svg.clj and then moved its contents to another file. Have you tried restarting the CIDER repl?
    – Aleph Aleph
    Nov 15 at 9:18












  • I've tried 'cider-quit', 'cider-jack-in' and after that I've got the original classpath error.
    – Alex
    Nov 15 at 16:38













up vote
0
down vote










up vote
0
down vote









Would suggest to use the options provided by the ns macro instead of naked require and refer statements - this is the recommended way of doing imports/requires in Clojure and most of the tooling is written with this way of managing namespaces in mind. Even if the below code still doesn't work in CIDER, it will be easier to diagnose it:



;; the-divine-cheese-codesrcthe_divine_cheese_codecore.clj

(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))

(def heists ...)

(defn- main ...)





share|improve this answer












Would suggest to use the options provided by the ns macro instead of naked require and refer statements - this is the recommended way of doing imports/requires in Clojure and most of the tooling is written with this way of managing namespaces in mind. Even if the below code still doesn't work in CIDER, it will be easier to diagnose it:



;; the-divine-cheese-codesrcthe_divine_cheese_codecore.clj

(ns the-divine-cheese-code.core
(:require [the-divine-cheese-code.visualization.svg :refer :all]))

(def heists ...)

(defn- main ...)






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 14 at 11:06









Aleph Aleph

3,0701619




3,0701619












  • As you expected, this still doesn't work in CIDER. The error is the same.
    – Alex
    Nov 14 at 12:23












  • Are you using cider-jack-in to connect to the REPL in CIDER?
    – Aleph Aleph
    Nov 14 at 13:41










  • Yes, I use cider-jack-in. I've also added some more information to the question.
    – Alex
    Nov 14 at 17:29










  • This message latlng->point already refers to: #'the-divine-cheese-code.svg/latlng->point probably means that you had a file the_divine_cheese_code/svg.clj and then moved its contents to another file. Have you tried restarting the CIDER repl?
    – Aleph Aleph
    Nov 15 at 9:18












  • I've tried 'cider-quit', 'cider-jack-in' and after that I've got the original classpath error.
    – Alex
    Nov 15 at 16:38


















  • As you expected, this still doesn't work in CIDER. The error is the same.
    – Alex
    Nov 14 at 12:23












  • Are you using cider-jack-in to connect to the REPL in CIDER?
    – Aleph Aleph
    Nov 14 at 13:41










  • Yes, I use cider-jack-in. I've also added some more information to the question.
    – Alex
    Nov 14 at 17:29










  • This message latlng->point already refers to: #'the-divine-cheese-code.svg/latlng->point probably means that you had a file the_divine_cheese_code/svg.clj and then moved its contents to another file. Have you tried restarting the CIDER repl?
    – Aleph Aleph
    Nov 15 at 9:18












  • I've tried 'cider-quit', 'cider-jack-in' and after that I've got the original classpath error.
    – Alex
    Nov 15 at 16:38
















As you expected, this still doesn't work in CIDER. The error is the same.
– Alex
Nov 14 at 12:23






As you expected, this still doesn't work in CIDER. The error is the same.
– Alex
Nov 14 at 12:23














Are you using cider-jack-in to connect to the REPL in CIDER?
– Aleph Aleph
Nov 14 at 13:41




Are you using cider-jack-in to connect to the REPL in CIDER?
– Aleph Aleph
Nov 14 at 13:41












Yes, I use cider-jack-in. I've also added some more information to the question.
– Alex
Nov 14 at 17:29




Yes, I use cider-jack-in. I've also added some more information to the question.
– Alex
Nov 14 at 17:29












This message latlng->point already refers to: #'the-divine-cheese-code.svg/latlng->point probably means that you had a file the_divine_cheese_code/svg.clj and then moved its contents to another file. Have you tried restarting the CIDER repl?
– Aleph Aleph
Nov 15 at 9:18






This message latlng->point already refers to: #'the-divine-cheese-code.svg/latlng->point probably means that you had a file the_divine_cheese_code/svg.clj and then moved its contents to another file. Have you tried restarting the CIDER repl?
– Aleph Aleph
Nov 15 at 9:18














I've tried 'cider-quit', 'cider-jack-in' and after that I've got the original classpath error.
– Alex
Nov 15 at 16:38




I've tried 'cider-quit', 'cider-jack-in' and after that I've got the original classpath error.
– Alex
Nov 15 at 16:38


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53280177%2fopening-leiningen-project-in-emacs-cider-raises-classpath-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?