Fork me on GitHub
#boot
<
2017-09-08
>
ag01:09:49

can someone help me, I can't figure out how to use new :npm-deps feature of clojurescript compiler with crisptrutski.boot-cljs-test

ag01:09:35

it works when :js-env is set to node but doesn't if for example :phantom

dominicm06:09:25

@ag saapas seems to have an example :)

john_tollison07:09:42

I tried walking thing back to just Carmine, the Redis library, and it mostly doesn't compile. I know I've used it before, but I remember jumping through hoops then too. I tried manually adding a bunch of things that are included in Carmine dependancies, and tracked down a couple of includes in those projects to quell these randomish errors that are popping up, kindof grasping at straws... idk, are there other good redis libaries I should be looking at? Is there something good to read on this non-determistic load order/require/qualified namespace problem?

john_tollison07:09:36

I mean, I still might just be doing something really stupid, idk...

john_tollison08:09:16

ok, yeah, started from blank slate project twice, and it mostly doesn't compile(>2/3s of the time) after adding just 1) [com.taoensso/carmine "2.16.0"] to .boot, and 2) (:require [taoensso.carmine :as car :refer (wcar)]) to the .api

dominicm08:09:39

@john_tollison so it is carmine? Interesting

john_tollison08:09:22

Looks like it, although like I said, I ran into this problem before. It ran a little while and seemed to resolve w/o explaination, and I didn't followup like I should have

john_tollison08:09:37

The problem "ran" that is

dominicm08:09:50

Probably something started requiring the namespace it needed earlier or something

dominicm08:09:06

Current project I'm on fails if you don't go via the dev namespace first

john_tollison08:09:12

ok, so... "go via the dev namespace first"? I'm sorry. I'm lost. I'm sure I skipped parts of my programming education somewhere

dominicm08:09:52

@john_tollison what I mean is that, I'm on a project that only works if you require a particular namespace first. Because of the same issue you have.

lsnape08:09:31

@dominicm got it working. All I had to do was resolve the reloaded app/start function in the boot task, like: ((resolve 'my-app.app/start)).

john_tollison09:09:39

fwiw, I just reset my computer and got my test project to compile 6x in a row. I don't know what's going in the background that causes that. Thanks for your help.

adamfrey15:09:45

I have a file in my project resources/foo.edn and resources is in my resource-paths, now I also have a test-resources/foo.edn. How can I add test-resources to my resource-paths in a way that ensures the test-resources version is the version that is "used"?

richiardiandrea15:09:17

@adamfrey there is no standard way that I know of, so I would set-env! test-resource only in your test wrapper task

richiardiandrea15:09:14

This is part of why I tend to call set-env! only once nowadays and developed a declarative approach for boot that does that for me

dominicm16:09:29

@adamfrey classpath is searched in order, so you can maybe put it at the front?

dominicm16:09:43

I suppose boot treats it as a set though

dominicm16:09:04

I don't think this is really considered a good idea

adamfrey16:09:39

it does only accept a set, although I bet there is an ordering happening in there somewhere

dominicm16:09:13

There is. But you're not allowed to depend on that.

adamfrey16:09:31

in reality my files are log4j.properties files, do you know of another way to handle different resource files with the same name like that?

dominicm16:09:53

I think they actually look for test-log4j first

dominicm16:09:09

And then "fall back"

adamfrey16:09:33

that's interesting! I will do some research, thank you

dominicm18:09:53

(Logback test 4j did anyway)