Fork me on GitHub
#boot
<
2018-03-21
>
grounded_sage06:03:28

I'm starting to wonder if this is a boot-cljs error.

java.lang.IllegalStateException: EXPR_RESULT 35 [length: 3] [source_file: /Users/wade/Desktop/rn4w/node_modules/react-native-web/dist/vendor/Animated/AnimatedImplementation.js]
     java.lang.RuntimeException: INTERNAL COMPILER ERROR.
                                 Please report this problem.
                                 
                                 EXPR_RESULT 35 [length: 3] [source_file: /Users/wade/Desktop/rn4w/node_modules/react-native-web/dist/vendor/Animated/AnimatedImplementation.js]
                                   Node(NAME add): /Users/wade/Desktop/rn4w/node_modules/react-native-web/dist/vendor/Animated/AnimatedImplementation.js:35:4
                                 var add = function add(a, b) {
                                   Parent(VAR): /Users/wade/Desktop/rn4w/node_modules/react-native-web/dist/vendor/Animated/AnimatedImplementation.js:35:0
                                 var add = function add(a, b) {
                                 
     clojure.lang.ExceptionInfo: EXPR_RESULT 35 [length: 3] [source_file: /Users/wade/Desktop/rn4w/node_modules/react-native-web/dist/vendor/Animated/AnimatedImplementation.js]
    from: :boot-cljs

grounded_sage06:03:19

I've ran the entire dist directory through GCC and it worked fine. I can easily require this library into a lumo project. However in Boot I get this error. I have not used Lein yet as I have not learnt Lein. Though it does says at the bottom from: boot-cljs

grounded_sage06:03:02

All I have done is pulled in the library through npm-deps and attempted to require it into a namespace

theeternalpulse15:03:22

I'm trying to require boot.file in a task but it can't find the namespace, I use, and it returns No such namespace: file when making a task

(deftask port-file "Copy cider port to profile folder"
  [] ;;Destination option
  (require '[boot.file :as file])
  (println (str "repl file: "
                (file/file? ".nrepl-port"))))

seancorfield16:03:07

@theeternalpulse When you require at runtime inside a task, you need to resolve the symbol (at runtime). Change

(file/file? ".nrepl-port")
to
((resolve 'file/file?) ".nrepl-port")
and you should be fine.

theeternalpulse16:03:50

ahhh, I see now.

theeternalpulse16:03:20

thanks @seancorfield. Is there a way to resolve the entire namespace or do I do that per call to a ns function?

seancorfield16:03:16

You'll need to do it per symbol.

seancorfield16:03:13

If the require is placed outside a task, then it's evaluated before the task is compiled and you can use the symbols directly:

(require '[boot.file :as file])

(deftask port-file "Copy cider port to profile folder"
  [] ;;Destination option
  (println (str "repl file: "
                (file/file? ".nrepl-port"))))

seancorfield16:03:41

(which is what I'd probably do for Boot-specific namespaces)

theeternalpulse16:03:28

makes sense, so you include boot globally and non-boot ones you resolve inside the task?

seancorfield16:03:48

I generally require namespaces globally that are part of dependencies that are global. If a task adds dependencies, then I require/`resolve` inside the task.

πŸ‘ 8
danm16:03:38

With the 2.8.0-SNAPSHOT do I have to specify anything special to get BOOT_JVM_OPTIONS to apply from boot.properties, or is that functionality currently broken? The wiki says it Just Happens in 2.8.0+, but it's not doing it for me at the moment

seancorfield17:03:49

@carr0t Looks like the 2.8.0-SNAPSHOT was pushed on January 9th and the BOOT_JVM_OPTIONS fix hit master after that https://clojars.org/boot/versions/2.8.0-SNAPSHOT

danm17:03:05

@seancorfield Aah, thanks πŸ™‚

danm17:03:07

Also @seancorfield, how do you require within a task? I tried to do that and the task I was trying to create didn't then know about the thing I had required. I'm probably Doing It Wrong (tm)

seancorfield17:03:34

Also, I think you'd need an updated boot script/file for it to work -- you couldn't just specify the Boot version via the properties file.

seancorfield17:03:01

@carr0t That was exactly the discussion I had with @theeternalpulse above -- scroll up and see if that answers your question?

danm17:03:49

Oh, duh, yes it does. Thank you. I had missed that part of the conversation

danm17:03:00

I was asking because it looked related to my problem πŸ˜‰

bones21:03:06

Can I run Cursive w Boot? Or does it work best w Leiningen?

cfleming22:03:38

@bones You can do it, it’s a little clunky but lots of people do use it: https://github.com/boot-clj/boot/wiki/For-Cursive-Users

bones22:03:47

Jeeze, no kidding