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

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

nicola14:04:05

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

nicola14:04:25

fhir is not found in path

alexmiller14:04:23

Can you explain your setup?

nicola14: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"}

nicola14:04:40

so lib1 is not visible from ui

nicola14:04:18

And -Spaths is wrong

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

nicola14:04:32

looks like it just ignores relative paths

alexmiller14:04:31

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

alexmiller14:04:44

relative paths should work

alexmiller14:04:42

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

nicola14:04:37

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

alexmiller15:04:18

clj -Stree might be easier to read too

nicola15:04:29

Yes i read it

alexmiller15:04:37

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

nicola15:04:39

And wrong path is generated 😞

nicola15:04:59

it lost ..

nicola15:04:22

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

nicola15:04:41

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

alexmiller15:04:01

I can imagine how that would not work in the code

nicola15:04:03

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

alexmiller15:04:27

well you can definitely use absolute paths

nicola15:04:42

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

alexmiller15: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

nicola15:04:07

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

alexmiller15:04:16

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

alexmiller15:04:22

shouldn’t be made to work that is

alexmiller15:04:56

I think I know where the problem is

alexmiller15:04:04

but would be great to have a ticket

nicola15:04:14

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

nicola16: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? 😯

alexmiller17: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 🙂 ¯\(ツ)