Fork me on GitHub
#shadow-cljs
<
2018-09-30
>
jacekschae09:09:14

can i somehow get rid of these warnings when I start my dev server?

Sep 30, 2018 11:47:29 AM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.8.Final
Sep 30, 2018 11:47:29 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.8.Final
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/Users/jacek/.m2/repository/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.KQueueSelectorProvider()
WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

thheller10:09:41

not sure if there is an undertow release with a fixed dependency yet

thheller10:09:16

doesn't look like it

thheller10:09:29

not sure if I can just bump xnio without breaking undertow

jacekschae10:09:45

:thinking_face:

thheller10:09:04

try adding [org.jboss.xnio/xnio-nio "3.6.5.Final"] + [org.jboss.xnio/xnio-api "3.6.5.Final"] to your deps

thheller10:09:11

maybe the warning goes away and everything runs?

thheller10:09:20

I don't get warnings anymore on windows

thheller10:09:24

seems to be a mac issue

thheller10:09:15

@jacek.schae btw are any of your "students" on windows?

thheller10:09:33

I know of one but are there more?

thheller10:09:48

wondering how the percentages win/mac are

jacekschae10:09:49

just added the deps

jacekschae10:09:58

Sep 30, 2018 12:29:24 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.6.5.Final
Sep 30, 2018 12:29:24 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.6.5.Final
Sep 30, 2018 12:29:24 PM org.jboss.threads.Version <clinit>
INFO: JBoss Threads version 2.3.0.Beta2
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jboss.threads.ThreadLocalResetter$1 (file:/Users/jacek/.m2/repository/org/jboss/threads/jboss-threads/2.3.0.Beta2/jboss-threads-2.3.0.Beta2.jar) to field java.lang.Thread.threadLocals
WARNING: Please consider reporting this to the maintainers of org.jboss.threads.ThreadLocalResetter$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

thheller10:09:05

getting close to having something usable for the ui. wondering if its worth investigating publishing it on windows app store

jacekschae10:09:26

i don't really have the view into use env

jacekschae10:09:57

i don't know if someone has win, mac, or linux

thheller10:09:17

ah thought you may log it on purchase or so

thheller10:09:40

apparatently you can :exclusions [org.jboss.threads/jboss-threads]

jacekschae10:09:03

thanks for help anyways

jacekschae10:09:15

the exclusions didn't help either

jacekschae10:09:50

i saw the video of the ui, look forward to the finalised version

thheller10:09:38

starting build a standalone electron version and its coming along nicely

thheller10:09:43

really liking where this is going

jacekschae10:09:04

great to hear! 👍 If you would need any feedback feel free to ping me.

lilactown18:09:06

I have an app that I’m using bootstrapped CLJS. It works fine in development but when I run a release build, it breaks. There are some errors when I load the bundle:

/assets/bootstrap/js/cljs.core$macros.js:1 Uncaught ReferenceError: goog is not defined
/assets/bootstrap/js/cljs.tools.reader.reader-types$macros.js:1 Uncaught ReferenceError: goog is not defined
/assets/bootstrap/js/cljs.reader$macros.js:1 Uncaught ReferenceError: goog is not defined
/assets/bootstrap/js/cljs.env.macros$macros.js:1 Uncaught ReferenceError: goog is not defined
/assets/bootstrap/js/cljs.analyzer.macros$macros.js:1 Uncaught ReferenceError: goog is not defined
/assets/bootstrap/js/cljs.compiler.macros$macros.js:1 Uncaught ReferenceError: goog is not defined

thheller19:09:43

@lilactown if you use the self-host stuff you cannot compile with :advanced, only :simple

thheller19:09:57

so add :optimizations :simple to the :compiler-options

vigilancetech20:09:53

I'm trying to adapt the first hoplon example to shadow-cljs but its giving me a "CompilerException: clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec:" error. My ns declaration looks okay to me (but I'm still somewhat new to clojure). Can someone look at it and tell me what might be wrong? Also any other advise in this endeavour would be helpful. [email protected]:vigilancetech-com/address-book.git

thheller20:09:20

thats a clojure error. you are probably trying to load a cljs into clj?

vigilancetech20:09:52

here's my command line: shadow-cljs run build/hop watch app

vigilancetech20:09:53

oops! hmm. I wonder where that push went 😄

vigilancetech20:09:59

ok, check it again

thheller20:09:41

no idea whats going on in that repo sorry

thheller20:09:35

I don't know boot or hoplon

vigilancetech20:09:04

the build.boot is there but I'm not using it. I just added the shadow-cljs files and tried renaming some stuff to make it work. In a nutshell this is what hoplon does: https://github.com/hoplon/hoplon/wiki/How-is-a-hl-file-different%3F

thheller20:09:47

there is not much code in there and I still can't tell whats happening

vigilancetech20:09:19

the hoplon function just slightly finesses the *.hl file to generate the cljs file with those included namespaces. It just has to run before the cljs compile function does so I set up the build.clj file as per this: https://github.com/thheller/shadow-cljs/wiki/Custom-builds

thheller20:09:53

and if you are new to clojure creating a custom build is gonna be tough as it requires pretty in depth knowledge about how CLJS and shadow-cljs + CLJ work

thheller20:09:08

its probably also not for what you are trying to do

vigilancetech20:09:04

I've been having constant trouble getting boot to work with cider. Getting a decent repl doesn't seem to be too much of a priority with the hoplon/boot community, but as I'm working with fairly complex existing app (rather than a new one) I need to be able to get my hands right on the guts of it and understand what makes it "tick"

vigilancetech20:09:44

so it was either this or figwheel under boot, but several of the things you're doing with shadow just seems cleaner

thheller20:09:08

can you get hoplon to just spit out normal .cljs files?

thheller20:09:30

then you don't need to hook into anything and let shadow-cljs just process those cljs files

vigilancetech20:09:35

by "new" I'm meaning I'm probably 6 months in after not having done much programming for a couple decades (with a fair bit of lisp before that)

vigilancetech20:09:21

yeah, I think I could if I could figure out how to either tell boot where to put them or shadow where to find them I guess. I just wanted to start off with baby steps w/shadow to try and fully understand it, like how to get it to run the hoplon function first.

thheller20:09:50

yeah feeding custom inputs to a build is next level advanced stuff

thheller20:09:03

don't do it basically

vigilancetech20:09:07

so that function "hop" I created under the ns won't get called with a "run?"

thheller20:09:07

this shadow-cljs run build/hop watch app will call (build/hop "watch" "app")

vigilancetech20:09:32

hmmm... okay, that's somewhat enlightening

joelsanchez22:09:33

after trying to use npm packages for the 45th time with :npm-deps, I've forced myself to give shadow-cljs a try. I have to say, I'm very much pleased, and I think I've been missing out 🙂

👏 24
😎 4
Dormo16:10:11

Any comment on how it compares to Figwheel? Liking Figwheel is what keeps me from switching

joelsanchez17:10:00

for now they seem to offer similar functionality, but these are the benefits of shadow-cljs for me: - very good integration with npm, and ditching of cljsjs. thank God - more reasonable defaults (I had to alter-var-root figwheel's CSS reload notificator because it was so annoying) - better error messages and better monitoring of the state of your build, through the web interface

joelsanchez17:10:49

I can live with most things but if I have to mess with webpack, cljsjs's boot tasks or :npm-deps and the "nameToPath" errors again, I'm switching careers

joelsanchez17:10:21

I met shadow-cljs for the first time when trying to search for a way to do code splitting / modules. the standard solution is a disgrace and shadow-cljs, I think, does a pretty good job

thheller17:10:20

another thing may be better and more reliable caching. no lein clean to fix weird bugs 😉