Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect resolution of relative :local/root paths #207

Closed
danskarda opened this issue Mar 17, 2023 · 4 comments
Closed

Incorrect resolution of relative :local/root paths #207

danskarda opened this issue Mar 17, 2023 · 4 comments

Comments

@danskarda
Copy link

Imagine you have the directory structure similar to Polylith:

  1. There is projects/development/deps.edn
{:deps {component/foobar   {:local/root "../../components/foobar"}}}
  1. and there is another deps.edn in components/foobar (relative too project root)

  2. you run antq from project root with parameters :directory ["projects/development"]

  3. then antq fails to find component/foobar directory.

I did some debugging and found a place most likely responsible for the issue:

(-> (str (u.dep/relative-path dir)

Function get-relative-path-by-current-working-directory returns projects/development/..components/foobar and not components/foobar as expected.

I suspect the reason is custom concatenation of paths as strings. When I use io/file for standard filename concatenation, (str (io/file dir relative-path)) works fine (under Linux, I do not know about platforms with \ separators).

@liquidz
Copy link
Owner

liquidz commented Mar 18, 2023

@danskarda Thank you for your reporting!
I'll have a look tomorrow.

@liquidz
Copy link
Owner

liquidz commented Mar 19, 2023

@danskarda Thanks for your advice!
I just released 2.2.1017.
Could you try the latest version?

@danskarda
Copy link
Author

Hi @liquidz, I tested 2.2.1017 and it works in my project as expected. Thanks!

@liquidz
Copy link
Owner

liquidz commented Mar 19, 2023

Thanks for your confirmation!

@liquidz liquidz closed this as completed Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants