Skip to content

[core][wip] Trying bzlmod - #51834

Draft
dayshah wants to merge 1 commit into
ray-project:masterfrom
dayshah:bzlmod
Draft

dayshah wants to merge 1 commit into
ray-project:masterfrom
dayshah:bzlmod

Conversation

@dayshah

@dayshah dayshah commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Related issue number

Checks

Signed-off-by: dayshah <[email protected]>
@stale

stale Bot commented May 7, 2025

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

  • If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@stale stale Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label May 7, 2025
@dayshah dayshah removed the stale The issue is stale. It will be closed within 7 days unless there are further conversation label May 8, 2025
@github-actions

github-actions Bot commented Jun 7, 2025

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jun 7, 2025
@dayshah dayshah removed the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jun 7, 2025
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jun 23, 2025
@dayshah dayshah removed the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jun 23, 2025
@github-actions

github-actions Bot commented Jul 7, 2025

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jul 7, 2025
@dayshah dayshah removed the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jul 7, 2025
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jul 22, 2025
@dayshah dayshah added unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. and removed stale The issue is stale. It will be closed within 7 days unless there are further conversation labels Jul 22, 2025
elliot-barn added a commit that referenced this pull request Oct 20, 2026
## Why

Ray resolves external dependencies through `WORKSPACE`. Bazel 7 defaults
to that already, so this
line is a no-op today.

Bazel 8 flipped `--enable_workspace` to false. With both it and
`--enable_bzlmod` off — and
`.bazelrc` line 1 is `common --noenable_bzlmod` — Bazel 8 refuses to
fetch any external dependency
at all:

```
ERROR: Error computing the main repository mapping: error loading package 'external':
Both --enable_bzlmod and --enable_workspace are disabled, but one of them must be
enabled to fetch external dependencies.
```

That fires before anything else in the workspace is evaluated, so it is
the first thing a newer
Bazel hits. Stating the switch keeps the tree evaluable on Bazel 8
without changing Bazel 7
behaviour.

## Not a duplicate

`gh pr list --state open --search` over `enable_workspace`, `bazelrc`
and `bzlmod` returns no open PR
touching these switches. #51834 is an 18-month-stale WIP draft moving
Ray *to* bzlmod, which is the
opposite direction.

## Tests run

| Command | Result |
|---|---|
| `bazel build --nobuild //:ray_pkg_zip //:ray_py_proto_zip` (7.5.0) | 2
targets analyzed, build completed successfully |
| `bazel query //:ray_pkg --enable_workspace` (7.5.0) | exit 0 — Bazel 7
accepts the flag |
| `pre-commit run --files .bazelrc` | passed |

The C++ template sanity check is unaffected: `cpp/example/run.sh`
invokes bazel with
`--nosystem_rc --nohome_rc` from the generated project's own workspace
root, so Ray's root `.bazelrc`
is never in scope there.

AI assistance was used for the analysis and for drafting this change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants