Question on bazel project structure

Hi I have a question on ray project structure, it looks to me most of the source code are packaged under root folder (ray/BUILD.bazel at master · ray-project/ray · GitHub).

Checking bazel’s best practice (Best Practices  |  Bazel), it suggests BUILD file should be used to group “packages”, which provides a bunch of benefits compared with current structure:

  • It provides visibility against user mis-using internal source code
  • It provides smaller library and binary (i.e. test) and quicker build/test time

Not sure what the question is.

For what it is worth:

$ find . -name 'BUILD'
./rllib_contrib/apex_dqn/BUILD
./rllib_contrib/slate_q/BUILD
./rllib_contrib/apex_ddpg/BUILD
./rllib_contrib/mbmpo/BUILD
./rllib_contrib/r2d2/BUILD
./rllib_contrib/td3/BUILD
./rllib_contrib/maml/BUILD
./rllib_contrib/alpha_zero/BUILD
./rllib_contrib/bandit/BUILD
./rllib_contrib/a2c/BUILD
./rllib_contrib/ars/BUILD
./rllib_contrib/ddppo/BUILD
./rllib_contrib/maddpg/BUILD
./rllib_contrib/qmix/BUILD
./rllib_contrib/pg/BUILD
./rllib_contrib/a3c/BUILD
./rllib_contrib/ddpg/BUILD
./rllib_contrib/es/BUILD
./rllib_contrib/leela_chess_zero/BUILD
./rllib_contrib/dt/BUILD
./rllib_contrib/simple_q/BUILD
./rllib_contrib/crr/BUILD
./rllib_contrib/alpha_star/BUILD
./src/ray/protobuf/BUILD
./src/ray/util/BUILD
./src/ray/util/tests/BUILD
./src/ray/common/test/BUILD
./src/ray/common/BUILD
./python/ray/data/BUILD
./python/ray/workflow/BUILD
./python/ray/runtime_env/BUILD
./python/ray/autoscaler/gcp/BUILD
./python/ray/autoscaler/aws/BUILD
./python/ray/autoscaler/v2/BUILD
./python/ray/autoscaler/azure/BUILD
./python/ray/autoscaler/BUILD
./python/ray/autoscaler/local/BUILD
./python/ray/scripts/BUILD
./python/ray/dag/BUILD
./python/ray/air/BUILD
./python/ray/tune/BUILD
./python/ray/train/BUILD
./python/ray/_private/BUILD
./python/ray/tests/horovod/BUILD
./python/ray/tests/BUILD
./python/ray/tests/modin/BUILD
./python/ray/tests/ludwig/BUILD
./python/ray/experimental/packaging/example_pkg/BUILD
./python/ray/experimental/BUILD
./python/ray/util/dask/BUILD
./python/ray/util/BUILD
./python/ray/dashboard/BUILD
./python/ray/serve/BUILD
./python/ray/serve/tests/unit/BUILD
./python/ray/serve/tests/BUILD
./thirdparty/patches/BUILD
./bazel/BUILD
./doc/BUILD
./doc/source/data/examples/BUILD
./doc/source/tune/examples/BUILD
./doc/source/tune/tutorials/BUILD
./doc/source/train/examples/transformers/BUILD
./doc/source/train/examples/xgboost/BUILD
./doc/source/train/examples/pytorch/BUILD
./doc/source/train/examples/lightgbm/BUILD
./doc/source/train/examples/lightning/BUILD
./doc/source/ray-core/examples/BUILD
./doc/source/serve/tutorials/BUILD
./rllib/BUILD
$ find . -name 'BUILD.bazel'
./java/BUILD.bazel
./src/ray/rpc/test/grpc_bench/BUILD.bazel
./ci/lint/generate_compile_commands/BUILD.bazel
./ci/lint/BUILD.bazel
./ci/ray_ci/automation/BUILD.bazel
./ci/ray_ci/pipeline/BUILD.bazel
./ci/ray_ci/BUILD.bazel
./ci/ray_ci/doc/BUILD.bazel
./ci/ray_ci/bisect/BUILD.bazel
./cpp/BUILD.bazel
./cpp/example/BUILD.bazel
./release/BUILD.bazel
./BUILD.bazel