tools-deps

2025-08-14T16:05:12.181129Z

I have project A and B:

ls ..
a b
in project A, I have both:
a/dev/deps.edn
a/deps.edn
in the project b I'm trying to use:
:deps {my-project/a {:local/root "../a/dev"}
I am declaring paths inside a/dev/deps.edn:
:paths   ["../src"
           "../resources"
           "../dev"
           "../test/integration"
           "../test/unit"
           "../test/resources"]
I'm getting WARNING: Deprecated use of path /codebuild/output/.../test/resources external to project /codebuild/output/.../dev In my project B, I have: :deps {my-project/a {:local/root "../a/dev"} The idea is that my project B tries to import things on the project A that has all of the namespaces... "it works in my machine" but in the pipeline machine not, why?

Kirill Chernyshov 2025-08-14T16:08:08.656529Z

please keep all additional details in a thread. This way it will be easier to get all details in one place

2025-08-14T16:12:02.842189Z

I did all the chat in the same message

2025-08-14T16:12:12.330909Z

sorry for early polution

Kirill Chernyshov 2025-08-14T16:13:02.998369Z

There is a problem with project A: relative source paths had been deprecated some time ago. Could you check the versions of clojure cli installed localy and on CI?

2025-08-14T16:14:22.877649Z

chmod +x install-scripts/clojure-install-script/linux-install-1.11.2.1446.sh

2025-08-14T16:14:26.598249Z

ci

2025-08-14T16:14:52.338139Z

my machine: Clojure CLI version 1.12.0.1530

2025-08-14T16:15:20.462819Z

then I should bump in my CI?

Kirill Chernyshov 2025-08-14T16:18:18.180889Z

worth a try. 1.11.2.1446 is almost exactly one year apart from the version on you machine.

👍 1
Kirill Chernyshov 2025-08-14T16:19:17.719079Z

But I wonder how it works locally. Can you see a warning like this: WARNING: Use of :paths external to the project has been deprecated, please remove: ../foo when you run cli locally?

2025-08-14T16:19:38.922989Z

yup

2025-08-14T16:19:41.654619Z

same warning

Alex Miller (Clojure team) 2025-08-14T16:19:52.697149Z

when it "doesn't work" on the pipeline machine, what happens

Alex Miller (Clojure team) 2025-08-14T16:19:56.892599Z

just the warning?

2025-08-14T16:20:47.340549Z

the project B does not load a namespace in a/src

Alex Miller (Clojure team) 2025-08-14T16:20:58.666289Z

"does not load" means what?

2025-08-14T16:21:40.408679Z

SLF4J(I): Connected with provider of type [org.slf4j.nop.NOPServiceProvider]
Loading namespaces:  (core)
Test namespaces:  (:automation)
Execution error at a.handler/eval24296$loading (handler.clj:1).
namespace 'a.logger' not found

Full report at:
/tmp/clojure-11801420562536830089.edn

Alex Miller (Clojure team) 2025-08-14T16:22:49.496869Z

there were some changes a while back to fix relative path resolution, would take me some digging to remember what those were or what version things changed. I think my first suggestion would be to update the CI version to latest

2025-08-14T16:22:58.236969Z

ok

Alex Miller (Clojure team) 2025-08-14T16:23:22.566729Z

the warning is just a warning - relative paths "above" the project still work (for now)

Alex Miller (Clojure team) 2025-08-14T16:24:12.805109Z

the preferred way to handle this is by referring to a dep, either :local relative or :git with the root

Alex Miller (Clojure team) 2025-08-14T16:24:46.278979Z

allowing access to relative paths above the project root has potential security issues and it will be disallowed in the future

😢 1
Alex Miller (Clojure team) 2025-08-14T16:45:58.975759Z

you have been WARNed :)

2025-08-14T16:46:08.228249Z

yup

2025-08-14T16:47:18.047909Z

do you think then it's good for me to release the artifact of the dev app and refer to it?

2025-08-14T16:47:41.732469Z

build it adding the paths I want in a jar for A and refer it on B?

Alex Miller (Clojure team) 2025-08-14T16:49:11.122209Z

if you logically have two projects, then I think it probably makes sense to make two artifacts/projects

2025-08-14T16:49:47.037819Z

b project is for "blackbox testing" the project a

2025-08-14T16:50:40.034429Z

I have a http://a.dev/test-env-fn that project b needs to execute

2025-08-14T16:51:40.508059Z

a will have 2 jar in thesis

2025-08-14T16:51:45.073269Z

prod jar and test jar

2025-08-14T16:52:00.575149Z

then

2025-08-14T16:52:01.327049Z

?

Alex Miller (Clojure team) 2025-08-14T16:52:10.714769Z

yeah, I think this would be better as a separate project right now

Alex Miller (Clojure team) 2025-08-14T16:53:33.611389Z

there are some outstanding ticket ideas that would help more - one is being able to specify a dep + an alias (where you could add a :test alias for example). another is some way to reference a relative lib in the same git repo - kind of a mix of relative local and git. both of those are good ideas, but need some work

👍 1
2025-08-14T17:02:30.085929Z

ok. Then I'll build the jar with dev paths and copy to .m2 folder in the CI machine

2025-08-14T17:02:37.602779Z

and refer to it or something

2025-08-14T17:02:43.060189Z

thx