Fork me on GitHub
#lumo
<
2017-04-15
>
plexus10:04:26

Is there any way to get a line number or stack trace on errors? I'm seeing things like this

plexus10:04:27

> #error {:message ERROR in file syna/esth/esia.cljs, :data {:tag :cljs/analysis-error}, :cause #object[TypeError TypeError: path must be a string or Buffer]}

plexus10:04:39

and that's it

pesterhazy11:04:48

@plexus, I've had that problem too

pesterhazy11:04:02

strangely, sometimes you get stacktraces, sometimes you don't

plexus15:04:35

maybe folks are interested in this stuff, I've been writing some wrapper and utility functions around node's process and stream stuff

plexus15:04:06

for example

plexus15:04:14

(| (<file "input.txt")
   (cmd! ["grep" "foo"])
   (cmd! ["tac"])
   (>file "output.txt"))

plexus15:04:26

so far strictly home brewed for my own purposes, but might give folks ideas for a repl utility library for lumo

plexus15:04:06

that pipe function is built on a Pipe protocol

(defprotocol Pipe
  (-source [this])
  (-sink [this]))

plexus15:04:19

which means you can use a bunch of different things in there, different types of node streams, buffers, the result of cmd! (which is a custom record)

dominicm18:04:33

neat 🙂 I like it

futuro23:04:27

@plexus Cool stuff! If you haven't already seen these, you might be interested in https://github.com/abiocljs/abio and https://github.com/pkpkpk/cljs-node-io