Re: Using dev/user.clj breaks java compilation

2015-01-02 Thread Thomas Heller
I had a similar problem some time ago.

The analysis is correct that Clojure will always load user.clj. As a 
workarround I just moved the require out of the ns form.

(ns user
  (:require [mdg.meat2]))

becomes

(ns user)

(defn start []
  (require 'mdg.meat2 :reload-all)
  (do-something-useful))

This will basically load everything "on-demand" (eg. when you call the 
start function) instead of always.

HTH,
/thomas

On Friday, January 2, 2015 9:03:22 PM UTC+1, David James wrote:
>
> I noticed this issue which I'm currently facing:
> https://github.com/technomancy/leiningen/issues/1477
>
> Technomancy commented in the issue: "This appears to be a bug in Clojure 
> causing an incorrect error message that's masking the actual issue. What's 
> happening here is that the javac task is invoking some Clojure code which 
> performs the Java compilation, but before this code runs, Clojure runs 
> user.clj first. (Leiningen doesn't have any control over this.) Since this 
> contains a call to a file that imports TestClass, you've created a circular 
> dependency. I don't know why you get this error message; it seems to be an 
> issue with Clojure itself."
>
> Do others agree that this is an issue with Clojure itself?
>
> I haven't seen any tickets in JIRA pertaining to this. Did I overlook one?
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using dev/user.clj breaks java compilation

2015-01-02 Thread David James
I noticed this issue which I'm currently facing:
https://github.com/technomancy/leiningen/issues/1477

Technomancy commented in the issue: "This appears to be a bug in Clojure 
causing an incorrect error message that's masking the actual issue. What's 
happening here is that the javac task is invoking some Clojure code which 
performs the Java compilation, but before this code runs, Clojure runs 
user.clj first. (Leiningen doesn't have any control over this.) Since this 
contains a call to a file that imports TestClass, you've created a circular 
dependency. I don't know why you get this error message; it seems to be an 
issue with Clojure itself."

Do others agree that this is an issue with Clojure itself?

I haven't seen any tickets in JIRA pertaining to this. Did I overlook one?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.