This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-30
Channels
- # aleph (4)
- # beginners (24)
- # boot (15)
- # cider (4)
- # cljs-dev (37)
- # clojure (73)
- # clojure-losangeles (1)
- # clojure-serbia (1)
- # clojure-spec (27)
- # clojurescript (78)
- # core-logic (3)
- # datascript (9)
- # datomic (10)
- # events (1)
- # lein-figwheel (1)
- # lumo (2)
- # off-topic (14)
- # om (6)
- # om-next (1)
- # parinfer (18)
- # pedestal (2)
- # protorepl (4)
- # re-frame (2)
- # reagent (56)
- # specter (6)
- # unrepl (2)
so this use case came up a couple of times already and it might be nice to think of a solution: I need a way to map back from a boot file in .boot/cache
to a project file. I don't think we have that at the moment, do we?
In particular for resources
or assets
, once you add things to the fileset, the conversion to roles loses information and you will only have a file path that is relative to a cache folder, to exemplify in boot-figreload
I see:
{:relative-path "store.js",
:dir-path "/home/arichiardi/.boot/cache/tmp/home/arichiardi/git/figreload-demo/5hc/fwjp2k",
:full-path "/home/arichiardi/.boot/cache/tmp/home/arichiardi/git/figreload-demo/5hc/fwjp2k/store.js"}
where store in reality is in assets/store.js
the current hack/solution is to use fake.class.path
and kind of reverse engineer it
https://github.com/clojure-emacs/refactor-nrepl/commit/59c377fad9fcfc30cf9d7a2c0064dfb69624bf21
but if we could store some meta along of course we would avoid that, open to ideas!
@richiardiandrea I have thought about this, but the metadata would be lost when a task modifies the file
right, so we'd need a persisted way to have this info, for instance now the blob file name contains hash and time, we could encode the info in the file name as well (I have never seen big paths anyway). So the blob name could become something like src.hash.time
or assets.hash.time
don't know, again just brainstorming š
Also @kommen there is a SHAPSHOT out solving the dreaded is not a relative file
issue on our side
I am losing my tiny little mind over this problem - I have written a custom tag reader to shoehorn āplease fetch that db connect string from the environmentā into an EDN file as #my-project/config "DB_CONNECT_URI"
I have src/data_readers.clj
containing {myproject/config my-project.readers/get-config}
and a src/my_project/readers.clj
that declares the my-project.readers
ns and has a (defn get-config ...)
in it
aaaaand Iām pretty sure I just figured out that the problem was that data_readers.clj
actually said {my-project/config my*_*project.readers/get-config}
by going to copy the exception I was seeing
indeed. Thanks for being my rubber duck, again, Slack friends! š