Skip to content
Snippets Groups Projects
Unverified Commit 91afaea6 authored by Dennis Schridde's avatar Dennis Schridde Committed by GitHub
Browse files

Revert "Compile with direct_link=true (#28357)" and "Respect MB_COLORIZE_LOGS...

Revert "Compile with direct_link=true (#28357)" and "Respect MB_COLORIZE_LOGS and MB_EMOJI_IN_LOGS environment variables (#31612)" (#31732)

This can cause environment variables set at compile time to affect runtime,
cf. https://github.com/metabase/metabase/issues/30518.

We keep the changes to JVM options and logging startup time, since they
were independently useful.

This reverts commit e3285698 and commit 380cd8a3.
parent 9a30fb6f
No related branches found
No related tags found
No related merge requests found
...@@ -80,11 +80,10 @@ ...@@ -80,11 +80,10 @@
ns-decls (u/step "Determine compilation order for Metabase files" ns-decls (u/step "Determine compilation order for Metabase files"
(metabase-namespaces-in-topo-order basis))] (metabase-namespaces-in-topo-order basis))]
(with-duration-ms [duration-ms] (with-duration-ms [duration-ms]
(b/compile-clj {:basis basis (b/compile-clj {:basis basis
:src-dirs paths :src-dirs paths
:class-dir class-dir :class-dir class-dir
:ns-compile ns-decls :ns-compile ns-decls})
:compile-opts {:direct-linking true}})
(u/announce "Finished compilation in %.1f seconds." (/ duration-ms 1000.0)))))) (u/announce "Finished compilation in %.1f seconds." (/ duration-ms 1000.0))))))
(defn copy-resources! [edition basis] (defn copy-resources! [edition basis]
...@@ -97,10 +96,9 @@ ...@@ -97,10 +96,9 @@
(defn create-uberjar! [basis] (defn create-uberjar! [basis]
(u/step "Create uberjar" (u/step "Create uberjar"
(with-duration-ms [duration-ms] (with-duration-ms [duration-ms]
(depstar/uber {:class-dir class-dir (depstar/uber {:class-dir class-dir
:uber-file uberjar-filename :uber-file uberjar-filename
:basis basis :basis basis})
:compile-opts {:direct-linking true}})
(u/announce "Created uberjar in %.1f seconds." (/ duration-ms 1000.0))))) (u/announce "Created uberjar in %.1f seconds." (/ duration-ms 1000.0)))))
(def manifest-entries (def manifest-entries
......
...@@ -322,7 +322,7 @@ ...@@ -322,7 +322,7 @@
(or (nil? x) (or (nil? x)
(f x))) (f x)))
(def ^String ^{:arglists '([emoji-string])} ^:redef emoji (def ^String ^{:arglists '([emoji-string])} emoji
"Returns the `emoji-string` passed in if emoji in logs are enabled, otherwise always returns an empty string." "Returns the `emoji-string` passed in if emoji in logs are enabled, otherwise always returns an empty string."
#?(:clj (if (config/config-bool :mb-emoji-in-logs) #?(:clj (if (config/config-bool :mb-emoji-in-logs)
identity identity
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
false false
(config/config-bool :mb-colorize-logs)))) (config/config-bool :mb-colorize-logs))))
(def ^{:arglists '(^String [color-symb x])} ^:redef colorize (def ^{:arglists '(^String [color-symb x])} colorize
"Colorize string `x` using `color`, a symbol or keyword, but only if `MB_COLORIZE_LOGS` is enabled (the default). "Colorize string `x` using `color`, a symbol or keyword, but only if `MB_COLORIZE_LOGS` is enabled (the default).
`color` can be `green`, `red`, `yellow`, `blue`, `cyan`, `magenta`, etc. See the entire list of avaliable `color` can be `green`, `red`, `yellow`, `blue`, `cyan`, `magenta`, etc. See the entire list of avaliable
colors [here](https://github.com/ibdknox/colorize/blob/master/src/colorize/core.clj)" colors [here](https://github.com/ibdknox/colorize/blob/master/src/colorize/core.clj)"
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
(validate-number-of-args format-string args) (validate-number-of-args format-string args)
`(SiteLocalizedString. ~format-string ~(vec args) {})) `(SiteLocalizedString. ~format-string ~(vec args) {}))
(def ^String ^{:arglists '([& args]) :redef true} str* (def ^String ^{:arglists '([& args])} str*
"Ensures that `trs`/`tru` isn't called prematurely, during compilation." "Ensures that `trs`/`tru` isn't called prematurely, during compilation."
(if *compile-files* (if *compile-files*
(fn [& _] (fn [& _]
......
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