plexus/chestnut

Using "--reagent" or "--rum" doesn't seem to work

hanyuone opened this issue · 6 comments

I tried executing this command:

lein new chestnut cljweb +reagent

And it didn't work, for some reason. This is the error message:

Unrecognized option: +reagent . Should be one of --http-kit --site-middleware --less --sass --reagent --vanilla

This seems weird, so I tried adding Reagent into my project with the --reagent command instead:

lein new chestnut cljweb --reagent

And it generated a repository, but for some reason it doesn't have Reagent - instead, it has the default Om. I tried it with --rum this time, and the same thing happened again.

This is the dependencies of the lein new chestnut cljweb --reagent command:

:dependencies [[org.clojure/clojure "1.8.0"]
               [org.clojure/clojurescript "1.9.89" :scope "provided"]
               [com.cognitect/transit-clj "0.8.285"]
               [ring "1.4.0"]
               [ring/ring-defaults "0.2.0"]
               [bk/ring-gzip "0.1.1"]
               [ring.middleware.logger "0.5.0"]
               [compojure "1.5.0"]
               [environ "1.0.3"]
               [org.omcljs/om "1.0.0-alpha36"]]

Hi @Qwerp-Derp,

There are two things happening here. One is that you are trying to use unreleased features, as the README says.

This README may describe unreleased features. Please compare the version number on Clojars to the changelog below, and check the README in your generated project for instructions pertaining to your version.

Rum support and the + syntax are to be released in v0.15.0, which isn't out yet. I did just push a new snapshot to Clojars, so you can try it out and report issues using --snapshot.

Q: How can I get the features in the SNAPSHOT version?
A: Use leiningen's --snapshot flag, e.g. lein new chestnut my-project --snapshot

The second issue is that Chestnut arguments should be separated from Leiningen arguments with --.

So for example

lein new chestnut sesame --snapshot -- +rum

This one is a bit weird, the reason we're moving to + instead of -- is that this would no longer be needed, e.g. once 0.15.0 is out this should work

lein new chestnut sesame +rum

But apparently if you have both Leiningen and Chestnut options, you still need the -- to separate them.

I hope that helps, enjoy Chestnut!

FWIW I've added a bigger warning to the README with a link to the current stable README

2017-04-04-122938_855x71_scrot

For some reason, this doesn't work either. I think Leiningen is screwing up for me.

How do you use [chestnut/lein-template "0.15.0-SNAPSHOT"]? Where do I put this?

You just have to use --snapshot in the invocation the way I showed, leiningen will find the right version

lein new chestnut sesame --snapshot -- +rum

In the end, I just tried this:

lein new chestnut sesame --snapshot -- --reagent

And it works! Yay! It does seem kinda counterintuitive, though. Chestnut looks really nice, I can't wait to start working with it!

The --reagent style form are still supported for backwards compatibilty (so we don't break tutorials etc), but

lein new chestnut sesame --snapshot -- +reagent

should also have worked. And once the next version is out (hopefully soon-ish™) this will become simply

lein new chestnut sesame +reagent