This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-27
Channels
- # announcements (9)
- # aws (1)
- # aws-lambda (12)
- # babashka (18)
- # beginners (37)
- # calva (27)
- # clerk (15)
- # clojure (16)
- # clojure-conj (13)
- # clojure-europe (44)
- # clojure-germany (3)
- # clojure-norway (27)
- # clojure-uk (1)
- # cursive (6)
- # data-science (24)
- # datahike (7)
- # datomic (40)
- # fulcro (5)
- # hoplon (33)
- # hyperfiddle (9)
- # introduce-yourself (6)
- # jobs (1)
- # lsp (22)
- # nbb (2)
- # off-topic (15)
- # pathom (37)
- # pedestal (3)
- # polylith (7)
- # portal (1)
- # re-frame (7)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (6)
- # sci (1)
- # scittle (1)
- # xtdb (7)
What is the correct structure for resource*
directories regarding poly check
?
Ive got a base with resources/
, dev-resources/
, and test-resources/
. For some reason, poly check
only gives me Warning 205: Non. top namespace ...
for files in the top level of test-resources/
, not any of the other directories.
I was able to fix it by having the files live in test-resouces/my/ns/
, but I would prefer to have everything at the top level without the extra folder nesting
Resources are put into the same place when a classpath is created. This is not related to Polylith; it is the default behavior of Clojure/Java. Because of this, we recommend to place resources under each brick’s resources directory with a top directory named same as the component’s name. So it could look like:
my-ws
├── components
| ├── foo
| | ├─ resources
| | | └─ foo
| | | ├─ some-file
| | | └─ some-other-file
| | ├─ src
| | └─ test
| ├── bar
| | ├─ resources
| | | └─ bar
| | | ├─ some-file
| | | └─ some-other-file
| | ├─ src
| | └─ test
So, that folder structure works with all the resource folders except specifically test-resources
for some reason -- to go by that example, bases/foo/test-resources/foo/example.txt
gives me the 205, while bases/foo/dev-resources/foo/example.txt
is fine.
Both folders are specified in :extra-paths
for the :dev
and :test
aliases in the base and root deps.edn
files as well.
I'm going to try to start a fresh polylith workspace to see if I can recreate it, otherwise I'll assume its something misconfigured in this workspace
It only recognise resources
to be a resources directory, all other directories are treated as source directories and validation 205 are checked for these. I think it's a good idea to also treat test-resources
as a resource directory, so I created an https://github.com/polyfy/polylith/issues/305 for it.