This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-22
Channels
- # adventofcode (1)
- # beginners (172)
- # boot (47)
- # cider (7)
- # cljs-dev (30)
- # cljsrn (43)
- # clojure (180)
- # clojure-dusseldorf (1)
- # clojure-greece (1)
- # clojure-italy (3)
- # clojure-russia (41)
- # clojure-spec (67)
- # clojure-uk (101)
- # clojurescript (128)
- # core-async (4)
- # cursive (13)
- # datomic (29)
- # devcards (5)
- # emacs (19)
- # events (1)
- # hoplon (38)
- # lein-figwheel (1)
- # luminus (8)
- # midje (1)
- # off-topic (47)
- # om (10)
- # onyx (23)
- # protorepl (1)
- # re-frame (11)
- # reagent (7)
- # ring (3)
- # ring-swagger (9)
- # rum (6)
- # sql (5)
- # untangled (4)
Hmm.. I updated to boot 2.7.0 and my reload function doesn't seem to be getting ran with updated code. I have :on-jsload
set to a def
which looks like this
(def reload-fn my-ns/main)
where my-ns/main
is defined as:
(defn main
[]
(enable-console-print!)
(println "ran"))
If I change the string that gets print out to "ran2"
and save the file, then my boot task will compile the files and reload in the browser. The problem is ran
gets printed out, not ran2
.If I set :on-jsload
to be my-ns/main
instead of the above def
'ed reload-fn
, then the correct result is printed out when changed.
2.7.1 is out! windows support is back http://i.huffpost.com/gen/1478551/images/o-CHAMPAGNE-facebook.jpg
I'm having trouble rendering special characters. I'm not sure what is going on I've tried unicode characters but apparently they don't seem to work in chrome? I'm completely stumped.
Compiling ClojureScript...
• js/app.js
clojure.lang.ExceptionInfo: No group 1
data: {:file
"/var/folders/yq/n5bg23w14_73jpfnb1zvn0vw0000gn/T/boot.user6497735034777314577.clj",
:line 21}
java.lang.IndexOutOfBoundsException: No group 1
I'm simply doing this [:span "$"]
@grounded_sage that's not enough context to find out what's going on
This is the repo. I have just uploaded it with the error occuring. Inside of web.clj
I am trying to list some prices. But it keeps throwing an error everytime I use special characters. https://github.com/CommonCreative/vbn-redesign
I have no idea how to give any more context as I don't know what context would be relevant @pesterhazy
@grounded_sage perhaps a rum bug?
That was what I was thinking.
It's frustrating because Uni codes also don't appear to work in chrome at all. So I'm going to have to use an SVG to represent a dollar sign 😕
Please, fix this someday:) https://github.com/boot-clj/boot/issues/547
@micha wondering ⬆️ why we don't just concatenate boot/profile files string-wise instead of reading and then concat-ing
@alandipert interesting, yeah we probably could?
@alandipert also maybe we should use clojure.core/load-string
instead of clojure.core/load-file
there?
i think that would work
@jumblerg btw i noticed that clojure-adapter-servlet's java codes are built against java 1.8
how would you feel if i built a release against 1.7 so that it worrked everywhere boot did?
@alandipert: makes sense to me.
The upside-down stack trace is awesome
hi, I’m trying to serve cljs compiled with boot-cljs. Chrome is complaining with “net::ERR CONTENT LENGTH MISMATCH”. I noticed:
boot.user> (.getContentLength (.openConnection (io/resource "public/js/client.js")))
2240028
boot.user> (count (slurp (io/resource "public/js/client.js")))
2239970
so far, I’ve only found the lengths to differ on compiled cljs files. other files in my resources/public
folder are fine
boot.user> (count (slurp (io/resource "public/js/record_client.js") :encoding "UTF-8")) 2239970 boot.user> (count (slurp (io/resource "public/js/record_client.js") :encoding "ISO-8859-1")) 2240028
what are you using to serve?
i haven't seen that error before, guessing chrome is getting content-length header but body size doesn't agree?
ring-jetty?
tried w/out nginx in middle?
the repl commands make me think it’s a clojure issue, because I can repro differing lengths by setting :encoding
maybe try setting encoding header explicitly in ring handler? maybe its emitting something that nginx is interpreting incorrectly?
i guess eliminating nginx would let you narrow it to jvm
(System/getProperty "file.encoding")
stackoverflow says this iis maybe a thing to check
question, can an exception pass pod boundaries?
I think there’s something I don’t understand re: content-length and file encoding. JVM file encoding is utf-8, Charset.defaultCharset is utf-8, but ring reports content-length= number of bytes in the file, rather than number of utf-8 chars in the file. But if put gzip infront of the request, the content-length gets overwritten, and everything works. ¯\(ツ)/¯
@richiardiandrea I’ve only read about pods, not used them directly, but my guess is no
I guess I need to try 😉
and surprisingly they do 😉