This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-29
Channels
- # announcements (6)
- # babashka (23)
- # beginners (15)
- # biff (15)
- # calva (17)
- # clara (5)
- # clj-kondo (41)
- # cljdoc (2)
- # cljs-dev (67)
- # cljsrn (18)
- # clojure (19)
- # clojure-europe (25)
- # clojure-nl (2)
- # clojure-norway (9)
- # clojure-uk (2)
- # clojurescript (26)
- # core-typed (6)
- # cursive (15)
- # data-science (30)
- # datahike (1)
- # datomic (18)
- # docker (6)
- # emacs (10)
- # events (2)
- # graalvm (15)
- # graphql (5)
- # hugsql (4)
- # jobs-discuss (1)
- # joker (7)
- # lsp (36)
- # malli (28)
- # off-topic (46)
- # other-languages (1)
- # pathom (5)
- # pedestal (6)
- # polylith (5)
- # reitit (2)
- # releases (1)
- # rewrite-clj (63)
- # shadow-cljs (7)
- # spacemacs (16)
- # squint (6)
- # tools-deps (6)
- # xtdb (13)
I am trying to include a Git repository, using deps.edn
. The REPL tells me that
2022-09-29 14:57:02.900:INFO::nREPL-session-3ca227b8-0702-4f72-8e40-837584052d45: Logging initialized @9646ms to org.eclipse.jetty.util.log.StdErrLog
Execution error (FileNotFoundException) at fabula.backend/eval1913$loading (backend.clj:1).
Could not locate ripley/html__init.class, ripley/html.clj or ripley/html.cljc on classpath.
What did I do wrong? I did include the link like this:
{:paths ["src" "resources"]
:deps
{org.clojure/clojure {:mvn/version "1.11.1"}
ring/ring-core {:mvn/version "1.9.6"}
ring/ring-jetty-adapter {:mvn/version "1.9.6"}
compojure/compojure {:mvn/version "1.7.0"}
org.clojure/data.json {:mvn/version "2.4.0"}
ripley/ripley {:git/url ""
:git/sha "bca327a81c0ee81a979a6bdeec533ea72483515e"}
}}
I am using Intellij with Cursive and nREPL, if you need information. I also tried to use clj -Spom
, and while the generated pom.xml
includes libraries from Clojars, it does not include the library from Git. I am not sure if it is the reason and in the end, how to fix itI copied your deps.edn file and seem to be able to require the ripley.html
namespace.
% clj
Cloning:
Checking out: at bca327a81c0ee81a979a6bdeec533ea72483515e
Downloading: ring/ring-jetty-adapter/1.9.6/ring-jetty-adapter-1.9.6.pom from clojars
Downloading: compojure/compojure/1.7.0/compojure-1.7.0.pom from clojars
Downloading: ring/ring-core/1.9.6/ring-core-1.9.6.pom from clojars
Downloading: commons-io/commons-io/2.11.0/commons-io-2.11.0.pom from central
Downloading: ring/ring-codec/1.2.0/ring-codec-1.2.0.pom from clojars
Downloading: ring/ring-servlet/1.9.6/ring-servlet-1.9.6.pom from clojars
Downloading: org/eclipse/jetty/jetty-server/9.4.48.v20220622/jetty-server-9.4.48.v20220622.pom from central
Downloading: org/eclipse/jetty/jetty-project/9.4.48.v20220622/jetty-project-9.4.48.v20220622.pom from central
Downloading: medley/medley/1.4.0/medley-1.4.0.pom from clojars
Downloading: crypto-equality/crypto-equality/1.0.1/crypto-equality-1.0.1.pom from clojars
Downloading: org/junit/junit-bom/5.8.2/junit-bom-5.8.2.pom from central
Downloading: org/testcontainers/testcontainers-bom/1.16.1/testcontainers-bom-1.16.1.pom from central
Downloading: org/infinispan/infinispan-bom/11.0.15.Final/infinispan-bom-11.0.15.Final.pom from central
Downloading: org/infinispan/infinispan-build-configuration-parent/11.0.15.Final/infinispan-build-configuration-parent-11.0.15.Final.pom from central
Downloading: org/clojure/tools.logging/1.2.4/tools.logging-1.2.4.pom from central
Downloading: http-kit/http-kit/2.5.1/http-kit-2.5.1.pom from clojars
Downloading: org/eclipse/jetty/jetty-http/9.4.48.v20220622/jetty-http-9.4.48.v20220622.pom from central
Downloading: org/eclipse/jetty/jetty-io/9.4.48.v20220622/jetty-io-9.4.48.v20220622.pom from central
Downloading: cheshire/cheshire/5.1.0/cheshire-5.1.0.pom from clojars
Downloading: org/eclipse/jetty/jetty-util/9.4.48.v20220622/jetty-util-9.4.48.v20220622.pom from central
Downloading: org/clojure/tools.logging/1.2.4/tools.logging-1.2.4.jar from central
Downloading: org/eclipse/jetty/jetty-util/9.4.48.v20220622/jetty-util-9.4.48.v20220622.jar from central
Downloading: org/eclipse/jetty/jetty-http/9.4.48.v20220622/jetty-http-9.4.48.v20220622.jar from central
Downloading: ring/ring-jetty-adapter/1.9.6/ring-jetty-adapter-1.9.6.jar from clojars
Downloading: commons-io/commons-io/2.11.0/commons-io-2.11.0.jar from central
Downloading: compojure/compojure/1.7.0/compojure-1.7.0.jar from clojars
Downloading: ring/ring-codec/1.2.0/ring-codec-1.2.0.jar from clojars
Downloading: org/eclipse/jetty/jetty-io/9.4.48.v20220622/jetty-io-9.4.48.v20220622.jar from central
Downloading: ring/ring-servlet/1.9.6/ring-servlet-1.9.6.jar from clojars
Downloading: org/eclipse/jetty/jetty-server/9.4.48.v20220622/jetty-server-9.4.48.v20220622.jar from central
Downloading: cheshire/cheshire/5.1.0/cheshire-5.1.0.jar from clojars
Downloading: crypto-equality/crypto-equality/1.0.1/crypto-equality-1.0.1.jar from clojars
Downloading: medley/medley/1.4.0/medley-1.4.0.jar from clojars
Downloading: ring/ring-core/1.9.6/ring-core-1.9.6.jar from clojars
Downloading: http-kit/http-kit/2.5.1/http-kit-2.5.1.jar from clojars
Clojure 1.11.1
user=> (require '[ripley.html])
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/update-vals
WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/update-keys
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer, being replaced by: #'clojure.tools.analyzer.utils/update-vals
WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: clojure.tools.analyzer, being replaced by: #'clojure.tools.analyzer.utils/update-keys
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.passes, being replaced by: #'clojure.tools.analyzer.utils/update-vals
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.analyzer.passes.uniquify, being replaced by: #'clojure.tools.analyzer.utils/update-vals
nil
user=>
I don't think that a pom can contain a git dependency. I think that maven requires maven artefacts and doesn't know anything about resolving clojure tools deps dependencies, so I would expect it to not be included in a generated pom. If starting the repl from within cursive requires a pom, maybe you could start the nrepl server from a terminal and connect to it from within cursive? I'm afraid I don't know all that much about cursive.@U0P0TMEFJ thanks! I tried to start a REPL for myself and hook Cursive's one into it, and it worked fine. I will try to report it to #cursive
FWIW, I think starting a REPL from the terminal and hooking into it from your editor is a better "pattern" for working anyway. I tend to leave my REPL running for days (or weeks) but my editors get restarted far more often.
Out of the box, you can't. You could try one of the git-related plugins for Leiningen, such as https://github.com/reifyhealth/lein-git-down @U38C71QAH (or you could switch your project over to deps.edn
and the official Clojure CLI).
Some advice regarding libraries needed: I want to scrape data off from a web site and store it locally…. as a toy project and to learn clojure… should I stick with apache http client and jsoup for now or would you recommend a more clojury library as replacement? How about storing / querying data? thx!
it’s not really a site meant to be slurped 🙂 so yea I will have to do quite a bit of parsing to isolate the bits I need. I would also have to follow links that lead to other pages so forth..
usually preferrable to find the api that the site itself uses and use that if possible
@U11BV7MTK it’s a regular website https://www.parfumo.net/Perfumes/Xerjoff/white-on-white-one I go with slurp + jsoup. merci