Fork me on GitHub
#polylith
<
2022-05-03
>
Eugen11:05:16

this is probably a bug with poly tool but I would like to confirm before I create an issue. I can't reproduce it yet. Running poly inside a workspace that I just added a monolith as a base gives this error.

tengstrand11:05:18

The poly tool expects a certain format in how the ns section at the top is structured in each namespace. Could it be related to https://github.com/polyfy/polylith/issues/211 issue? Maybe you can narrow down to see exactly which namespace in the base it has problems with?

Eugen11:05:38

no, I ran a git grep and did not find any :as-alias there. We also migrated to clojure 1.11 2-3 weeks ago so I don't think we have that

Eugen11:05:36

also, it would be nice to improve logging

tengstrand11:05:33

I think there could be two problems here. One problem is that the poly tool doesn鈥檛 accept one of your namespaces, even though it seems to compile and work properly for you. The other problem is that it should return a user friendly error message instead of throwing an exception! If you can find the exact problem you have, then please create an issue, and you could suggest an improved error handling in it as well.

Eugen11:05:50

yes, that is true. ok, I will check the namespaces and try to figure out the cause of this.

馃憤 1
Eugen12:05:56

btw, are the rules regarding namespaces documented ? = the requirements for using polylith. I checked the FAQ and did not find much

tengstrand12:05:43

No, not really. I think the doc mention the expected syntax in the examples, but I agree this could be gathered in one place in the doc + be clarified.

Eugen12:05:08

that would be great since now I'm not sure what I am looking for

tengstrand12:05:04

One idea is to comment out some namespaces in your base, and see if the error disappears, and then narrow it down, till you know which namespace that is the cause of the problem.

Eugen12:05:43

I'll see how I can do that since there are a lot of namespaces (codebase is quite old)

Eugen12:05:49

thanks

馃憤 1
Eugen12:05:17

I just realized something that is important and might be the issue. the project uses cljc files and also has cljs sources in src-cljs .

tengstrand12:05:59

The tool only reads files ending with .clj and .cljc.

tengstrand11:05:14

Feel free to have a look at this and create a PR, otherwise I will try to find time in the weekend to fix this.

Norman Kabir16:05:58

I'd like to work on issues #206/#217 However, I'm not yet familiar with the codebase. Are the changes restricted to this file? https://github.com/polyfy/polylith/blob/master/components/workspace-clj/src/polylith/clj/core/workspace_clj/projects_from_disk.clj#L152 Or should I search the codebase for references to particular functions? Any guidance is appreciated!

imre16:05:58

I'll try to gather a bit of context later today and add it to #206

馃憤 1
Norman Kabir09:05:28

Thank you, @U08BJGV6E I will investigate.

imre11:05:12

Thanks for volunteering 馃檪

Norman Kabir19:05:57

An admittedly hacky attempt (I'm new to Polylith) but am having trouble discovering tests under test/clj when running in poly shell test :dev https://github.com/polyfy/polylith/issues/206#issuecomment-1117969301

futuro17:05:31

In the polylith tool repo, some of the components' deps.edn files specify dependencies in the :deps map (like https://github.com/polyfy/polylith/blob/master/components/ws-explorer/deps.edn#L2), and some don't. I'd thought the components don't need to declare dependencies because these are specified by the projects, but that doesn't seem to be right; can anyone shed light on when a component needs/doesn't need a dependency declared in its deps.edn file?

Hukka17:05:45

External libraries are declared by the bricks that need them. Inter-repo dependencies are not, since the idea is that the bricks depend on namespaces, and multiple different components can provide the same namespace and functionality with different implementations

futuro17:05:42

Huh...alright, thank you 馃檪