Hi Tim, Thanks for the feedback.
A. By default, nrepl-jack-in will invoke lein from the directory of the project that owns the file in the current Emacs buffer. You need to start Jig from its own project directory, not the project directory of your own application. Normally I load up Jig's project.clj into an Emacs buffer, run nrepl-jack-in from there, and then type (go) in the repl buffer that appears. Alternatively you can type 'lein repl' from the Jig repo directory. B. This is my mistake. An earlier version of jig used :components while the current version uses :jig/components. I forgot to update the sample.config.edn file. This is now fixed on master. Everything else you've done looks OK to me. I keep my own working config for stuff I'm currently running in Jig on a branch (juxtweb), treat it as a working example until I have documented this area more fully: https://github.com/juxt/jig/blob/juxtweb/config/config.clj Regards, Malcolm On Monday, 14 October 2013 18:07:38 UTC+1, frye wrote: > > This looks really cool. A few things. > > > *A)* Looks like I have to run nrepl in the jig project directory. I'm > finding that emacs also has to be started in the same jig directory. Then > all of my code editing has to be referenced from that directory (ie: *C-x > C-f ../my-project/my-file.clj*). If I try to run emacs in my-project, > then *M-x repl*, I get the below error. Is there a way around this? > > ... in *Messages* > Connecting to nREPL on 127.0.0.1:4555... > open-network-stream: make client process failed: connection refused, > :name, nrepl, :buffer, *nrepl-connection*, :host, 127.0.0.1, :service, > 4555, :nowait, nil > > ... in emacs' minibuffer line > *make client process failed: connection refused, :name, nrepl, :buffer, > *nrepl-connection*, :host, 127.0.0.1, :service, 4555, :nowait, nil * > > > > *B)* I'm trying to wire up an external project, but getting a > NullPointerException when calling *(go)*. I'm following the > usage<https://github.com/juxt/jig#usage>instructions, and guide for external > projects <https://github.com/juxt/jig#external-projects>. Is there > something obvious that I'm missing? > > ~/Projects/jig$ lein repl > nREPL server started on port 33095 on host 127.0.0.1 > REPL-y 0.2.1 > Clojure 1.5.1 > Welcome to Jig! > > (go) -- start the system > (reset) -- reset the system > (refresh) -- recover if a reset fails due to a compilation error > (menu) -- show this menu again > *Jig user> (go)* > > *NullPointerException clojure.core/val (core.clj:1489)* > Jig user> (pst *e) > *NullPointerException * > * clojure.core/val (core.clj:1489)* > * loom.graph/build-graph/build--1546 (graph.clj:411)* > * clojure.core.protocols/fn--6037 (protocols.clj:127)* > * clojure.core.protocols/fn--6005/G--6000--6014 (protocols.clj:19)* > * clojure.core.protocols/seq-reduce (protocols.clj:31)* > * clojure.core.protocols/fn--6028 (protocols.clj:48)* > * clojure.core.protocols/fn--5979/G--5974--5992 (protocols.clj:13)* > * clojure.core/reduce (core.clj:6177)* > * loom.graph/build-graph (graph.clj:425)* > * clojure.core/apply (core.clj:619)* > * loom.graph/digraph (graph.clj:437)* > * jig.system/get-digraph (system.clj:87)* > nil > > > *fig.1 - shell error output * > > > {:components > > {:recordo {:jig/component org.recordo.core/Component > :jig/project "../recordo/project.clj"}}} > > > *fig.2 - jig/config/config.edn* > > > (ns recordo.core > (:import (jig Lifecycle))) > > > ;; A Jig Component > (deftype Component [config] > Lifecycle > (init [_ system] system) > (start [_ system] system) > (stop [_ system] system)) > > > *fig.3 - recordo/src/recordo/core.clj; ... recordo's project.clj has no > mention of "**jig**"* > > > > Cheers - great work. > > Tim Washington > Interruptsoftware.ca / Bkeeping.com > > > > On Fri, Oct 11, 2013 at 12:23 PM, Malcolm Sparks <mal...@juxt.pro<javascript:> > > wrote: > >> A few months ago, Stuart Sierra blogged about the workflow he follows for >> building Clojure applications. >> >> "One of the great pleasures of working with a dynamic language is being >> able to build a system while simultaneously interacting with it. " >> -- http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded >> >> Since then I've been using this workflow for my own projects, and found >> it to be amazingly effective. >> >> I've added some extra features, and the result is Jig, which builds on >> Stuart's work in the following ways :- >> >> - Multiple components can each contribute to the 'system' map >> - Components are started in dependency order >> - Components are specified and configured in a config (edn) file >> - Jig can host 'plain old' Leiningen projects - Jig will even >> 'reload' them too e.g. if their project.clj dependencies change. >> - Jig can host multiple projects simultaneously >> >> There's a small but growing list of optional re-usable components that >> provide extra functionality :- >> >> - Pedestal services support. Jig provides the system map and >> 'url-for' function in the service context. >> - Nginx cache purging on reload >> - Git pull prior reload >> - Reload via JMX >> - nREPL >> - Stencil cache purging >> - Firefox remote control support for 'browser refresh on reload' >> >> I know others are working on similar designs. I'd be interested to hear >> what people think and whether this is useful. >> >> Thanks, >> >> Malcolm >> >> PS: Jig can be found here: https://github.com/juxt/jig >> >> -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.