-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uberjar-ed program using plumbing library above 0.3.4 throws exception #74
Comments
below is the output of lein version.
|
Thanks for the detailed report. I can reproduce locally, but don't have much experience with AOT compilation so I'm not really sure what's going on here. I suspect it's something to do with this: My guess is that uberjar will work fine without AOT compilation. Do you have any suggestions for how to resolve the issue? Did this work on previous versions of plumbing, and if so, what's the latest working version you know of? Thanks again. |
The latest working version was 0.3.3. |
I'm not sure of better way to workaround that issue, so I upvoted CLJ-1195 for now... |
Great, thanks! FYI, I think it should be a one-character fix (' to `), if On Wed, Nov 19, 2014 at 9:28 PM, Kei Tsuji notifications@github.com wrote:
|
thought I might poke my head in here and say that http://dev.clojure.org/jira/browse/CLJ-1591 will likely affect AOT compiled programs with |
Thanks for the heads up! On Sat, Nov 22, 2014 at 12:55 PM, Tom Crayford notifications@github.com
|
Just wanted to add another +1 to this issue as it's affecting us as well; we're okay just holding our version at 0.3.3 for now but it'd be great to see a fix. |
I suppose for now this could be worked around by moving the extend-protocol calls to another ns. Will see if I can get to that soon. Upvotes (or a patch) for http://dev.clojure.org/jira/browse/CLJ-1195 would also be appreciated. |
Gotcha. I'll see what I can come up with over the break -- thanks for On Thu, Dec 4, 2014 at 6:10 PM, Ursa americanus kermodei <
|
Just submitted a fix to Clojure: http://dev.clojure.org/jira/browse/CLJ-1195 Please vote for it if you like. Unfortunately, I don't think this will provide any immediate help since even if merged for 1.7, we'll want to keep schema and plumbing backwards-compatible for awhile. Still thinking about workarounds for the interim. |
+1...interested in workaround as soon as that comes. Added my vote on Jira for CLJ-1195. |
I've tried a couple things here, but nothing satisfactory yet. seems like On Tue, Feb 17, 2015 at 12:16 AM, Dave Della Costa <notifications@github.com
|
If I patch clojure with CLJ-1195, is it supposed to solve this issue or are further changes to prismatic and/or schema still required? AOT is a pretty big use-case, unfortunately, and I cannot afford to drop it. |
We don't use AOT so I can't state definitively, but I believe that a small additional change to schema will be required:
Unfortunately, I don't see a way to make this change that won't break clients without CLJ-1195. Suggestions? Or if you're willing to help set it up we could potentially maintain a separate branch / release for now. Thoughts? Thanks! |
Hi @w01fe , To get it working can you confirm here the required steps:
Thanks! |
@tangrammer Yep, I believe those should be the full steps. Are you having issues |
Hi Jason again! Trying to follow again your steps I got an error when using my modified&&installed prismatic/schema updated fork
This is my only commit that I had to do to current prismatic/schema This commit only reflects step one: Second step Then:
in my schema/target/generated/src/clj/schema/core.clj line 172 is this code
Am I doing it right? Thanks again |
Hi Juan, This looks like the reason we're not making this change in the core library Cheers, On Wed, Apr 29, 2015 at 4:42 AM, tangrammer notifications@github.com
|
Hi Jason
Thanks in advance! |
Hi Juan, Thanks for the update. Can you get any more information on the form that I looked at your fork and it seems like there may still be some unqualified -Jason On Thu, Apr 30, 2015 at 2:13 AM, tangrammer notifications@github.com
|
Here again and thanks for your interest! I pushed my changes to my https://github.com/tangrammer/schema . I didn't find more fn uses in core.cljx but not sure if I had to replace Still having same error :( but no descriptive message yet
Thanks! |
Hi Juan, I apologize, I had mistakenly thought my fix for the bug was merged into Clojure 1.7, but it's still hanging out in JIRA: Until this is merged, I'm not sure how to make headway on this issue except by making your own patched version of Clojure -- and I think it would work with the Schema and Plumbing versions you've created (as mentioned by @martinraison above). -Jason |
Ok, I'll wait until this fix was merged into clojure. |
Hi Jason & Juan, Apologies for not reaching back to you earlier. I just tried patching both Clojure 1.6 (which is the version we're using for the moment) and schema as you suggested (just adding the fn exclusion and removing the unmap as Juan did already). Everything seems to be working now. I'm not sure what's the best way to go from there, apart from upvoting CLJ-1195 and being patient. Thanks for being so responsive and keep up with the great work! |
Hey all, thanks for voting on CLJ-1195. In the future, if you have a blocker like this, please feel free to bring it up on the clojure-dev or clojure mailing list or mention it on the ticket itself - I am likely to see any of those. Until today, I wasn't aware this was a blocker for anyone and it wasn't in the 1.7 consideration list. No guarantees on anything but I will discuss it with Rich. I did notice the bump in votes! |
Thanks @puredanger ! |
Thanks @puredanger -- much appreciated! |
FYI, CLJ-1195 has been approved by Rich for next release of 1.7. |
@puredanger ( ゚◡゚)/ |
Thanks @puredanger ! |
Now that there's a (beta) release of Clojure with the patch (thanks again @puredanger !), we can talk about next steps. We don't want to break compatibility with other Clojure versions (which the fix will do), so maybe the best option is for us to release two parallel schema artifacts to Clojars, one for 1.7 (with the fix) and one without. (I don't think any plumbing changes would be required, since you can just override the schema version). Seem reasonable? Are there simpler ways to make this work that I'm missing? I guess one alternative is to try to condition on the Clojure version in the code, but that seems like it would be really messy (and possibly cause other unforseen problems). If we go with the above approach, is anyone willing to help set up the parallel builds / maven artifacts? I'm more than willing to maintain a 1.7 branch and cut two releases for the time being, but this is new territory so help (in the form of a PR or otherwise) would be very welcome. Thanks! |
Hi Jackson, Thanks! |
Thanks Juan. I don't have much in the way of requirements, just a setup that makes it as easy as possible to maintain a backwards-compatible master branch, a 1.7 branch consisting of master plus the fix, and an easy way to deploy different artifacts for the two (I suppose this could just be changes to the project file in the 1.7 branch). I'm just not sure how to set this up most effectively, and e.g., whether maven artifact classifiers are the right way to separate the artifacts. |
Maven classifiers are commonly used for this purpose. You might really consider using a version conditional in your code instead and sticking with a single artifact. Instaparse did something like this recently when the internal method they were calling changed in 1.7 - Engelberg/instaparse@14c29fb and there are similar things in other libs that support multiple Clojure versions. |
Thanks Alex! We're a bit hesitant about the single-artifact solution because it's a bit hairy -- the conditionals would need to interact with the ns declaration itself, and I don't yet have a good intuitive sense for the kinds of things that will mess with AOT (having never used it myself). But if that doesn't sound problematic to you, maybe we'll give that a try first. |
Sounds hairy! But probably worth trying at least before adopting multiple jars.
|
Hi, I think I have a single-artifact fix based on Alex's suggestion. I'll create a PR in a bit |
Thanks @martinraison for the fix (HT @puredanger)! If anyone with AOT issues could try out the latest plumbing with overrides
and confirm (or deny) a fix, that would be much appreciated. After confirmation, we will cut new schema and plumbing releases ASAP. Thanks again to everyone for the help with this issue. |
Hi guys!
Thanks again! |
@tangrammer Can you please provide a test repo/project and commands so we can reproduce? That would be really helpful. Thanks! |
Working fine now! |
Thanks everyone for your patience and help! I've just cut two new releases: [prismatic/schema "0.4.3"]
[prismatic/plumbing "0.4.4"] (the only change to Plumbing is to bump the schema dependency). Please reopen and let us know if you still have trouble with AOT with these latest versions and |
Thanks @w01fe for pushing that so fast! |
Hi,
I found this issue where uberjar-ed program using plumbing library above 0.3.4 throws exception.
Below is the minimal sample to reproduce this issue.
then execute below in shell.
Below is the exception message that I'm getting.
I tried release 0.3.4, 0.3.5, and current-master, but they all fail the same way.
The text was updated successfully, but these errors were encountered: