This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-23
Channels
- # babashka (22)
- # beginners (8)
- # calva (7)
- # clj-kondo (65)
- # cljdoc (9)
- # cljsrn (1)
- # clojure (53)
- # clojure-australia (4)
- # clojure-europe (49)
- # clojure-gamedev (2)
- # clojure-italy (13)
- # clojure-nl (1)
- # clojure-spec (19)
- # clojure-uk (4)
- # clojurescript (48)
- # clojureverse-ops (1)
- # core-async (3)
- # css (2)
- # cursive (15)
- # datomic (6)
- # degree9 (2)
- # depstar (4)
- # emacs (2)
- # find-my-lib (1)
- # fulcro (16)
- # graalvm (11)
- # gratitude (1)
- # honeysql (9)
- # introduce-yourself (2)
- # jobs (1)
- # joker (2)
- # livestream (2)
- # malli (16)
- # nbb (4)
- # news-and-articles (2)
- # off-topic (1)
- # pathom (7)
- # polylith (10)
- # practicalli (1)
- # re-frame (7)
- # reitit (1)
- # releases (3)
- # remote-jobs (1)
- # rewrite-clj (19)
- # shadow-cljs (10)
- # tools-build (1)
- # tools-deps (9)
- # uncomplicate (1)
- # vim (3)
- # xtdb (44)
good morning!
I am debugging weird error, help is much appreciated.
Some clojure file which expected to be compiled is missing.
--
The missing file is prod specific and it is located outside of the src
directory.
./env/prod/storage.clj
:
(ns some-project.storage
“Storage implementation that uses Google Storage buckets”
(:require [integrant.core :as ioc]
[clj-gcp.storage.core :as gcp]
[clojure.tools.logging :as log]
[ :as io]))
;;
;; IoC
;;
(defmethod ioc/init-key ::store [_ {:keys [project-id bucket] :as opts}]
(assoc opts :store (gcp/->gcs-storage-client project-id)))
There is also ./src/cls/storage/store.clj
(which uses dev or prod implementation of the store).
The content of the jar file built with depstar:
some-project/storage/
some-project/storage/store$fn__22403.class
some-project/storage/store__init.class
some-project/storage/store$fetch_file.class
some-project/storage/store$read_BANG_.class
some-project/storage/store$write_BANG_.class
some-project/storage/store$sanitize_path.class
some-project/storage/store$blob.class
some-project/storage/store$sanitize_key.class
some-project/storage/store$loading__6721__auto____21762.class
I would expect a file like some-project/storage$...
to be in the list, but it is not there.
Build command:
clojure -X:prod:uberjar
prod alias
:prod {:extra-paths [“env/prod/clj”]}
---
I’ve tried to copy ./env/prod/storage.clj
into the src directory (preserving proper ns layout) - same result.
Please advice how I can debug it?
---
UPD: problem found, the ns were never required.@kirill.salykin depstar
is a tool and the classpath used to execute a tool is different to whatever the tool builds in order to do its thing. Running :uberjar
with :prod
has no effect. That's explained in the docs -- use :aliases
to pass extra aliases to depstar
to control the classpath you want it to use when building the JAR, and there's also :compile-aliases
if you need a different classpath for compilation (compared to building the JAR file).
thanks, but i think it is because of missing require 🙂