This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-06
Channels
- # admin-announcements (59)
- # announcements (1)
- # beginners (67)
- # boot (140)
- # cljsrn (8)
- # clojure (70)
- # clojure-berlin (18)
- # clojure-dev (7)
- # clojure-russia (53)
- # clojurescript (124)
- # clojurescript-ios (3)
- # clojurewerkz (2)
- # clojurex (10)
- # code-reviews (42)
- # cursive (9)
- # datomic (2)
- # editors-rus (2)
- # emacs (5)
- # events (1)
- # hoplon (35)
- # jobs (8)
- # ldnclj (7)
- # lein-figwheel (34)
- # luminus (1)
- # om (410)
- # onyx (22)
- # overtone (19)
- # portland-or (6)
- # re-frame (1)
- # yada (4)
struggling with this error when trying to create an uberjar with lein uberjar
Uberjar aborting because jar failed: clojure.lang.MapEntry cannot be cast to clojure.lang.IPersistentMap
will look closer there
thanks
probably a stupid question, but do you have to separate your clj and cljs files into different directories and only specify the latter in source-paths for cljsbuild?
:profiles {:dev {:plugins [[lein-cljsbuild "1.1.0"]
[lein-figwheel "0.4.1" :exclusions [org.clojure/clojure
org.codehaus.plexus/plexus-utils]]]
:dependencies [[reloaded.repl "0.2.0"]]
:env {:dev? true}
:main zoom-recordings.server.core
:open-browser? true
:source-paths ["dev" "src/zoom_recordings/server"]
:cljsbuild {:builds [{:source-paths ["src/zoom_recordings/ui"]
:figwheel true
:compiler {:output-to "target/classes/public/js/app.js"
:output-dir "target/classes/public/js/out"
:asset-path "js/out"
:optimizations :none
:recompile-dependents true
:main "zoom-recordings.ui.core"
:source-map true}}]}}})
ok, that seems like what i have
do you have an :uberjar section under :profiles?
:uberjar-common {:aot :all
:omit-source true
:source-paths ["src"]
:main pasmo-gigi.geo.server
:env {:dev? false}
:hooks [leiningen.cljsbuild]
:cljsbuild {:builds {:app {:source-paths ["src/pasmo_gigi/geo/ui"]
:jar true
:figwheel false
:compiler {:optimizations :advanced
:main "pasmo-gigi.geo.ui.core"
:output-wrapper true
:asset-path "js/out"
:output-to "target/classes/public/js/app.js"
:output-dir "target/classes/public/js/out"
:externs ["resources/public/js/externs.js"]}}}}}
:uberjar-env-vars {:mongo-uri (System/getenv "MONGO_URI")
:db (System/getenv "DB")
:default-admin (System/getenv "DEFAULT_ADMIN")
:client-id (System/getenv "CLIENT_ID")
:client-secret (System/getenv "CLIENT_SECRET")
:oauth-callback (System/getenv "OAUTH_CALLBACK")
:auth-url (System/getenv "AUTH_URL")
:token-url (System/getenv "TOKEN_URL")
:profile-url (System/getenv "PROFILE_URL")}
:uberjar [:uberjar-common :uberjar-env-vars]})
one difference is that in dev
I have a dev
directory with a repl.clj
that I use for restarting the component if I need to during development
are the cljsbuild builds under uberjar indepedent of the ones specified at the top level? for example, if you had an :app
section under :cljsbuild above, does that have anything to do with the one under :uberjar?
also, when you got the IPersistentMap error, was it a syntax thing, or a configuration issue?
one sec, I’ll post mine with comments in the spots I’m referring to
line 49 and line 70
:cljsbuild {:builds {:min ;; Does this have anything to do with...
{:jar true
:compiler
{:optimizations :advanced
:pretty-print false}}}}
I can see from your example that even if it’s not the issue, I should move some dependencies to just be dev dependencies
thanks
something also seems to be circular, i see output like this before it crashes
λ lein uberjar
Compiling simoutfit.db
Compiling simoutfit.server
Compiling user
Compiling simoutfit.db
Compiling simoutfit.server
Compiling user
Compiling simoutfit.db
Compiling simoutfit.server
Compiling user
Uberjar aborting because jar failed: clojure.lang.MapEntry cannot be cast to clojure.lang.IPersistentMap
user.clj is just this though:
(ns user
(:require [ragtime.jdbc :as jdbc]
[ragtime.repl :as rtr]))
(defn load-config []
{:datastore (jdbc/sql-database (str "jdbc:"
(System/getenv "SIMOUTFIT_DB_PWD")))
:migrations (jdbc/load-resources "migrations")})
(defn migrate []
(println "migrating")
(rtr/migrate (load-config)))
(defn rollback []
(println "rolling back last migration")
(rtr/rollback (load-config)))
no (to the former)
I was getting some errors related to that before, not at the moment
Hard to tell. I would try compiling without cljsbuild and see if that works. More in an effort to try to isolate the problem
My gut tells me there dis probably some circular dependency in ur clj code. Which is causing the same files to be compiled 3x.
thanks
i appreciate your help
this was at least part of the issue, I wonder if that’s documented somewhere
(the linked comments at the end, not that whole issue)
I'm newish to emacs and almost completely new to clojure. I was wondering if anyone has configured org-Babel to compile source code in a figwheel repl via inf-clojure
I've got a function that should be returning a vector [a b c]
, but is returning ([a b c])
instead. What's the best way to get rid of the outer parens in the function that is calling it?
I’d probably need to see the code but you’re just returning a list the first element of which happens to be a vector.
You could get around it by wrapping the result in a first
but that’s treating the symptom and not the cause.
I'll build a simplified example, it's a little complicated to post right now
Ok, I just needed to add into []
to get that part to work.
Thanks for the suggestion, it got me on the right track