This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-02
Channels
- # announcements (1)
- # babashka (15)
- # beginners (34)
- # calva (19)
- # clerk (6)
- # clojure (29)
- # clojure-dev (4)
- # clojure-europe (2)
- # clojurescript (2)
- # conjure (1)
- # cursive (56)
- # datomic (4)
- # gratitude (1)
- # hyperfiddle (18)
- # lsp (15)
- # nextjournal (2)
- # off-topic (9)
- # reitit (16)
- # releases (1)
- # slack-help (2)
- # specter (1)
- # tools-deps (12)
- # transit (1)
Seems there's missing functions in the included selmer?
----- Error --------------------------------------------------------------------
Type: java.lang.Exception
Message: get-filter does not exist
Location: selmer/filter_parser.clj:15:3
----- Context ------------------------------------------------------------------
11:
12: You can escape doublequotes inside doublequotes. And you can put colons
13: inside doublequotes which will be ignored for the purpose of separating
14: arguments."
15: (:require
^--- get-filter does not exist
16: [selmer.filters :refer [get-filter]]
17: [selmer.util :refer [*escape-variables* parse-accessor]]
18: [clojure.string :as str]))
19:
20: ;;; More Utils
----- Stack trace --------------------------------------------------------------
selmer.filter-parser - selmer/filter_parser.clj:15:3
I think this will fix the problem: https://github.com/babashka/babashka/pull/1585 When the current master build finishes, you can install with:
bash <(curl ) --dev-build --dir /tmp
Now I get:
----- Error --------------------------------------------------------------------
Type: java.lang.Exception
Message: parse-accessor does not exist
Location: selmer/filter_parser.clj:15:3
----- Context ------------------------------------------------------------------
11:
12: You can escape doublequotes inside doublequotes. And you can put colons
13: inside doublequotes which will be ignored for the purpose of separating
14: arguments."
15: (:require
^--- parse-accessor does not exist
16: [selmer.filters :refer [get-filter]]
17: [selmer.util :refer [*escape-variables* parse-accessor]]
18: [clojure.string :as str]))
19:
20: ;;; More Utils
----- Stack trace --------------------------------------------------------------
selmer.filter-parser - selmer/filter_parser.clj:15:3
Based on the previous commit you can probably infer how to fix it. Can you maybe provide the full example of what you’re trying to do?
(require '[selmer.filter-parser :as htmlp])
(require '[selmer.parser :as html])
(defn resolve-selmer-args
[args context-map]
(map #(if (htmlp/literal? %)
(htmlp/parse-literal %)
(html/render % context-map)) args))
But this example doesn't contain a reference to selmer.filter
get-filter
etc which we added yesterday?
Can you explain in words what you're trying to do as well? I've never touched this part of selmer before, so it's an opportunity for me to learn
I think we're dealing with an X-Y problem here. You weren't after selmer.filter but you wanted to make selmer.filter-parser work and you tried to load Selmer from source, if I'm understanding correctly
Yes, that's the weird part. I don't directly use the functions it's complaining about.
Oh... Is it because I have Selmer in my deps.edn ? I'm trying to make my script work in both BB and Clojure, which is why I added Selmer in my deps.edn as well. And I have bb.edn configured to use the deps from the deps.edn. Does that mean BB will use the Selmer from the deps instead of the one it has already? And is that why it's not working?
This issue explains in words what I'm trying to do: https://github.com/yogthos/Selmer/issues/303#issuecomment-1616799948