This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-20
Channels
- # aws (1)
- # babashka (68)
- # beginners (68)
- # braveandtrue (6)
- # calva (4)
- # cider (10)
- # clj-kondo (26)
- # clojure (76)
- # clojure-dev (18)
- # clojure-europe (1)
- # clojure-norway (25)
- # clojure-spec (8)
- # clojure-sweden (7)
- # clojure-uk (3)
- # clojuredesign-podcast (1)
- # clojurescript (11)
- # conjure (29)
- # cursive (31)
- # datomic (29)
- # emacs (12)
- # fulcro (29)
- # graphql (3)
- # helix (2)
- # hoplon (39)
- # hugsql (4)
- # malli (3)
- # off-topic (62)
- # pedestal (8)
- # re-frame (23)
- # reagent (14)
- # rewrite-clj (10)
- # shadow-cljs (18)
- # spacemacs (3)
- # sql (13)
- # xtdb (32)
Is there a simple way to turn off DEBUG logging ? our production fulcro app is logging all the timbre debug level logs, and we are not sure how to set that log level ( in our shadow-cljs.edn ? )
@dansudol I think you could simply do (timbre/merge-config! {:level :info})
somewhere before the start-up of your server
In UI state machine, how do I say clear everything in an actor?
For example, when logging out, I want to clear everything in :actor/session
, instead of simply setting :session-valid?
to false
. (Isn't the latter still leaking the username etc.?)
1. Get the ident of the actor uism/actor->ident
2. (uism/apply-action env assoc-in actor-ident {})
i guess your right @zhuxun2.. i was just trying to avoid that .. and use the config files
@dansudol fulcro supports a config pattern. If you put your config in an EDN file under <classpath>/config/defaults.edn, there's a function com.fulcrologic.fulcro.server.config/load-config!
that can load it
I don't know if it's possible to load config from shadow-cljs.edn though. I am curious as well.
if you’re talking server-side: of course you could…it’s just an EDN file. But you should configure your logging for client and server differently IMO: different blacklists etc are almost always needed. A single logging config is just going to end up needing split up as your app grows
I am using this setup to deal with client-side logging config: https://github.com/dvingo/dv.fulcro-template/blob/master/resources/clj/new/dv.fulcro_template/src/main/app/client/client_entry.cljs#L19
How do you pass a "function as a child component" in Fulcro? See this example where TollkitProvider takes a function as its child component: https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Export%20CSV&selectedStory=Basic%20Export%20CSV&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel
welp, there it is, in the documentation. , thanks
fulcro friends, I have been building a fulcro 3 app over the past months and it took some time to get things setup. I went to start a new fulcro project and just didn't want to copy paste over and over again so I put together a fulcro template using clj-new. https://github.com/dvingo/dv.fulcro-template Feel free to try it out. it reflects one project layout - basically what I landed on after some iterating on a project layout and after getting more comfortable with fulcro, but will most likely change as I continue to get a better understanding of fulcro and related tech. I made it to address my own issues, but I figure others will find it useful also. It's my first template, and it's surprisingly easy to add more options, so future additions of other frontend routers (currently uses reitit) and backend servers (currently uses pedestal and crux for db) can be added later. Cheers!
awesome! I'm just starting a project and was looking for something like this. Thanks for your work :)
@U051V5LLP I made a new project using the template, and then ran the make
command, it gives me the following error -
Exception in thread "main" Syntax error compiling at (com/sevenolives/hisaab/server/task_resolvers.clj:35:42).
@U051V5LLP still getting the error, is the latest version on clojars ?
hey, I just pushed and validated a new version, there were some other FE changes needed too.
I'm on a crash course on how maven sorts version numbers. I am deploying new versions to clojars, but not seeing them being picked up when I try on another machine. In the meantime you can use this format:
clj -A:new my-user/my-app +all
copying from the tools-deps channel - deps downloads from maven a couple times a day. if there are multiple version releases in a day you can clear out your local mvn repo and force the latest:
rm -rf ~/.m2/repository/dv/fulcro-template
@dansudol You should be setting the TIMBRE_LEVEL env variable on shadow-cljs’s server for release builds (and optionally dev if you want to just eliminate debug overhead): https://github.com/ptaoussanis/timbre#log-levels-and-ns-filters
thanks tony, we saw that setting in the timbre repo .. but were not sure that it would work in shadow-cljs.edn .. doing now 🙂