1.1.1 hiccup style helper

118 views
Skip to first unread message

Sean Johnson

unread,
May 1, 2013, 11:21:17 AM5/1/13
to enliv...@googlegroups.com
Hello,

I'm trying to take advantage of the hiccup style helper new in 1.1.1. 

It's odd, but I can't seem to get the html function though. Accessing any of the other functions is fine.

I'm including the dependency via lein with:

   [enlive "1.1.1"]

And pulling it into my namespace with 

   (:use [net.cgrand.enlive-html])

Just to be sure, I tried a couple small tests in the REPL. Here's the output:

   coming-soon.app=> (use '[net.cgrand.enlive-html :only (html-resource)])
   nil

   coming-soon.app=> (use '[net.cgrand.enlive-html :only (texts)])
   nil

   coming-soon.app=> (use '[net.cgrand.enlive-html :only (html)])
   IllegalAccessError html does not exist  clojure.core/refer (core.clj:3849)

Thoughts?

Cheers,
Sean

Linus Ericsson

unread,
May 2, 2013, 5:06:08 AM5/2/13
to enliv...@googlegroups.com
I made an empty project with clojure 1.5.1 and added [enlive "1.1.1"], project.clj

(defproject enlive-test "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :license {:name "Eclipse Public License"
  :dependencies [[org.clojure/clojure "1.5.1"]
                  [enlive "1.1.1"]])

and it works fine:
(use 'net.cgrand.enlive-html)
(html [:p]) => ({:tag :p, :attrs {}, :content ()})

can you try to run:

$lein clean
$lein deps
$lein repl

and try from there (okok, lein deps is run automatically by lein repl these days).

are you having a > 2.0,0 version of leiningen? check with lein version, if not, lein upgrade (there are some differences to be made)

maybe you have some broken version of your local maven repo?

then remove the directory, on lunix most likely

~/.m2/repository/enlive/enlive/1.1.1

then get the deps again.

(and why on earth do even the new not yet jarred enlive 1.1.2 have ancient clojure 1.2.0 as a dependency? :)

/Linus


2013/5/1 Sean Johnson <bel...@acm.org>

--
You received this message because you are subscribed to the Google Groups "Enlive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enlive-clj+...@googlegroups.com.
To post to this group, send email to enliv...@googlegroups.com.
Visit this group at http://groups.google.com/group/enlive-clj?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages