I am getting started with Bazel, and I am looking towards a Python monorepo. I would like to have, say, a subtree with "projects", that is something that can be deployed or run, and a subtree with libraries. In that libraries subtree I would like to have subject-related subtrees, for example:
my_workspace
+- libraries
| +- django
| | +- view # stuff related to views
| | +- model # stuff related to models
| +- database
| +- something_related_to_databases
+- projects
...
But reading the documentation, I can't quite figure out what the best way to do this is. Should I have separate workspaces for libraries
and projects
? Should I have just BUILD.bazel
files there? If so, what should be in those build files? Or should I have a build file in my root (my_workspace
) declaring each of my libraries and projects? Is this monorepo structure correct or wrong? Where can I find out more?
UPD: The thing that was not obvious to me was that you can have empty build files in your nested folders.