This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-27
Channels
- # beginners (34)
- # boot (15)
- # cider (7)
- # cljs-dev (7)
- # cljsjs (2)
- # cljsrn (46)
- # clojure (130)
- # clojure-argentina (1)
- # clojure-colombia (2)
- # clojure-greece (1)
- # clojure-italy (53)
- # clojure-losangeles (1)
- # clojure-russia (15)
- # clojure-spec (8)
- # clojure-uk (100)
- # clojurescript (117)
- # core-matrix (1)
- # cursive (24)
- # datomic (41)
- # duct (1)
- # emacs (11)
- # fulcro (22)
- # graphql (4)
- # hoplon (3)
- # jobs (1)
- # lein-figwheel (3)
- # luminus (18)
- # lumo (52)
- # off-topic (57)
- # pedestal (2)
- # planck (12)
- # re-frame (22)
- # remote-jobs (1)
- # ring-swagger (6)
- # rum (7)
- # shadow-cljs (13)
- # yada (19)
I agree. It's super wierd to come back monday and have new warnings block the view because RN decided that .isMounted is now deprecated.
Our solution to the npm problem was to use yarn and to commit the yarn bundle to the repo
This gives you the same results on all laptops
No the actual yarn binary (it's just a single js bundle)
It effectively freezes yarn to a specific version
Yarn.lock must be committed to the repo as well of course
indeed
different yarn versions resolve package conflicts differently. the result is that one person or another's yarn install
will stubbornly insist on updating yarn.lock
it's js...
BUT committing the file to the repo is a pretty neat way around the problem
plus people don't have to install yarn anymore - they can just use bin/pinned-yarn
I don’t know, we have the same issue for our firmware, needing a specific version of gcc. We put it on s3, exclude bin/ from git and then have a script that downloads the executable there when setting up the project.
I have something for you then 🙂
it's still very new but it's built exactly for this purpose
you add a moth.json
to your project root, then run moth path --alias my-gcc-4.5 --find bin/gcc
. Moth will ensure that the version is present (by comparing the hash) and print out the absolute path to the gcc executable from the downloaded, unpacked archive
best of all, this operation is fast (<150ms) if the dep is up to date
Cloud/s3 support not implemented yet though 🙂
I considered lumo but... python is installed everywhere (for bootstrapping) and has ~40ms startup time
it's perfect for the job
moth comes with a neat feature
it has a main binary moth
that is only 2k
it requires only python 2.6+ installed on the system
but it knows how to bootstrap itself from the web (like boot/lein)
so if you commit it to the repo, everyone on the team can use it right away
add direnv
to that, you can add bin/
to your path, so you can just type moth whatever
it's as if it was installed globally
it's really the missing piece of the puzzle for Unix/shells
best kept secret 🙂
Hmm, how would you use this component: https://github.com/crazycodeboy/react-native-easy-toast ?
My current approach doesn't seem to work and I can't figure out if it has something to do with the {DURATION}
thing that the example on the README has in the import statement:
(defn create-element [rn-comp opts & children]
(apply js/React.createElement rn-comp (clj->js opts) children))
(defonce toast (partial create-element (js/require "react-native-easy-toast")))
... at the bottom of the root view ...
(toast {:ref "toast"})
From what I find on the error message for RN it is related to errors in the import statement.
I had to (aget (js/require "react-native-easy-toast") "default")
to get out the toast.