wondering why spec.test/instrument doesn't check :ret

2016-08-06 Thread Tom Connors
spec.test/instrument doesn't check the return value of spec'd functions and 
according to the spec guide this is because we should be checking function 
implementations at testing time, not development time. It seems to me that 
adding :ret and :fn checks to instrumented functions would be worthwhile 
even though tests are a better place to do those checks - since 
instrumentation is meant to be turned off in production the performance hit 
doesn't matter, and since we're already verifying that the arguments 
conform to spec, why not check the return value as well? A benefit would be 
that if we haven't yet written (or won't write) generators and tests, we 
still get a confidence increase about our instrumented functions' return 
values. 
I'm sure this was considered, so I'm just wondering if "do that in your 
tests" is the entire reason for this design choice.

-- 
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.


Re: wondering why spec.test/instrument doesn't check :ret

2016-08-07 Thread Tom Connors
Thank you both for the responses and links, they've been helpful.

On Saturday, August 6, 2016 at 1:02:16 PM UTC-4, Tom Connors wrote:
>
> spec.test/instrument doesn't check the return value of spec'd functions 
> and according to the spec guide this is because we should be checking 
> function implementations at testing time, not development time. It seems to 
> me that adding :ret and :fn checks to instrumented functions would be 
> worthwhile even though tests are a better place to do those checks - since 
> instrumentation is meant to be turned off in production the performance hit 
> doesn't matter, and since we're already verifying that the arguments 
> conform to spec, why not check the return value as well? A benefit would be 
> that if we haven't yet written (or won't write) generators and tests, we 
> still get a confidence increase about our instrumented functions' return 
> values. 
> I'm sure this was considered, so I'm just wondering if "do that in your 
> tests" is the entire reason for this design choice.
>

-- 
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.


Seeking a function to partially parallelize collection processing

2017-06-16 Thread Tom Connors
I'm looking for a function that would likely be named something like 
"sequential-by" or "parallel-per" that takes some data-producing thing like 
a lazy seq or a core async channel, a function to split records from that 
input, and a function to handle each item. Each item with an identical 
return value from the "split" function would be handled sequentially, while 
the handling of the collection as a whole would be parallel.

If we assume this signature:
(parallel-per splitter handler inputs)


Calling it like this:
(parallel-per :id
  (fn [m] (prn (update m :val inc)))
  [{:id 1 :val 1}, {:id 1 :val 2}, {:id 3 :val 1}])


Would result in the first two maps being handled sequentially, while the 
third map is handled in parallel with the first two. The order of the 
printed lines would probably be non-deterministic, except {:id 1 :val 2} 
would be printed before {:id 1 :val 3}.

Note that for my use case I don't care about return values, but if 
something like this already exists it's plausible that it returns something 
equivalent to (map handler inputs).

Does anything like this already exist in core or some lib? If not, any 
recommendations for how to build it?

-- 
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.


Re: Seeking a function to partially parallelize collection processing

2017-06-16 Thread Tom Connors
Hello Jose,
Thank you for the response, but pmap does not address my use case. It's 
insufficient for two reasons: 1) the entire collection must fit in memory. 
My use case is handling records from a Kinesis stream. and 2) pmap 
parallelizes over the whole collection, whereas I want to parallelize the 
collection handling while handling subsets of the data sequentially, as I 
discussed in my first post.
- Tom

On Friday, June 16, 2017 at 10:13:11 AM UTC-4, Tom Connors wrote:
>
> I'm looking for a function that would likely be named something like 
> "sequential-by" or "parallel-per" that takes some data-producing thing like 
> a lazy seq or a core async channel, a function to split records from that 
> input, and a function to handle each item. Each item with an identical 
> return value from the "split" function would be handled sequentially, while 
> the handling of the collection as a whole would be parallel.
>
> If we assume this signature:
> (parallel-per splitter handler inputs)
>
>
> Calling it like this:
> (parallel-per :id
>   (fn [m] (prn (update m :val inc)))
>   [{:id 1 :val 1}, {:id 1 :val 2}, {:id 3 :val 1}])
>
>
> Would result in the first two maps being handled sequentially, while the 
> third map is handled in parallel with the first two. The order of the 
> printed lines would probably be non-deterministic, except {:id 1 :val 2} 
> would be printed before {:id 1 :val 3}.
>
> Note that for my use case I don't care about return values, but if 
> something like this already exists it's plausible that it returns something 
> equivalent to (map handler inputs).
>
> Does anything like this already exist in core or some lib? If not, any 
> recommendations for how to build it?
>

-- 
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.


Re: Seeking a function to partially parallelize collection processing

2017-06-16 Thread Tom Connors
Thanks Justin. My mistake. Point 2 stands.

On Friday, June 16, 2017 at 3:58:38 PM UTC-4, Justin Smith wrote:
>
> pmap is rarely actually useful, but point 1 is false, pmap doesn't require 
> that it's input or output fit in memory
>
> On Fri, Jun 16, 2017 at 12:52 PM Tom Connors  > wrote:
>
>> Hello Jose,
>> Thank you for the response, but pmap does not address my use case. It's 
>> insufficient for two reasons: 1) the entire collection must fit in memory. 
>> My use case is handling records from a Kinesis stream. and 2) pmap 
>> parallelizes over the whole collection, whereas I want to parallelize the 
>> collection handling while handling subsets of the data sequentially, as I 
>> discussed in my first post.
>> - Tom
>>
>> On Friday, June 16, 2017 at 10:13:11 AM UTC-4, Tom Connors wrote:
>>>
>>> I'm looking for a function that would likely be named something like 
>>> "sequential-by" or "parallel-per" that takes some data-producing thing like 
>>> a lazy seq or a core async channel, a function to split records from that 
>>> input, and a function to handle each item. Each item with an identical 
>>> return value from the "split" function would be handled sequentially, while 
>>> the handling of the collection as a whole would be parallel.
>>>
>>> If we assume this signature:
>>> (parallel-per splitter handler inputs)
>>>
>>>
>>> Calling it like this:
>>> (parallel-per :id
>>>   (fn [m] (prn (update m :val inc)))
>>>   [{:id 1 :val 1}, {:id 1 :val 2}, {:id 3 :val 1}])
>>>
>>>
>>> Would result in the first two maps being handled sequentially, while the 
>>> third map is handled in parallel with the first two. The order of the 
>>> printed lines would probably be non-deterministic, except {:id 1 :val 2} 
>>> would be printed before {:id 1 :val 3}.
>>>
>>> Note that for my use case I don't care about return values, but if 
>>> something like this already exists it's plausible that it returns something 
>>> equivalent to (map handler inputs).
>>>
>>> Does anything like this already exist in core or some lib? If not, any 
>>> recommendations for how to build it?
>>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.


Re: Seeking a function to partially parallelize collection processing

2017-06-19 Thread Tom Connors
Thanks Jose and Sam for the suggestions. I'm having some trouble figuring 
out the lifecycle for the channels created for each return value from the 
splitter function. I'll post my code once I have something I think works in 
case it's interesting to anyone in the future.

-- 
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.


Re: Seeking a function to partially parallelize collection processing

2017-06-20 Thread Tom Connors
Thanks for the suggestion, Didier, but I was unable to find a way to make 
pmap work for my use case. For those interested, here's what I came up 
with, then some  questions:

(defn parallel-per
  "Handle records from input-chan in parallel, but records with matching 
`splitter` return values serially."
  [splitter handler input-chan]
  (let [blockers (atom {}) ;; map of group-key to [chan num-remaining]
status-chan (async/chan)]
(async/go-loop []
  (let [[val port] (async/alts! [input-chan status-chan])]
(if (= port input-chan)
  (if (some? val)
(let [group-key (splitter val)]
  (if-let [blocker (get @blockers group-key)]
(let [[blocker-chan ^long num-remaining] blocker
  next-blocker-chan (async/chan)]
  (swap! blockers assoc group-key [next-blocker-chan (inc 
num-remaining)])
  (async/go
(async/ num-remaining 1)
  (do
(swap! blockers update-in [group-key 1] dec)
(recur))
  (do
(swap! blockers dissoc group-key)
(recur)))
nil))

Does anything in here look bad? Is there a way to gracefully handle 
input-chan closing without using loop/recur? I'm using a new channel for 
every new record to block the next record with the same `splitter` return 
value - my first approach used one channel per distinct `splitter` value, 
but I saw some results printed out of order. Does this mean that the order 
of takes from 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.


Re: Seeking a function to partially parallelize collection processing

2017-06-20 Thread Tom Connors
Thanks, Justin. Regarding the mixing of program logic with channel io, I'm 
don't understand why that's a problem in this case or how it could be 
improved. Do you mind explaining that a bit more?

-- 
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.


Re: Seeking a function to partially parallelize collection processing

2017-06-20 Thread Tom Connors
Great, I'll watch that video. Thanks again.

-- 
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.


Re: Seeking a function to partially parallelize collection processing

2017-06-26 Thread Tom Connors
Thanks for these two examples, Didier. In particular, I like the second one 
a lot. I'm currently using a slightly altered version of my first solution 
that avoids batching, but the code has gotten pretty nasty. Once I get a 
chance I'll cleanup my solution and benchmark yours and mine and post here 
for posterity.

-- 
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.


Re: Releasing d2q, a simple, efficient, generally applicable engine for implementing graph-pulling API servers in Clojure. Feedback wanted!

2018-10-25 Thread Tom Connors
I scanned through the readme and the tutorial and I'm definitely interested 
to give this lib a try in my own applications.

To answer your questions:
- The value prop is clear an appealing, but you might want to add a 
comparison directly against Om-next in addition to the Pathom comparison
- No criticism of the design choices, but the resolver functions in the 
tutorial are a bit busy at a glance, especially since they are responsible 
for the wrapping w/ mfd/future and d2q/result-cell. I suppose some helper 
functions/macros could make that look cleaner. I also think namespacing the 
d2q keywords would make it easier to scan.
- I'd put query expressiveness and real-world examples (authorization, more 
complex schemas, etc) as tied for most important future work.

I'm eager to see where you take this library.

On Thursday, October 25, 2018 at 4:45:57 AM UTC-4, Val Waeselynck wrote:
>
> I'm happy to release d2q , a library 
> for implementing graph-pulling server backends, playing in the same space 
> as Lacinia or Pathom 
> , with an emphasis on simplicity, 
> generality and performance:
>
> https://github.com/alvalval/d2q
>
> This library has been used internally on a previous project for months, 
> I've just removed the application-specific parts and added documentation.
>
> Before developing this any further, I'm now looking for feedback:
>
>- 
>
>Do you find the value proposition clear and appealing?
>- 
>
>Any criticism of the design choices?
>- 
>
>I see many potential directions for future development, which are 
>important to you? (enhance query expressiveness with new features / better 
>docs / add specs / integration with GraphQL or Om.Next / more helpers for 
>integrating data sources)
>
> Cheers,
>

-- 
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.


Re: [ANN] Clojure 1.10 has been released!

2018-12-17 Thread Tom Connors
Thanks a bunch to everyone involved. Your work is greatly appreciated!

On Monday, December 17, 2018 at 12:30:01 PM UTC-5, Alex Miller wrote:
>
> Clojure 1.10 focuses on two major areas: improved error reporting and Java 
> compatibility.
>
>
> Error reporting at the REPL now categorizes 
>  errors 
> based on their phase of execution (read, macroexpand, compile, etc). Errors 
> carry additional information about location and context as data, and 
> present phase-specific error messages with better location reporting. This 
> functionality is built into the clojure.main REPL, but the functionality is 
> also available to other REPLs and tools with the ability to use and/or 
> modify the data to produce better error messages.
>
>
> Clojure 1.10 now requires Java 8 or above and has been updated 
> particularly for compatibility with Java 8 and Java 11. Changes included 
> bytecode-related bug fixes, removed use of deprecated APIs, and updates 
> related to the module system introduced in Java 9.
>
>
> See the change log 
> 
>  
> for a complete list of all fixes, enhancements, and new features in Clojure 
> 1.10.
>
>
> Thanks to all of the community members who contributed patches to Clojure 
> 1.10 (first time contributors in bold):
>
>
>- 
> *Alexander Kiel *
>- *Ben Bader*
>- Bruce Adams
>- *Cezary Kosko*
>- Erik Assum
>- *Eugene Kostenko*
>- Ghadi Shayban
>- *Gijs Stuurman*
>- Jozef Wagner
>- 
> *Kwang Yul Seo *
>- *Matthew Gilliard*
>- MichaƂ Marczyk
>- Nicola Mometto
>- Nikita Prokopov
>- 
> *Sean Corfield *
>- *Sebastien Martel*
>- Shogo Ohta
>- Stuart Sierra
>
>

-- 
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.


Uberjar woes

2014-02-27 Thread Tom Connors
Hi Everyone,
I've been having trouble creating an uberjar of a project and I'm hoping 
someone here can point me toward a solution.
After cleaning out the target directory (with "lein clean") and 
preprocessing my cljx, I can run the project with no trouble using lein 
repl and lein run. I can package up the project (lein with-profile prd 
uberjar) and get the resultant jar files. After that, the trouble starts. 
Running the jar (java -jar my-standalone.jar) fails with a 
NoClassDefFoundError error, pointing at a protocol defined in 
weaverjester's clout - clout/core/Route. 
I highly doubt clout actually has anything to do with the problem. After 
creating the uberjar, I can no longer run the project with lein run or lein 
repl - I get the same error, and I can't do anything with lein without 
getting that error until I remove the target directory. 
I've inspected the jar and can see that it contains clout, but just 
clout/core.clj - no .class files. I edited clout's project.clj to include 
:aot :all, packaged it into a jar, replaced the clout jar in my local maven 
repo with that new jar, and re-packaged my project. At this point, when I 
ran the jar, I got another NoClassDefFoundError, this time pointing at 
another protocol, but this one from clojure.core: clojure/lang/ILookupHost.
I've been having this problem with the latest leiningen (2.3.4) and 2.2.0. 
I've been futzing with my project.clj for some time, but to no avail. Any 
help greatly appreciated.
-Tom

-- 
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/groups/opt_out.


Re: Uberjar woes

2014-02-27 Thread Tom Connors
Hi Sam, thanks a lot for responding. Here's my project.clj: 
https://gist.github.com/tomconnors/9261413

On Thursday, February 27, 2014 2:49:38 PM UTC-5, Tom Connors wrote:
>
> Hi Everyone,
> I've been having trouble creating an uberjar of a project and I'm hoping 
> someone here can point me toward a solution.
> After cleaning out the target directory (with "lein clean") and 
> preprocessing my cljx, I can run the project with no trouble using lein 
> repl and lein run. I can package up the project (lein with-profile prd 
> uberjar) and get the resultant jar files. After that, the trouble starts. 
> Running the jar (java -jar my-standalone.jar) fails with a 
> NoClassDefFoundError error, pointing at a protocol defined in 
> weaverjester's clout - 
> <https://github.com/weavejester/clout>clout/core/Route. 
> I highly doubt clout actually has anything to do with the problem. After 
> creating the uberjar, I can no longer run the project with lein run or lein 
> repl - I get the same error, and I can't do anything with lein without 
> getting that error until I remove the target directory. 
> I've inspected the jar and can see that it contains clout, but just 
> clout/core.clj - no .class files. I edited clout's project.clj to include 
> :aot :all, packaged it into a jar, replaced the clout jar in my local maven 
> repo with that new jar, and re-packaged my project. At this point, when I 
> ran the jar, I got another NoClassDefFoundError, this time pointing at 
> another protocol, but this one from clojure.core: clojure/lang/ILookupHost.
> I've been having this problem with the latest leiningen (2.3.4) and 2.2.0. 
> I've been futzing with my project.clj for some time, but to no avail. Any 
> help greatly appreciated.
> -Tom
>

-- 
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/groups/opt_out.


Re: Uberjar woes

2014-04-11 Thread Tom Connors
Hi Josh,
My solution ended up being pretty lame: I stopped calling a function from 
clout, and the uberjar magically worked, as disappointing as that 
explanation is. As far as I could tell, the root cause of my problem was 
that clout depends on an old version of clojure (1.2, if I recall 
correctly) that defined a protocol that no longer exists in newer versions.
It doesn't look to me like you're getting the error for the same reason. 
Have you tried the standard things, like blow away the target directory and 
make sure you've required the ns before using its vars? How about.. and I 
hate this idea too... one by one, remove dependencies + code that uses 
them, and see if you can get a working jar? 
When you do manage to figure this out, please post back here, as I'd like 
to understand this error better (it sure is annoying, huh?).

On Thursday, February 27, 2014 2:49:38 PM UTC-5, Tom Connors wrote:
>
> Hi Everyone,
> I've been having trouble creating an uberjar of a project and I'm hoping 
> someone here can point me toward a solution.
> After cleaning out the target directory (with "lein clean") and 
> preprocessing my cljx, I can run the project with no trouble using lein 
> repl and lein run. I can package up the project (lein with-profile prd 
> uberjar) and get the resultant jar files. After that, the trouble starts. 
> Running the jar (java -jar my-standalone.jar) fails with a 
> NoClassDefFoundError error, pointing at a protocol defined in 
> weaverjester's clout - 
> <https://github.com/weavejester/clout>clout/core/Route. 
> I highly doubt clout actually has anything to do with the problem. After 
> creating the uberjar, I can no longer run the project with lein run or lein 
> repl - I get the same error, and I can't do anything with lein without 
> getting that error until I remove the target directory. 
> I've inspected the jar and can see that it contains clout, but just 
> clout/core.clj - no .class files. I edited clout's project.clj to include 
> :aot :all, packaged it into a jar, replaced the clout jar in my local maven 
> repo with that new jar, and re-packaged my project. At this point, when I 
> ran the jar, I got another NoClassDefFoundError, this time pointing at 
> another protocol, but this one from clojure.core: clojure/lang/ILookupHost.
> I've been having this problem with the latest leiningen (2.3.4) and 2.2.0. 
> I've been futzing with my project.clj for some time, but to no avail. Any 
> help greatly appreciated.
> -Tom
>

-- 
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.


Re: Uberjar woes

2014-04-14 Thread Tom Connors
Thanks for that tip, James - I'll look through the jars of my dependencies 
for spurious classes and post back here if I find anything that might be of 
value to future reader of this thread.

On Thursday, February 27, 2014 2:49:38 PM UTC-5, Tom Connors wrote:
>
> Hi Everyone,
> I've been having trouble creating an uberjar of a project and I'm hoping 
> someone here can point me toward a solution.
> After cleaning out the target directory (with "lein clean") and 
> preprocessing my cljx, I can run the project with no trouble using lein 
> repl and lein run. I can package up the project (lein with-profile prd 
> uberjar) and get the resultant jar files. After that, the trouble starts. 
> Running the jar (java -jar my-standalone.jar) fails with a 
> NoClassDefFoundError error, pointing at a protocol defined in 
> weaverjester's clout - 
> <https://github.com/weavejester/clout>clout/core/Route. 
> I highly doubt clout actually has anything to do with the problem. After 
> creating the uberjar, I can no longer run the project with lein run or lein 
> repl - I get the same error, and I can't do anything with lein without 
> getting that error until I remove the target directory. 
> I've inspected the jar and can see that it contains clout, but just 
> clout/core.clj - no .class files. I edited clout's project.clj to include 
> :aot :all, packaged it into a jar, replaced the clout jar in my local maven 
> repo with that new jar, and re-packaged my project. At this point, when I 
> ran the jar, I got another NoClassDefFoundError, this time pointing at 
> another protocol, but this one from clojure.core: clojure/lang/ILookupHost.
> I've been having this problem with the latest leiningen (2.3.4) and 2.2.0. 
> I've been futzing with my project.clj for some time, but to no avail. Any 
> help greatly appreciated.
> -Tom
>

-- 
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.