This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-01
Channels
- # announcements (10)
- # asami (2)
- # babashka (10)
- # beginners (55)
- # biff (37)
- # calva (9)
- # cherry (1)
- # clj-kondo (11)
- # clojure (221)
- # clojure-bay-area (12)
- # clojure-europe (77)
- # clojure-hungary (3)
- # clojure-nl (5)
- # clojure-norway (12)
- # clojurescript (11)
- # cursive (1)
- # data-science (11)
- # emacs (27)
- # figwheel (3)
- # fulcro (11)
- # graphql (5)
- # helix (7)
- # honeysql (3)
- # humbleui (9)
- # interceptors (2)
- # introduce-yourself (2)
- # kaocha (12)
- # lsp (27)
- # malli (6)
- # nbb (70)
- # off-topic (6)
- # re-frame (6)
- # react (3)
- # reitit (9)
- # releases (2)
- # scittle (29)
- # shadow-cljs (26)
- # sql (13)
- # tools-deps (61)
I'm trying to include the ES6 module from the snowball stemmer repo into my clojurescript application (https://github.com/mazko/jssnowball/), but am getting the error, 'The required namespace "snowball" is not available'. I've installed the file, locally, to resources/public/js/modules/es6/snowball.es6
. I've added the following line to my Leiningen project.clj
:
:foreign-libs [{:file "resources/public/js/modules/es6/snowball.es6"
:provides ["snowball"]
:module-type :es6}]
And in the respective .cljs file, I've added the following:
(ns ...
(:require [snowball]))
What am I doing wrong? I'm using Leiningen 2.9.10
, Clojure 1.11.1
, and ClojureScript 1.11.60
.I often put build configuration in the wrong place 😆 Probably you didn't make that mistake, but it's something to check /shrug (perhaps show a bit more of the project file for context?)
if so you follow this https://shadow-cljs.github.io/docs/UsersGuide.html#classpath-js, as :foreign-libs
is not supported
or you just use the npm package which also seems to exist? https://github.com/mazko/jssnowball/tree/master/js_snowball/npm
@U05224H0W, that is exactly my problem. I do use shadow-cljs, but only because it's used by the Leiningen template I used to generate my app. I've been out of the CLJS loop for a little while and shadow-cljs is new to me. I ended up rewriting the ES5 version of the stemmer to old-school JS and included it like a standard script file. I'll experiment with your suggestions, thanks!
General question, why doesn't Range
check equality using its start/end
when comparing to another Range
?
ClojureScript does have specific types, see here - https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L9823-L10072
👍 oh i see