Closed danskarda closed 1 year ago
@danskarda Thank you for your reporting! I'll have a look tomorrow.
@danskarda Thanks for your advice! I just released 2.2.1017. Could you try the latest version?
Hi @liquidz, I tested 2.2.1017 and it works in my project as expected. Thanks!
Thanks for your confirmation!
Imagine you have the directory structure similar to Polylith:
projects/development/deps.edn
and there is another
deps.edn
incomponents/foobar
(relative too project root)you run antq from project root with parameters
:directory ["projects/development"]
then antq fails to find
component/foobar
directory.I did some debugging and found a place most likely responsible for the issue:
https://github.com/liquidz/antq/blob/9715ef8e30a6fd9b4179bc0ade7f5d8c1619e69b/src/antq/dep/clojure.clj#L83
Function
get-relative-path-by-current-working-directory
returnsprojects/development/..components/foobar
and notcomponents/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).