Fork me on GitHub
#tools-deps
<
2018-04-23
>
niquola14:04:33

Hi i have monorepo with submodules - looks like deps does not follow second level of relative paths? Should it?

niquola14:04:05

cleo/cleo ../backend
  fhir/fhir ./sansara/fhir

niquola14:04:25

fhir is not found in path

Alex Miller (Clojure team)14:04:23

Can you explain your setup?

niquola14:04:31

ui/
  deps.end
backend/
  deps.edn
  libs/
    lib1/deps.edn
    lib2/deps.edn
    
# in ui
backend {:local/root "../backend"}
# in backend
lib1 {:local/root "./libs/lib1"}

niquola14:04:40

so lib1 is not visible from ui

niquola14:04:18

And -Spaths is wrong

$ui-dir/./backend/libs/lib1/src
$ui-dir/../backend/src

niquola14:04:32

looks like it just ignores relative paths

Alex Miller (Clojure team)14:04:31

you had “bacend” above - just checking that was a typo here

Alex Miller (Clojure team)14:04:44

relative paths should work

Alex Miller (Clojure team)14:04:42

and “.libs/lib1” should be “libs/lib1" or “./libs/lib1”

niquola14:04:37

I’ve tried both 🙂 - will check one more time

Alex Miller (Clojure team)15:04:18

clj -Stree might be easier to read too

niquola15:04:29

Yes i read it

Alex Miller (Clojure team)15:04:37

there might be an issue with relative local deps of relative local deps?

niquola15:04:39

And wrong path is generated 😞

niquola15:04:59

it lost ..

niquola15:04:22

so i’ve got ui/./libs/lib1

niquola15:04:41

instead of ui/../backend/./libs/lib1

Alex Miller (Clojure team)15:04:01

I can imagine how that would not work in the code

niquola15:04:03

Should i switch to absolute paths or try to pull request 🙂?

Alex Miller (Clojure team)15:04:27

well you can definitely use absolute paths

niquola15:04:42

do you have some reader macro to read env in deps.edn?

Alex Miller (Clojure team)15:04:51

we don’t take PRs for this project, but you can definitely file an issue at https://dev.clojure.org/jira/browse/TDEPS if you like

niquola15:04:07

Yes, that’s my case - are you planning to support this situation?

Alex Miller (Clojure team)15:04:16

off the top of my head, I don’t see why this shouldn’t work

Alex Miller (Clojure team)15:04:22

shouldn’t be made to work that is

Alex Miller (Clojure team)15:04:56

I think I know where the problem is

Alex Miller (Clojure team)15:04:04

but would be great to have a ticket

niquola15:04:14

yep, will do - thank you. Done #TDEPS-74 + repo to reproduce https://github.com/niquola/local-deps-bug

niquola16:04:05

Is there any way to inject env variable into deps.edn?

delaguardo16:04:28

clj -Sdeps '$(cat deps.edn | echo)' mb? But I never tried that before troll

dominicm17:04:30

I mentioned this before, it's because the paths are not resolved relative to dependency manifest, but are relative to where the JVM started. Is it now the case that you're interested in supporting this? 😯

Alex Miller (Clojure team)17:04:41

Sorry, I don’t remember that conversation

dominicm17:04:05

if tdeps-74 is likely to be fixed, I'm happy. It suits my mono-repo intentions 🙂 ¯\(ツ)