Hi, can someone help with this ? I'm trying to use hicory inside a renderer to modify an existing html page, but doing this inside a renderer:
(ns io.embarassed.index
(:require [io.embarassed.common :as common]
)
(:use [hiccup.core :only (html)]
[hiccup.page :only (html5)]
[hickory.core :only (parse)]))
(defn render [{global-meta :meta posts :entries}]
(println (parse "<a href=\"foo\">foo</a>"))
I get this error:
[render] - rendered new or changed file public/prova.html
http://java.io.FileNotFoundException: Could not locate hickory/core__init.class or hickory/core.clj on classpath.
clojure.lang.Compiler$CompilerException: http://java.io.FileNotFoundException: Could not locate hickory/core__init.class or hickory/core.clj on classpath., compiling:(io/embarassed/index.clj:1:1)
I added hickory to the set-env! in build.boot like this:
(set-env!
:source-paths #{"src"}
:resource-paths #{"content"}
:dependencies '[[perun "0.4.3-SNAPSHOT" :scope "test"]
[hiccup "1.0.5" :exclusions [org.clojure/clojure]]
[org.martinklepsch/boot-garden "1.3.2-1"]
[garden "1.3.9"]
[hickory "0.7.1"]
[pandeiro/boot-http "0.8.3" :exclusions [org.clojure/clojure]]])
(require '[clojure.string :as str]
'[boot.core :as boot]
'[io.perun.meta :as pm]
'[io.perun :as perun]
'[io.perun.core :as cperun]
'[hickory.core :as hk]
'[org.martinklepsch.boot-garden :refer [garden]]
'[io.embarassed.index :as index-view]
'[<http://io.embarassed.post|io.embarassed.post> :as post-view]
'[pandeiro.boot-http :refer [serve]])
and
(println (hk/parse "<a href=\"foo\">foo</a>"))
correctly works in the repl, it seems it has problem when run in a pod.
From what I can understand from the sources pod creation uses the same set of dependencies, so I'm really confused.
How do you troubleshoot this kind of problems ?How is the parsing function being applied in your boot pipeline?