Fork me on GitHub
#boot
<
2015-07-08
>
alejandro01:07:15

I’m running into an issue with boot running out of permgen space

alejandro01:07:17

clojure.lang.Compiler$CompilerException: java.lang.OutOfMemoryError: PermGen space, compiling:(reader.clj:800:1)

alejandro02:07:20

cool, is there a way to set those for cider to pick up that environment variable in emacs?

alandipert02:07:25

are you on a mac?

alandipert02:07:09

@alejandro: assuming you export BOOT_JVM_OPTIONS=... in ~/.bashrc, i think you can try adding something like this to your emacs configuration:

(let ((opts (shell-command-to-string ". ~/.bashrc; echo -n $BOOT_JVM_OPTIONS")))
  (setenv "BOOT_JVM_OPTIONS" opts))
which is based on http://stackoverflow.com/a/9664872

alandipert02:07:37

i remember having a similar problem when i was on mac with different env vars and i think this is how i fixed it at the time, lemme know if it works

alandipert02:07:04

you may also wanna do that with JVM_OPTS if you're using a lein-launched jvm for your nrepl client

alejandro02:07:39

cool, will try it out tonight and let you know

alandipert02:07:28

sure! if it works for you, please don't hesitate to add it to the wiki somewhere - would be much appreciated

zane04:07:30

Hey, I'm trying to get boot-cljs-example running, and I'm seeing this warning in the console:

WARNING: org.clojure/tools.nrepl version null is older than required 0.2.10
Connection is null

micha04:07:20

zane: did you try adding a dependency to your project for tools.nrepl?

zane04:07:22

My $BOOT_HOME/profile.boot contains this:

(require 'boot.repl)
(swap! boot.repl/*default-dependencies*
       concat '[[cider/cider-nrepl "0.9.0"]
                [org.clojure/tools.nrepl "0.2.7"]])
so I'm a little confused as to how to fix this.

zane04:07:39

Ah, I want it as a project dependency?

micha04:07:56

you can debug it by doing boot show -p

micha04:07:05

that will show you dependency conflicts

micha04:07:19

it'll help you figure out where you need an :exclusion

zane04:07:25

Seems happy.

[:heavy_check_mark:] org.clojure/clojure
    ✘ 1.7.0-RC1
      org.clojure/clojurescript
    :heavy_check_mark: 1.7.0
      org.clojure/clojure

micha04:07:58

nothing about tools.nrepl?

micha04:07:14

does the repl work? simple_smile

zane04:07:34

The warning is disconcerting, though.

micha04:07:09

are you using cider?

zane04:07:16

Not right now.

zane04:07:20

That was going to be the next step.

alandipert04:07:13

@zane: i tried locally, don't see the error with cider-nrepl 0.9.1 and no tools.nrepl dep in my profile.boot

zane04:07:33

Hi Alan! Yeah, I'm sure I'm doing something wrong.

zane04:07:38

Just not sure what yet.

zane04:07:56

Let me try 0.9.1.

zane04:07:04

Same thing.

zane04:07:29

In fact, that warning is coming before boot pulls down cider-nrepl-0.9.1.

zane04:07:43

Comes right after Writing boot_reload.cljs....

alandipert04:07:12

oh i see it now - doing boot dev

alandipert04:07:40

the weasel dep is brought in dynamically by the repl task, which is why we're not seeing it with boot show

zane04:07:47

Oh, I see.

zane04:07:04

Yeah, I was doing the full boot serve -d target/ watch speak reload cljs-repl cljs -sO none from the README.md.

micha04:07:06

boot dev show -p

zane04:07:08

So, it sounds like it does need to be a project dependency? Am I reading this right?

zane04:07:37

Huh. That's unfortunate.

alandipert04:07:41

boot -d org.clojure/tools.nrepl:0.2.10 dev is a way to check

zane04:07:56

Ah, that makes sense.

zane04:07:22

Yeah, with that I still get Connection is null, but the other warning went away.

alandipert04:07:27

yeah i'm not sure how i feel about the way it tries to help

zane04:07:29

Which follows from what you said.

alandipert04:07:05

unfortunately the repl is a special case when it comes to dependencies, because it needs to run at the "top level" (root project pod) in order to be useful

alandipert04:07:17

which is why the repl can't just run in a pod with the exact dependencies it needs

zane04:07:19

If the REPL works without -d org.clojure/tools.nrepl:0.2.10 what is the warning trying to tell me?

zane04:07:30

Or is it not a valid warning?

zane04:07:37

Just trying to make sure I understand what's happening here.

alandipert04:07:00

@zane: i think it's not a valid warning

alandipert04:07:06

it's trying to help you with a problem you don't have

zane04:07:12

Okay. Would it be helpful for me to file an issue?

zane04:07:50

Let me try to winnow it down to a minimal test case.

alandipert04:07:42

i think it would be ok to just say boot dev in boot-cljs-example prints out weird things

alandipert04:07:11

yes @meow has been crushing it lately

alandipert04:07:15

@zane: thank you anyway for your helpful intent :thumbsup:

zane04:07:38

Thanks for the useful tool!

zane04:07:45

And for helping me track this down.

aengelberg04:07:18

Not sure if this belongs in Cider room or Boot room... but I can't get boot projects to start up with cider jack in. I get "The boot executable (specified by cider-lein-command' or cider-boot-command') isn't on your exec-path"

aengelberg05:07:25

Windows actually.

aengelberg05:07:34

I should have specified. That's kinda important.

alandipert05:07:53

hm, i imagine it's similar

alandipert05:07:14

i vaguely remember a PATH config step from my windows days, in the settings somewhere - perhaps you need ot add boot to it?

aengelberg05:07:53

My boot.exe is sitting in C:\Windows\System32. That path is also in my exec-path emacs variable (but lowercase).

aengelberg05:07:17

(And it's in $PATH)

alandipert05:07:06

maybe customize-variable cider-boot-command to be boot.exe?

alandipert05:07:23

(it probably defaults to boot)

aengelberg05:07:58

I can try that. But the cider code indicates that it also tries tacking on ".exe".

alandipert05:07:07

hm, care to link the cider code?

alandipert05:07:43

@aengelberg: hm, does (cider--boot-present-p) return anything in an ielm buffer?

aengelberg05:07:05

Sorry, not sure what you mean by IELM

aengelberg05:07:10

<--- elisp noob

alandipert05:07:15

no worries, M-x ielm

alandipert05:07:17

an elisp repl

aengelberg05:07:39

It returns nil.

alandipert05:07:59

so i gotta go, but the way i've had luck fixing these issues is by bisecting what hte mode's code does using ielm, poking things

alandipert05:07:36

could be a way forward, also seems like a good one to raise with the cider folk

alandipert05:07:34

@aengelberg: ok, so i think the way to fix is indeed to M-x customize-variable cider-boot-command to 'boot.exe'

aengelberg05:07:50

This is really weird

ELISP> (executable-find "boot")
nil
ELISP> (executable-find "bootcfg")
"c:/Windows/System32/bootcfg.exe"

aengelberg05:07:01

Both are files that are in System32

alandipert05:07:12

err, i take it back, i still don't know what's wrong really simple_smile

aengelberg05:07:18

And if I touch C:\bin\boot.exe (that path is also in the variable), it does work

aengelberg05:07:47

The combination of the path and the filename is taboo somehow?

alandipert05:07:04

my suspicion would be emacs only regards files ending in .exe as executables

alandipert05:07:17

similar to the way on unix it only has +x stuff on it

aengelberg05:07:18

bootcfg.exe is a thing.

alandipert05:07:39

oh is that boot or a windows thing that was there already?

aengelberg05:07:02

Given that you asked that question, probably not a boot thing 😉

alandipert05:07:33

oh i understand now what you meant earlier, system32 is a factor somehow

aengelberg05:07:08

OK, here's a weird sequence of events: I used explorer to create a new document in C:\Windows\System32, and renamed it to "athing.exe". (executable-find "athing") returns nil. From cmd, touch C:\Windows\System32\athing2.exe. (executable-find "athing2") => "c:/Windows/System32/athing2.exe"

alandipert05:07:41

have you tried customizing cider-boot-command to be an absolute path?

aengelberg05:07:07

no, I'll try that

aengelberg05:07:28

except (executable-find "C:/Windows/System32/boot.exe") => nil, so I doubt that will work

aengelberg05:07:24

C:\Users\Alex>ls -l C:/Windows/System32/ | grep boot
-rw-r--r--    2 Alex     Administ  3170304 Jun 10  2009 boot.sdi
-rwxr-xr-x    2 Alex     Administ    81408 Jul 13  2009 bootcfg.exe

aengelberg05:07:51

I'm not even sure how ls is actually on my machine, but it does not see boot.exe

aengelberg05:07:11

(I think it came with git?)

alandipert05:07:21

i suppose you tried putting boot.exe in C:\bin?

aengelberg05:07:06

I almost did that, but in a panic I moved it back after realizing boot itself wasn't behaving properly after the move

aengelberg05:07:47

It was popping open a new screen and hanging

aengelberg05:07:08

(after I ran boot from cmd)

alandipert05:07:53

now i really do gotta go 😪

aengelberg05:07:03

Later. Thanks for the help

alandipert05:07:08

np, godspeed

meow14:07:49

@alandipert: and @zane: Sorry about that false nrepl warning emitted by boot-cljs-repl. The dependency management stuff needs to be reworked, but there has been talk about moving that functionality into boot itself, and also I think there is some talk about merging boot-cljs-repl with boot-cljs. I expect the false warnings to go away as part of those efforts.

micha14:07:45

pkobrien: no worries! boot-cljs-repl is doing great!

meow14:07:46

@micha: Cool. It seems like other than the false warning it's doing what it's supposed to be doing.

micha14:07:58

pkobrien: :thumbsup: 🍻

aengelberg14:07:54

I did some more diagnosing last night. Definitely seems like windows/system32 (as a directory) is making things difficult for Cygwin. Is there anything about boot that makes it have to be in that directory? I tried moving it to C:\bin\ but then running boot opens up a new console, closes it, then emits the help menu as normal.

sooheon14:07:51

pkobrien: just to be clear, you are working on boot-cljs-repl 0.1.10-SNAPSHOT?

sooheon15:07:26

Ah awesome. What exactly are the problems you’re fixing?

sooheon15:07:47

Or where can I read about them :p

meow15:07:25

@sooheon: Mostly there were PRs that hadn't been applied that brought it current with the latest releases of its dependencies, which fixed various problems.

sooheon15:07:53

ah I see I can look through the PRs on the repo

meow15:07:54

Github is your friend

meow15:07:28

Other than a few minor tweaks the bulk of the work/credit goes to others that submitted the PRs

meow15:07:28

I just applied them, tested them, tweaked a few, pushed it out to clojars, closed the issues, responded to help requests, and am waiting to see if we are stable.

sooheon15:07:13

Great. I’ll bump up to the snapshot and see how it works for me as well.

meow15:07:57

@sooheon: Yeah, let me know. Once we are stable I'll push out a 0.1.10

meow15:07:14

So far so good. Everyone seems happy with it.

meow15:07:15

I'm still getting familiar with the code.

sooheon15:07:30

I’m getting a warning which I didn’t before, org.clojure/tools.nrepl version null is older than required 0.2.10. I never required it in my .boot, but the previous version never asked for it either. Tenzing doesn’t include it either. Why is it necessary?

meow15:07:26

@sooheon: tl;dr = ignore it

meow15:07:44

also the Connection is null message

sooheon15:07:03

haha ok. Yeah that as well, they don't break anything, so that’s good advice

meow15:07:06

two artifacts I'd like to get rid of for the 0.1.10 release

meow15:07:38

I don't completely understand why they happen so I haven't dug too deep.

meow15:07:19

Plus there has been talk of restructuring things so dependency management code moves into boot proper

meow15:07:47

Then it can be used by boot-cljs and boot-cljs-repl

meow15:07:17

So I'm kind of waiting on micha and deraen for that.

meow15:07:48

Other than that, the repl seems to work as expected and every problem I thought I had has been confirmed as "to be expected in a cljs REPL" by David Nolen, so, I think it's pretty solid.

meow15:07:01

If you go down the cljs repl rabbit hole there are branches for "cljs isn't clojure", "boot repl uses pods differently", nrepl, piggieback, weasel, etc.

meow15:07:24

Makes your head spin.

sooheon15:07:31

Really does

meow15:07:57

At this point I just wanted the darn thing to work. 😉

sooheon15:07:58

Still can’t even get my head around some things that would be really basic in clj

sooheon15:07:13

I can understand that :P

zane16:07:37

@meow: Thanks for the follow-up!

estsauver16:07:02

Anyone have an example of how the boot test —filters arg works?

estsauver16:07:17

Doc wasn’t really clear and I couldn’t figure it out from quick cli experimentation.

estsauver16:07:36

boot test -f “(println %)"

alandipert16:07:20

@estsauver: the original idea was you could have like (deftest ^:focus some-test ...) in your tests

alandipert16:07:45

and then make a filter like (:focus %) and only tests with {:focus true} meta would run

alandipert16:07:23

in retrospect i think the utility is marginal and the thing is more confusing than helpful

juhoteperi17:07:57

I got cljs-repl working from nrepl but not from vim-fireplace

juhoteperi17:07:01

I guess I have to look at fireplace first to see if there is something wrong there 😄

juhoteperi17:07:33

Looks like it's hanging here:

boot.user=> (cemerick.piggieback/cljs-repl (adzerk.boot-cljs-repl/repl-env))
<< started Weasel server on ws://127.0.0.1:58338 >>
<< waiting for client to connect ... Connection is 
Writing boot_cljs_repl.cljs...

mynomoto18:07:26

deraen: should https://github.com/Deraen/vim-cider work already? I tried to use it yesterday but couldn't get it to do anything.

juhoteperi18:07:30

@mynomoto: Should work now, I had to fix two typos

juhoteperi18:07:49

Clean ns still leaves around unnecessary newlines

mynomoto18:07:39

@juhoteperi: thanks, I will try again.

crisptrutski20:07:19

hey guys - if i’m trying to pick up some compiled js in a downstream task (ie. after boot-cljs), what’s the best way to do that?

crisptrutski20:07:39

interested in the file path - want to run a test reporter

crisptrutski20:07:51

using a pretty rickety approach to get things working: (-> fileset core/output-files (core/by-name ["hopefully-unique-name”]) (->> (sort-by :time)) last)

crisptrutski20:07:08

would there be a better way to do this? i’m pretty new to all these innards - just a little while back i wondered why i was always getting the previous runs temp file in a watch 😉

micha21:07:18

crisptrutski: you can use core/by-re to search by path regex

micha21:07:41

(->> fileset core/output-files (core/by-re [#{"^some/path\.js$"}]))

crisptrutski21:07:24

Actually know the full logical tempfile path, so just using filter with :path instead of any core wrapper

micha21:07:16

:thumbsup: simple_smile

crisptrutski21:07:23

Working pretty well, just a bit anxious about coupling too hard to internals or poor performance of the fileset scan

micha21:07:16

yeah we should have a core/by-path filter

micha21:07:37

not sure how that slipped through the cracks

crisptrutski21:07:08

So I have have two tasks, one that does some code gen, and one that runs that code in various engines (phantom, slimerjs, etc) with shims

crisptrutski21:07:55

And then another task which composes those tasks with boot-cljs for convenience (just builds a meta handler with comp)

crisptrutski21:07:13

Sound like a sane approach?

crisptrutski21:07:47

This way you can build N suites and run in M engines without much hassle, in a CLI composable way

micha21:07:52

why is comp needed?

micha21:07:10

i mean the second task

crisptrutski21:07:26

Needs the compiled js to run side effects

crisptrutski21:07:22

My laptop is dead and charger at work, will upload tomorrow if you'd be up to sanity check it

micha21:07:42

sounds great, i'll be around

crisptrutski21:07:49

Will send that by-path patch too - want a boot sticker :)

micha21:07:04

haha excellent!

crisptrutski21:07:58

Saw Alan downplaying the filter param for boot-test, reckon that's something to leave out for a boot-cljs-test?

crisptrutski21:07:44

Also the version sniffing and warning that other cljs tasks are doing, is that a good pattern to follow for additional deps?

micha21:07:51

hm, i'll ask him about it

micha21:07:02

i haven't used --filters myself

crisptrutski21:07:17

Focus tests might be nice, or a repeat fails only for use with watch

micha21:07:17

i do use mocha --grep ... in node land

crisptrutski21:07:48

Tired and typing on this phone ain't fun - will ping you tomorrow for that review you've promised now ;)

micha21:07:57

awesome, thanks!

meow21:07:03

I think the general consensus is that the version sniffing and warning needs to be consolidated into something closer to boot.core.

micha21:07:29

pkobrien: i'll make a commit to boot core for review tonight

micha21:07:36

for the version stuff

meow21:07:52

I'll plan to revise boot-cljs-repl tomorrow to use your new code then.

micha21:07:21

i wonder if we want a more general compatibility matrix type of thing

micha21:07:45

like a .edn file with a matrix of dependencies

micha21:07:21

hopefully this version incompatibility dependency hell will settle down soon with cljs stuff

micha21:07:31

so maybe we don't need anything that fancy

meow21:07:55

about the only thing I can say is that the tricky bits of functionality need to be in core so they get implemented correctly, and then the more that dependency needs can be described in data the better we'll be, rather than functions implemented in tasks like boot-cljs-repl has now.

meow21:07:32

Pretty generic and typical clojure advice, fwiw. Right? 😉

meow21:07:14

That's about all I can add since I don't know the code base well enough to feel competent about it.

micha21:07:18

maybe something like the maven-enforcer plugin that maven has

meow21:07:16

I know nothing about maven, sorry.