This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-22
Channels
- # beginners (42)
- # boot (73)
- # cider (17)
- # clara (1)
- # cljs-dev (47)
- # cljsrn (9)
- # clojars (4)
- # clojure (241)
- # clojure-italy (11)
- # clojure-norway (5)
- # clojure-russia (93)
- # clojure-spec (28)
- # clojure-uk (32)
- # clojurescript (170)
- # core-async (20)
- # cursive (62)
- # data-science (2)
- # datomic (47)
- # dirac (4)
- # events (1)
- # funcool (12)
- # gsoc (1)
- # hoplon (59)
- # immutant (8)
- # lambdaisland (4)
- # luminus (3)
- # lumo (11)
- # off-topic (13)
- # om (81)
- # onyx (1)
- # pedestal (47)
- # planck (30)
- # re-frame (2)
- # reactive (1)
- # reagent (2)
- # ring-swagger (15)
- # rum (1)
- # slack-help (5)
- # specter (5)
- # testing (5)
- # uncomplicate (8)
- # untangled (16)
- # vim (71)
- # yada (16)
I was able to reproduce the failure in VirtualBox. It is really puzzling. @richiardiandrea ported some of clj code under self-host, but he forgot to port this one function: https://github.com/binaryage/env-config/blob/b8f6484073c37719cfb73be1b109ff1f9232f45f/src/lib/env_config/impl/helpers.cljc#L25 for some reason planck does not complain, neither lumo does
I don’t understand why it works in lumo and in planck on other systems than Ubuntu 14.04 (trusty)
@darwin env-config
s unit test work for me with Planck in Ubuntu 14.04
vagrant@vagrant-ubuntu-trusty-64:~/env-config$ uname -a
Linux vagrant-ubuntu-trusty-64 3.13.0-112-generic #159-Ubuntu SMP Fri Mar 3 15:26:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
vagrant@vagrant-ubuntu-trusty-64:~/env-config$ lein with-profile +self-host tach planck self-host-test-build
Testing env-config.tests.main
Ran 4 tests containing 16 assertions.
0 failures, 0 errors.
Error encountered performing task 'tach' with profile(s): 'base,system,user,provided,dev,self-host'
Suppressed exit
@mfikes thanks for trying, let me point you to some older tip of the branch, I have fixed it since my original posts
this one is broken: https://github.com/binaryage/env-config/tree/b8f6484073c37719cfb73be1b109ff1f9232f45f
@darwin Oh. And the core of the failure is that Planck (and Lumo) fails to emit a diagnostic for the missing string-starts-with?
there are probably two issues: first that inconsistency between plancks on different systems should be tracked down, and second why both planck and lumo were silent on some systems
the fact that tests passed might be just a coincidence, the function probably always returned true
in that invalid case and my tests never test false
case
Interestingly, I get it to fail for that older tip in the same way on OS X (10.10 Yosemite)
interesting, btw. I also tested it under Ubuntu 16.04 and it passed all tests there (silently)(
@darwin I know why Planck behaves differently on different platforms. JavaScriptCore evolved and at some point added .startsWith
. I encountered the same inconsistency with Andare https://github.com/mfikes/andare/issues/1
So if you try (.startsWith "abc" "a")
in Planck it might fail or work, depending on how old JavaScriptCore is.
catch is part of try-catch special form and I cannot write a macro just for catch part
something like (catch-all e …)
would expand to (catch #?(:clj Throwable :cljs js/Error) e …)
and that is a lot of work I’m not going to do right now, aren’t you aware of some library trying to ease writing portable code?