[core] Move to bzlmod for handling dependencies #51228
Labels
core
Issues that should be addressed in Ray Core
enhancement
Request for new feature and/or capability
P1.5
Issues that will be fixed in a couple releases. It will be bumped once all P1s are cleared
Description
Currently Ray uses the outdated WORKSPACE / http_archive way to get dependencies and build them. For example, see https://github.com/ray-project/ray/blob/master/bazel/ray_deps_setup.bzl used in https://github.com/ray-project/ray/blob/master/WORKSPACE. We shouldn't define dependency builds like this, ex. for nlohmann_json we have https://github.com/ray-project/ray/blob/master/bazel/nlohmann_json.BUILD and
ray/bazel/ray_deps_setup.bzl
Lines 345 to 351 in f0a408a
Instead we should use migrate to bzlmod and use the bazel central registry as almost all of our dependencies can be found there. Ex. https://registry.bazel.build/modules/nlohmann_json. This will make dependency builds more consistent and make upgrades way less painful.
This is the guide to do the migration to bzlmod https://bazel.build/external/migration, ideally we should go with the gradual migration route and do each dependency one by one.
Use case
No response
The text was updated successfully, but these errors were encountered: