Fork me on GitHub

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


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! 😅