Fork me on GitHub
#boot
<
2016-12-16
>
bhagany02:12:55

How do I do the equivalent of boot -vv ... from the repl?

martinklepsch05:12:25

@bhagany I think it's just a dynamic var boot.util/*verbosity* or similar so you could use plain binding

erwin07:12:50

@alandipert I actually tested boot master on a windows machine now and verified that 2.7.0 did not work and now it does

erwin07:12:06

For future reference, I actually started with installing build-tools in a VM but ended up only installing Java and copying m2 repo to the VM ๐Ÿ™‚

alandipert14:12:51

@erwin great to hear! thanks for testing

alandipert14:12:16

2.7.1 is ready, just need to find time to push the button

richiardiandrea19:12:06

hello wonderful people

richiardiandrea19:12:41

I am trying to fetch some dependencies from a local nexus

richiardiandrea19:12:49

I tried (set-env! :repositories #(conj % ["myserver" {:url ""}])

richiardiandrea19:12:01

and it looks like it is reading the metadata

richiardiandrea19:12:29

but it then fails with org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact artifact.name in in clojars ()

micha19:12:36

do you have a _maven.repositories file in your local .m2 for that artifact?

micha19:12:45

if so you can try deleting it

richiardiandrea19:12:00

uhm, no but I have an entry in .m2/settings.xml

micha19:12:25

like for example for each dependency in my local m2

richiardiandrea19:12:36

which is correct because mvn works fine...it adds mirrorOf in it

micha19:12:02

like for reply i have /home/micha/.m2/repository/reply/reply/0.3.7/_maven.repositories

micha19:12:14

you should have one for every dependency in your local m2 cache

micha19:12:32

if i cat that file i see

micha19:12:36

#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Mon Dec 12 23:23:11 EST 2016
reply-0.3.7.pom>clojars=
reply-0.3.7.jar>clojars=

micha19:12:46

it's pinning that dependency to that repo

micha19:12:58

so maven will try to find it in clojars

micha20:12:03

if it needs to

micha20:12:22

so if clojars isn't in my :repositories aether will fail

micha20:12:30

even if reply is in another repo

richiardiandrea20:12:49

I have a bunch of _remote.repositories

richiardiandrea20:12:37

and in maven.repositories I see that it is pinning, but to the correct internal repo

richiardiandrea20:12:08

which then means it shouldn't try in theory to read this one from clojars right?

micha20:12:27

i don't know what this _remote.properties file is

micha20:12:35

i don't have those

richiardiandrea20:12:12

same syntax but it contains the mapping from SHAPSHOT versions to the internal nexus

richiardiandrea20:12:32

it looks right to me ๐Ÿ™‚

richiardiandrea20:12:06

the aether verbose log shows that it is trying to fetch a :file called rest-resources-api-0-SNAPSHOT.jar which does not exists because of the substitution necessary for SNAPSHOT

micha20:12:11

try moving your local .m2 to somewhere else

micha20:12:28

if it works after that then you know it's some file in your .m2 that's causing trouble

micha20:12:48

if it doesn't work then it's likely to be something in your configuration

richiardiandrea20:12:55

move yeah, same issue...I am going to try a release version

richiardiandrea20:12:57

and with a release version this does not work either

richiardiandrea20:12:05

this time though, I see:

Aether: {:type :succeeded,
 :method :get,
 :transferred 180767,
 :error nil,
 :data-buffer nil,
 :data-length 0,
 :resource
...

richiardiandrea20:12:09

for my dependency

richiardiandrea20:12:43

uhm...I weird I don't understand what is going on I see the repo using (util/warn "Repos %s\n" (util/pp-str (:repositories (boot.core/get-env)))) but it looks like it is not trying to fetch from there

richiardiandrea20:12:13

the -vv log is very good

richiardiandrea20:12:07

@micha sorry to bother, a question, if I have:

{:url "",
   :snapshots false,
   :checksum :fail,
   :update :never,
   :releases {:update :never}}
with no snapshots, but I install the artifact locally, does boot/aether try to resolve it in .m2?

richiardiandrea20:12:15

or should I use offline for that?

richiardiandrea20:12:51

uhm it still cannot find it...weird

richiardiandrea20:12:14

ok anyways, probably boot is ok here, just wanted to be sure ๐Ÿ™‚

kenny21:12:40

@esanmiguelc Can you add the event listener in your HTML and call a function in your cljs?

esanmiguelc21:12:25

iโ€™m not sure what you mean by the event listener

esanmiguelc21:12:55

Iโ€™m just trying to get a proof of concept working, and it seems like the init-fns are not ending up being called in the final .js output

kenny21:12:05

window.attachEvent('onload', yourFunctionName);

esanmiguelc21:12:50

I was expecting the main.js file to execute it as it was loaded on the page, and not require me to manually have to execute it after the fact

kenny21:12:47

Wait are you saying your main function is not being called?

esanmiguelc22:12:01

yeah, exactly

kenny22:12:36

Are you loading your main.js in some HTML?

esanmiguelc22:12:06

Yeah, and all of the compiled cljs is loading just fine

esanmiguelc22:12:01

from the console I can run project.profile.main()

kenny22:12:38

What is the name of your .edn file?

esanmiguelc22:12:23

profile.cljs.edn

kenny22:12:49

Is there a profile.js in your fileset?

kenny22:12:15

That is the file you need to add to your HTML file

esanmiguelc22:12:32

yeah, we did that too. Itโ€™s okay, we found a workaround for now thats acceptable

esanmiguelc22:12:46

basically call the function after itโ€™s defined in the main file

kenny22:12:08

There are lots of different ways to get an init call into your cljs app. That is one way. You can also use the init-fns approach. Or you can have something like this in your HTML file:

<script type="text/javascript">
    addEventListener("load", project.profile.main, false);
</script>

kenny22:12:46

In order for the last one to work in :advanced compilation, you would need to ^:export your main function

kenny22:12:14

Anyway, I didn't want to hijack the conv but I have a different question ๐Ÿ™‚ Does anyone have any experience connecting to a remote boot REPL that is running in AWS? I am running the REPL on a static port that is enabled on inbound connections. I am able to telnet to the server on that port but I get a Connection refused message from the REPL server. I'm guessing there is some additional option I need specify when starting the REPL.

kenny22:12:06

Figured it out ๐Ÿ™‚

$ boot repl -p 8787 -s -b 0.0.0.0 wait