-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
First of all, thank you for the great library! It really simplifies my workflows when building multiple libs from the same monorepo!
Description
When using nested component structures in a Polylith project, the poly check command fails to locate components even though the build process works correctly.
Project Structure
project/
├── components/
│ └── namespace/
│ └── aws/
│ ├── s3/
│ └── glue/
└── bases/
└── namespace/
└── cli/
Configuration
pyproject.toml:
[tool.polylith.bricks]
"../../bases/namespace/cli" = "namespace/cli"
"../../components/namespace/aws/s3" = "namespace/aws/s3"Then I've got
from namespace.aws.s3 import my_s3_func
...
my_3_func()Everything builds and works as expected, except poly check command, which throws
🤔 Cannot locate aws in cli
I believe the root cause of the behaviour is here:

The code checks for p.name which is s3 and p.parent.name is not a namespace, but a namespace/aws. Thus, the missing brick.
I'm not sure whether described behavior is expected, but it's really handy to organise things this way, so that you can include only a specific brick you're using, not the entire folder.
My expectation was it should work with poly check as well, since it works perfectly during the build and the resulting .whl executes with no issues at all.