Skip to content
Snippets Groups Projects
Unverified Commit e759f620 authored by Cam Saul's avatar Cam Saul
Browse files

Revert tree-shaking

parent 894a61c3
No related branches found
No related tags found
No related merge requests found
......@@ -121,17 +121,6 @@
"-Djava.awt.headless=true"] ; prevent Java icon from randomly popping up in dock when running `lein ring server`
:javac-options ["-target" "1.8", "-source" "1.8"]
:uberjar-name "metabase.jar"
:uberjar-exclusions [
#_#"\.clj(c)?$"
#"project\.clj$"
#"\.java$"
#"\.md$"
#"README\.\w{2,3}$"
#"\.js\.map$"
#"\.css\.map$"
#"pom\.xml$"
#"pom\.properties$"
#"package\.html$"]
:ring {:handler metabase.core/app
:init metabase.core/init!
:destroy metabase.core/destroy
......@@ -184,10 +173,7 @@
"-Dmb.api.key=test-api-key"
"-Duser.language=en"]}
;; build the uberjar with `lein uberjar`
:uberjar {:aot :all
:jvm-opts ["-Dclojure.compiler.elide-meta=[:doc :added :file :line]"]
;; it seems like this only works for Metabase and not for dependencies
:omit-source true}
:uberjar {:aot :all}
;; generate sample dataset with `lein generate-sample-dataset`
:generate-sample-dataset {:dependencies [[faker "0.2.2"]] ; Fake data generator -- port of Perl/Ruby library
:source-paths ["sample_dataset"]
......
......@@ -23,6 +23,14 @@
;; It shows up a solid 10-15 seconds before the "Starting Metabase in STANDALONE mode" message because so many other namespaces need to get loaded
(log/info (trs "Loading Metabase..."))
;; Log the maximum memory available to the JVM at launch time as well since it is very handy for debugging things
(log/info (trs "Maximum memory available to JVM: {0}"
(loop [mem (.maxMemory (Runtime/getRuntime)), [suffix & more] ["B" "KB" "MB" "GB"]]
(if (and (seq more)
(>= mem 1024))
(recur (/ mem 1024.0) more)
(format "%.1f %s" mem suffix)))))
;; Set the default width for pprinting to 200 instead of 72. The default width is too narrow and wastes a lot of space
;; for pprinting huge things like expanded queries
(intern 'clojure.pprint '*print-right-margin* 200)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment