tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
seancorfield 2021-02-18T00:03:20.341800Z

Interestingly, if I just comment out the dependency on org.apache.httpcomponents/httpcore "4.4.5" everything works and it still comes in as a transitive dependency of something else... Weird.

alexmiller 2021-02-18T00:13:10.342200Z

it would be useful to know the original set of deps that failed

alexmiller 2021-02-18T00:13:41.342600Z

that UnresolvableModelException implies to me that we're running into trouble reading that pom file somehow

seancorfield 2021-02-18T00:26:25.345100Z

org.apache/apache "13" seems to be problematic, but I don't know why that would be requested when the httpcore dep is a top-level dep but not when it is a transitive dep of something else. This was kind of a weird edge case and it's hard to isolate to a repro case because it relies on some context from our monorepo setup. If I get time, I'll try to boil it down to something small but I have a workaround for now so it's not terribly important.

seancorfield 2021-02-18T00:26:47.345600Z

(when I tried to boil it down to a simple repro case, I couldn't -- it just started working)

alexmiller 2021-02-18T01:58:48.346700Z

There is some filtering in the transitive dep stuff, itโ€™s possible itโ€™s getting filtered out

dominicm 2021-02-18T09:56:43.347900Z

If you're splitting on newline, won't that break for newlines instead of spaces? ๐Ÿ˜„ Are newlines encoded somehow then decoded before going to args?

alexmiller 2021-02-18T14:00:43.348400Z

well that didn't work before, and still doesn't work, but I think is a much less sensible thing to want to do

seancorfield 2021-02-18T17:35:55.350800Z

We're running into this warning at work:

WARNING: Specified path is external to project: ../activator/test
WARNING: Specified path is external to project: ../affiliate/test
WARNING: Specified path is external to project: ../api/test
WARNING: Specified path is external to project: ../auth/test
WARNING: Specified path is external to project: ../build/test
...
We have an "everything" subproject that we use for dev work (so we can have a single REPL with all source code and all test code available). Is there a recommended way around the warning @alexmiller?

alexmiller 2021-02-19T15:21:15.359Z

the recommended way is to not do that :)

alexmiller 2021-02-19T15:22:26.359200Z

this is a step towards eventually making this an error

alexmiller 2021-02-19T15:28:55.359400Z

but I will take a note to think about this particular case of accessing the test src of a project - I've had past convos where we talked about ways to include a dep + activate an alias in the remote project as you interpret it which could be one way to do this with local deps instead (local dep + include a test alias to grab its test paths). but needs a lot more thought.

seancorfield 2021-02-19T15:52:24.359600Z

Given that several of these pain points seem to relate to mono repos, I vote that you be made to work on a mono repo for a few months ๐Ÿ˜

alexmiller 2021-02-19T16:02:02.359800Z

or everyone else should stop working on mono repos... :)

alexmiller 2021-02-19T16:03:22.360Z

I have worked on them in the past. did not like, would not mono repo again.

seancorfield 2021-02-19T16:51:29.360200Z

So, if you were forced to work in a monorepo and you could set up deps.edn however you wanted, how do you think you might approach it? I'm hoping for some insight that gets us closer to a "standard" CLI/`deps.edn` approach that isn't going to get pulled out from under us...

seancorfield 2021-02-19T16:52:03.360400Z

Having a single deps.edn in the top-level perhaps? With an alias for each subproject that brings in just that subproject's paths/deps?

alexmiller 2021-02-19T17:00:55.360600Z

yes, I think at top level

seancorfield 2021-02-19T17:08:28.360800Z

OK, I might try switching us to that setup and see what pain points I run into. My immediate thought is that running a REPL in the "everything" context would then require a lot of aliases (one for each subproject -- about three dozen for us right now) or would require duplicating the content of aliases into the :everything alias.

seancorfield 2021-02-19T19:07:33.361Z

I don't think that will work with :local/root since each subproject would still need a deps.edn file for its own dependencies -- unless you duplicate everything up into the master deps file... and that's a lot of duplication...

seancorfield 2021-02-19T19:14:05.361200Z

I started down this path to see what it might look like but ran into the :local/root issue pretty much immediately. Happy to screen share with you at some point to try to hammer some of this out.

seancorfield 2021-02-18T17:38:12.353100Z

I guess we could move our "everything" subproject to effectively be the top-level folder above all those other subprojects, so all paths within them would be within the overall "project"? Not sure what other weirdness that would cause though since we rely on :local/root a lot and currently can guarantee that all subprojects can depend on each other by using `:local/root "../<subproject>" URLs...

borkdude 2021-02-18T17:40:35.353300Z

Yep, I saw this one too today

borkdude 2021-02-18T17:41:12.353700Z

"external to project, but within monorepo, so still okay?"

borkdude 2021-02-18T17:43:04.354700Z

My use case for this is to compensate for the fact that a generated pom.xml file does not include the source folders, so I'm adding add that manually using :paths

seancorfield 2021-02-18T17:43:41.355100Z

For us it's about adding test folders "manually" but, yeah.

seancorfield 2021-02-18T17:44:57.356500Z

I understand why the warning is given -- having :paths outside the project should be a red flag in general -- but I'm not sure what the recommended approach should be for dev/test in a large monorepo...

borkdude 2021-02-18T17:47:29.357200Z

Looking deeper into it, we now ported that lib to deps.edn as well, so we don't need the pom.xml anymore :) Just local/root works now (we did local/root pom + paths before)

borkdude 2021-02-18T19:12:36.357400Z

Cleaned that up, so problem solved for us