eastwood

dangercoder 2022-01-14T14:37:16.001300Z

Is it possible to turn off this check with some option? https://github.com/jonase/eastwood/blob/f6b278662e53dd738ca119822b888ff445890fa2/src/eastwood/error_messages.clj#L291

dangercoder 2022-01-21T08:29:28.006Z

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.

vemv 2022-01-21T08:31:37.006200Z

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

dangercoder 2022-01-21T08:32:34.006400Z

The root β€œ.” πŸ˜„

vemv 2022-01-21T08:35:16.006600Z

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
vemv 2022-01-14T14:40:03.001500Z

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

dangercoder 2022-01-14T14:40:51.001700Z

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

vemv 2022-01-14T14:41:38.001900Z

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

vemv 2022-01-14T14:43:21.002100Z

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)

dangercoder 2022-01-14T14:44:17.002300Z

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

πŸ™‚ 1
vemv 2022-01-14T14:44:41.002600Z

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

1
dangercoder 2022-01-14T14:45:34.002800Z

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

vemv 2022-01-14T14:49:03.003100Z

cheers ✌️

dangercoder 2022-01-14T14:50:37.003300Z

A question regarded your component definitions. @vemv 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?

vemv 2022-01-14T14:54:52.003500Z

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
dangercoder 2022-01-19T13:13:47.003900Z

@vemv 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.

vemv 2022-01-19T13:19:11.004300Z

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

dangercoder 2022-01-19T13:22:58.004500Z

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

vemv 2022-01-19T13:24:20.004700Z

looks good. and how does your invocation look like?

dangercoder 2022-01-19T13:29:08.004900Z

clj -M:dev:eastwood

vemv 2022-01-19T13:32:22.005100Z

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

dangercoder 2022-01-19T13:36:17.005300Z

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.

vemv 2022-01-19T13:41:18.005600Z

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

vemv 2022-01-19T13:47:18.005800Z

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