Fork me on GitHub
#eastwood
<
2022-01-14
>
vemv14:01:03

Why would you want to do so? If it's some sort of false positive, I'd rather have it fixed

dangercoder14:01:51

I have a polylith code-structure and want to run eastwood in the root deps.edn

vemv14:01:38

I use poly and eastwood at work, there's no issue with that

vemv14:01:21

With zero config it should pick up the source-paths / test-paths correctly, out of the :paths that the Clojure CLI computes. (Make sure to use a recent-enough version of Eastwood)

dangercoder14:01:17

Thank you, going to go back and see what I missed

πŸ™‚ 1
vemv14:01:41

> With zero config Related to that, if you have config that tries setting source-paths, I'd recommend removing it

bananadance 1
dangercoder14:01:34

yeah It is better to just use aliases with extra-paths I figured after your reply πŸ™‚

vemv14:01:03

cheers ✌️

dangercoder14:01:37

A question regarded your component definitions. @U45T93RA6 out of curiousity Do you have components like this: components/netty-http-client/src/org/http-client/interface.clj components/jetty-http-client/src/org/http-client/interface.clj so that you can swap out implementations via the project deps.edn?

vemv14:01:52

We follow the poly patterns quite strictly with that "build-time impl swapping" in mind However I think haven't gotten to give use - no scenario that needed it has popped up

πŸ‘ 1
dangercoder13:01:47

@U45T93RA6 a bit more context that might help you answer if it’s me or eastwood. im running eastwood in the top-level deps.edn in polylith.

vemv13:01:11

can you post your :eastwood alias? in deps.edn

dangercoder13:01:58

{:main-opts  ["-m"
                        "eastwood.lint"
                        ;; Any Eastwood options can be passed here as edn:
                        ]
           :extra-deps {jonase/eastwood {:mvn/version "1.1.1"}}}

vemv13:01:20

looks good. and how does your invocation look like?

dangercoder13:01:08

clj -M:dev:eastwood

vemv13:01:22

Does the error message include Detected a mismatch between filenames and namespaces while? If so what does it say after while ?

dangercoder13:01:17

It does not include this error. It includes errors like the one above and:

No other linting checks will be performed until these problems have
been corrected.


The 'should have namespace' and 'should be in file' messages above are
merely suggestions. It may be better in your case to rename both the file and namespace to avoid name collisions.

vemv13:01:18

Do you have a user.clj in the project? You could try temporarily deleting it

vemv13:01:18

Another line is: maybe you have tools.namespace as part of the project, but it's badly set up. clojure.tools.namespace.repl/refresh-dirs should evaluate to all your src and test paths

dangercoder08:01:28

An alias which was being used had an extra-paths definition which caused this issue. This was pinpointed quite quickly after trying to run eastwood on another polylith repository.

vemv08:01:37

great news! :) what sort of problematic extra-paths were being added?

dangercoder08:01:34

The root β€œ.” πŸ˜„

vemv08:01:16

Yes I was afraid of that! I'll try to detect when both . and e.g. src are classpath entries, having both is contradictory becase src belongs to . . Will be a nice improvement, generally I'd consider that an extreme edge case but either way it's good to fail more cleanly

πŸ‘ 1