Is it possible to turn off this check with some option? https://github.com/jonase/eastwood/blob/f6b278662e53dd738ca119822b888ff445890fa2/src/eastwood/error_messages.clj#L291
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.
great news! :) what sort of problematic extra-paths were being added?
The root β.β π
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
Why would you want to do so? If it's some sort of false positive, I'd rather have it fixed
I have a polylith code-structure and want to run eastwood in the root deps.edn
I use poly and eastwood at work, there's no issue with that
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)
Thank you, going to go back and see what I missed
> With zero config Related to that, if you have config that tries setting source-paths, I'd recommend removing it
yeah It is better to just use aliases with extra-paths I figured after your reply π
cheers βοΈ
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?
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
@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.
can you post your :eastwood alias? in deps.edn
{:main-opts ["-m"
"eastwood.lint"
;; Any Eastwood options can be passed here as edn:
]
:extra-deps {jonase/eastwood {:mvn/version "1.1.1"}}}
looks good. and how does your invocation look like?
clj -M:dev:eastwood
Does the error message include Detected a mismatch between filenames and namespaces while?
If so what does it say after while ?
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.Do you have a user.clj in the project? You could try temporarily deleting it
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