ANN: clojuresque/nrepl 1.0.1 released

72 visualizzazioni
Passa al primo messaggio da leggere

Meikel Brandmeyer

da leggere,
4 apr 2013, 13:40:5504/04/13
a cloju...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear gradling Clojurians,

I finally came around to do some work. I'm bringing clojuresque
up-to-date with the latest gradle developments. (Warning: Breaking
changes ahead. However with a (hopefully) smooth deprecation period.)

Part of this is reorganising everything into smaller plugins. One of
the first is nrepl providing tasks to start and stop a gradle server
in the background.

The process is really started in the background. So in contrary to
JavaExec gradle is not blocked while running the server which solves
some problems with locks on the gradle caches.

There are two tasks "startNRepl" and "stopNRepl". By default the start
task writes the port of the started server into replInfo.edn for use
by other tooling (and the stop task). If you don't want this file, you
can hardwire the repl port in the start task. The stop task will
inherit the settings.

Via init you can inject additional code to be executed on startup. In
the following example this is done for David Greenberg's vim-redl.

- ---8<---
apply plugin: "clojure"
apply plugin: "nrepl"

dependencies {
compile "org.clojure:clojure:1.5.1"

development "org.clojure:tools.nrepl:0.2.0"
development "redl:redl:0.1.0"
}

startNRepl {
replInfo = null
replPort = 4711
replClasspath = project.files(
project.sourceSets.main.clojure.srcDirs,
project.sourceSets.main.resources.srcDirs,
project.configurations.testRuntime,
project.configurations.development
)
init << "(require 'redl.core 'redl.complete)"
}
- ---8<---

Running "gradle startNRepl" will start the server, "gradle stopNRepl"
will stop it.

Please let me know what you think.

Meikel

PS: If someone has some gradle-fu re testing the tasks more robust
then any feedback here is also appreciated!

- --
Meikel Brandmeyer
Clojure Trainings
Kastellstraße 3
63526 Erlensee
http://kotka.de
USt.-Id: DE 285 667 417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRXbsnAAoJEM2sO9pIirXjGLkP/jwf6IHqGMcaa8/RTeLsCDA2
x4UgzURBQwqP0viaYM2/qJ+EdLavGllwwYnwNlP1Cz8W3vDiGpYRxkZZGUnWPikz
arPBVtBQTcIIcvyokUKSLjlooh/fBMCspv6XnfWAw3wUCERD56/RScn/rw5ZvHoA
ivz6ap+6NF+3UGAg05VVm2GN82ZbszRD99iC771XsSD25D7WF3REzRtRgQBH0hhh
8k06xUd82LxX+rOAl70FHFMjKIXptMX2faWZBrQYrL/8wPxhW0kiaC12HuQE9xlr
enFvvg+u+fHwOgKExVmJuRzYUSlzHR3IOTi7mqmB3n1N+fjQTYdyX7GHVYUngVEM
yRwfd7B5/Wb4c26cBgq4X+2eyUB8VFVeG4rLaslF6G89z1M947SKwvq+BCgZGFq+
7oHDEr1mklikMSen3aS7pDXK4gQnnfTWcqUxY3WcaFEryeVwIcPvstcdT2g0Z0bd
XVMV9WT34iyUvoXlWRh6t7x92dMVBE9mkm1T6Z6b6iF/VDkgJPH0m5/8lsOXXpXO
08mjNrnXErebOWT3CAZorTlFdq4eFH63lBXXZKhUz4OcGNkj8AqjCEwGZwxBQ+8n
QAoUyC7GUbO6LW49z1L7um/R/0FeDLllZ8yRr6ink+Juf3QXD/TQ1Ityw8vRisxR
BlItyRAliReiaUc/t3eQ
=XQxa
-----END PGP SIGNATURE-----

Wilson MacGyver

da leggere,
4 apr 2013, 13:57:2204/04/13
a cloju...@googlegroups.com
thanks for keeping up with it!



--
Sie haben diese Nachricht erhalten, weil Sie der Google Groups-Gruppe clojuresque beigetreten sind.
Um Ihr Abonnement für diese Gruppe zu beenden und keine E-Mails mehr von dieser Gruppe zu erhalten, senden Sie eine Email an clojuresque...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out





--
Omnem crede diem tibi diluxisse supremum.

Meikel Brandmeyer

da leggere,
4 apr 2013, 18:15:0404/04/13
a cloju...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some things I just ran into:

- ---8<---
apply plugin: "clojure"
apply plugin: "nrepl"

// TODO: I have to fix this in clojuresque.
// Needed to make things like redl work.
configurations {
development { transitive = true }
}

dependencies {
compile "org.clojure:clojure:1.5.1"

development "org.clojure:tools.nrepl:0.2.0"
development "redl:redl:0.1.0"
}

startNRepl {
replInfo = null
replPort = 4711
init << "(require 'redl.core 'redl.complete)"
}
- ---8<---

The classpath is not really needed. The nrepl plugin provides a
sensible default. The replInfo and replPort are only needed in case
you want to hardwire the port.

Meikel

- --
Meikel Brandmeyer
Clojure Trainings
Kastellstraße 3
63526 Erlensee
http://kotka.de
USt.-Id: DE 285 667 417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRXftnAAoJEM2sO9pIirXjCckP/RAp5i6aQ24od/KhV3ab2VtT
jvm7LnfEjr9oAZBk3EIroSUKfwdebCoou9LeHwjMDHffPAev3In4wDp9mLHFaI8A
TbM4Nf/CGoYOEfpzdKxyNtktMkI2lGsxLVlWejetHZ7BCUTda73RVCDKsL9vyYJA
pINZfGKuEXgRy+/yJbEmNUkpcf1bK/5eZB3iZ6cyQU5reAjcjGl1w4wTjsbRS6LL
8yL5AziAU+SXjHGk1HY2oldZ5Xz+SAwjXz3a9gOnRfoaNTNsirgEcJOxwpoQxfTQ
43a6uj4b6xNZOtgPB6a/40sgoGdsP6uzYanJwvfVFGpbAN/1bXVK+RG4ZD4y1yC4
8H4LT/QS+q3QyGcHLapYslEyyLv+G4kqY+Imp9rSDJH6jcUV844ANma1mMzDrzjw
rMQ+fodtGmBg9Cw4Vpd5qdiMzdMKNc/DByhQpUqoNc+Ku7fMVppwnqW8XqR3qpsP
TGtdPWFEeqhL/QJQSP21rUvuAHIjqJ5yCM5OltDGQyv5+Ulq5GzE5cskeKcAF9ZI
jhY/TSVNkZkuIC9W2AAwuyfSJPt52DrB3bWXn1QJU+D5jPK2g+k3YdKe+vLSsb4d
WjhCZL9fDoY4lRSy9vTVG2Jl2oHC42Qyr6d3o7PtZWMKw3KiVzt1KDuqAbuquXbK
XDy4AP2VQ9fsDpbccfd1
=tDfQ
-----END PGP SIGNATURE-----
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi