This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-11
Channels
- # announcements (6)
- # babashka (7)
- # beginners (145)
- # biff (2)
- # calva (9)
- # cider (4)
- # circleci (9)
- # clj-commons (22)
- # clj-kondo (26)
- # cljs-dev (70)
- # cljsrn (4)
- # clojure (46)
- # clojure-australia (9)
- # clojure-europe (62)
- # clojure-nl (5)
- # clojure-norway (4)
- # clojure-spec (11)
- # clojure-uk (3)
- # clojurescript (18)
- # copenhagen-clojurians (1)
- # core-async (1)
- # cursive (13)
- # datahike (6)
- # datomic (47)
- # emacs (5)
- # events (2)
- # fulcro (13)
- # google-cloud (2)
- # gratitude (2)
- # helix (5)
- # honeysql (5)
- # hyperfiddle (31)
- # jobs (1)
- # jobs-discuss (6)
- # london-clojurians (1)
- # lsp (5)
- # off-topic (9)
- # polylith (12)
- # portal (18)
- # re-frame (5)
- # reagent (29)
- # releases (2)
- # shadow-cljs (43)
- # specter (1)
- # test-check (8)
- # vim (1)
- # xtdb (66)
Hello, I have a question about debugging release build. So I deployed my app to server and I'm running into an error there which isn't present on my local dev build. My problem is that I have no idea how to go about debugging it on the server, mainly due to the fact that the build is minified, there is no source maps, there is no re-frame-10x, etc. you get the point. I'm wondering if someone can give me some pointers on how to build a version that I can deploy to server without all these limitations. I'm using Shadow Cljs, if that helps. Thanks!
@nedim you can run shadow-cljs release app --debug
or shadow-cljs release app --pseudo-names
. first is pseudo-names + source maps, second is just pseudo-names. both make debugging much easier
or just :compiler-options {:source-map true}
in the build config to enable source maps in general for your release build
and I recommend just doing a release build locally and work on it there. no need for it to go to actual production server with what is likely an externs issue
@U05224H0W Perfect, thank you so much!
seconding pseudo names! It turns the names from obscure minified names like fA
and b
to $myapp$mything$$.actualFunctionName$
. The dollar signs indicates that it's a name that would be minified when you run without pseudo names. Then you at least have some idea about what part of the code that fails 🙂
I have a data like below
[{:person-name "john"
:person-id 1234
:person-address "Holand"}
{:person-name "hari"
:person-id 3456
:person-address "NY"}] , how can I print the values like
person-name person-id person-address
"John" 1234 "Holand"
"hari" 3456 "NY"
Is this acceptable?
(clojure.pprint/print-table [{:person-name "john"
:person-id 1234
:person-address "Holand"}
{:person-name "hari"
:person-id 3456
:person-address "NY"}])
| :person-name | :person-id | :person-address |
|--------------+------------+-----------------|
| john | 1234 | Holand |
| hari | 3456 | NY |
@U01J3DB39R6 seems like map
-ing over the vector would work. Or do you want to print the column names dynamically based on the map keys?
no string/format in cljs?
To be fair, there's no string/format
in CLJ either. But I guess you meant just format
, from clojure.core
. :)
And yeah, it doesn't exist in CLJS. But there's goog.string.format
.
Thank you, I think you probably saved me at least an hour on those details.
cl-format
is also in cljs https://cljs.github.io/api/cljs.pprint/#cl-format (but pretty heavy on the code bundle size)