|Status of pallet/lein-template and lein2?||Paul Butcher||7/10/12 10:04 AM|
What is the status of pallet/lein-template with lein2? The fact that it generates a :profiles section suggests that it should work with lein2? But it also generates a :dev-dependencies section, which is (as far as I know?) a lein1-only thing?
The project that's generated doesn't seem to be working for me with lein2 either. Here's what I get:
|Re: Status of pallet/lein-template and lein2?||Hugo||7/10/12 10:34 AM|
Paul Butcher <pa...@paulbutcher.com> writes:The intention is that the generated project.clj should work with both
lein1 and lein2.
I can reproduce the above, and it seems to be caused by a bug in the
no-arg code path. e.g. `lein pallet nodes` works here.
|Re: Status of pallet/lein-template and lein2?||Hugo||7/10/12 11:52 AM|
Hugo Duncan <hu...@hugoduncan.org> writes:Fixed in pallet-lein 0.5.1.
|Re: Status of pallet/lein-template and lein2?||Paul Butcher||7/12/12 3:06 AM|
Many thanks, Hugo. I'm afraid I've hit another problem :-( "lein pallet providers" gives me:
(followed by a long stacktrace that I can send if it's going to be helpful).
I'm generally trying to get my head around "lein pallet" and I'm not finding it to be very discoverable :-( I've not found any documentation on palletops.com (am I missing something?), and "lein pallet help" gives:
Which clearly doesn't list all the tasks that lein pallet supports :-) And of the two that it does list, as far as I'm aware, new-project doesn't do anything useful (we should use pallet/lein-template instead?) (incidentally, it's somewhat confusing that lein-template is called pallet-lein-new in GitHub?)
So I think that I'm right in saying that the set of tasks that's supported by "lein pallet" is basically defined by the files in this directory?:
But not all of these are functional - for example providers has the problem I mentioned at the top of this mail, help is being unhelpful, and version gives me:
What is the best way for me to get an understanding of what "lein pallet" can do, and how it should best be used?
|Re: Status of pallet/lein-template and lein2?||rstradling||7/12/12 5:20 AM|
Are you using Lein 2 or 1?
Sent from my iPhone
|Re: Status of pallet/lein-template and lein2?||Paul Butcher||7/12/12 5:57 AM|
|Re: Status of pallet/lein-template and lein2?||Paul Butcher||7/12/12 6:02 AM|
Specifically 2.0.0-preview7. I've just tried with 1.7.1, and I see exactly the same behaviour, however.
|Re: Status of pallet/lein-template and lein2?||Hugo||7/12/12 8:16 AM|
Paul Butcher <pa...@paulbutcher.com> writes:Thanks for reporting this. https://github.com/pallet/pallet/issues/141.
I've update pallet 0.7.2-SNAPSHOT to fix the resolving of tasks in this
list. Thanks for reporting it.
The new-project task is now removed (0.7.2-SNAPSHOT).
pallet-lein-new was named before auto-discovery of templates was added
to lein-newnew. I suppose we could rename the repo, unless anyone has
Indeed, and you are free to add your own project specific tasks by
adding pallet.task.x namespaces in your project.
Fixed in 0.7.2-SNAPSHOT.
Sounds like we need some documentation on the palletops site for
this. Hopefully the fix to the listing of tasks helps a little.
|Re: Status of pallet/lein-template and lein2?||David Santiago||7/12/12 11:03 AM|
On Thu, Jul 12, 2012 at 3:06 AM, Paul Butcher <pa...@paulbutcher.com> wrote:I can't imagine using pallet without lein pallet. It acts as a control
console for pallet, letting you perform common operations without
needing to write or modify any code. As long as you have configured
your providers in your config.clj file, and have node specs somewhere
on the class path, you can do things like
* lein pallet nodes - Gives you a list of all the nodes that are
currently running on your current provider.
* lein pallet converge some.namespace/var-holding-a-node-spec n -
Runs converge on the current provider, allowing you to create any
number (including 0) of nodes on the current provider
* lein pallet lift some.namespace/var-holding-a-node-spec
[some-phase] - Runs a lift to all nodes of the type specified by the
node-spec, either the default configure phase, or a phase you specify.
You can pick a provider to use on the command line with the -P flag,
or you can use lein2's profiles to select a pallet environment to use
(including provider in the environments) with lein2's with-profile
higher order task, or use sticky tasks with configleaf
When you put that all together, you can create, remove, and run code
on any number of running instances on any configured provider right
from the command line. I've found that for me, when it becomes this
easy, doing development for say a web service is completely different.
You can create a node on virtualbox for development, write a phase to
deploy your code and get it running on the virtualbox node, test it
out locally, and then when you want to run it in production, switch
providers and deploy code on the running nodes (or just create a whole
new set of nodes). You could do all those same things with some
scripts using pallet as a library, but I find it is much easier to
work from the pre-written tasks lein pallet gives you access to
|Re: Status of pallet/lein-template and lein2?||Paul Butcher||7/12/12 11:10 AM|
Thanks, as always, for the rapid response, Hugo.
Yes, fixing help will certainly … err ... help :-) But some introductory text on palletops is also necessary I think to help orient new users.
|Re: Status of pallet/lein-template and lein2?||Paul Butcher||7/12/12 11:11 AM|