Skip to content

ocaml: toolchain hub from core pins_hub (part of #10065) - #13103

Merged
TrapsterDK merged 1 commit into
mainfrom
pins-hub-ocaml-haskell-10065
Nov 17, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
pins-hub-ocaml-haskell-10065

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Part of #10065.

  • core/toolchain.bzl pins_hub gains variants (one toolchain() per cell and variant, variant constraints appended on each side), companion_types (a second toolchain type per toolchain, pointing at <target>_<suffix>), and exec_aliases as a dict of alias to cell-repo label with alias_defaults.
  • OCaml cell repos are now dx_ocaml_toolchains__<cell>; the OCaml hub (std + profile toolchains per cell and emitter, cell aliases) is rendered by pins_hub. The hand-written _CELL/_OCAMLRUN/_ALIAS templates and DIST_PREFIX are gone.

Remaining for #10065:

  • Toolchain hubs of elixir (one dist shared across OTP cells) and haskell (qualified/musl cells) to the factory.
  • D cell repos still use ldc_repo; dx_pins.pin needs custom fetch support.
  • msix, appimage, cuda, cosign factory support.
  • Merge dx_source_archives into dx_pins.archive; teach dx update the archives shape.
  • Shared metadata test.

Tests (local): //core/tests:toolchain, //ocaml/tests:metadata, //ocaml/tests:zanuda_test, //ocaml/tests:collect_test pass; bazel query of @dx_ocaml_toolchains//:all lists the 12 toolchains and aliases. Consumer and nested-Bazel tests were not run locally. tools/dx check --affected stops at the generate step on known main failures in files this PR does not touch (deploy/private/release/tests release_consumer_smoke_test name clash, unnamed erlang_app in erlang/tests/conformance/lock).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 17, 2026
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Review: approve

No must-fix items.

Checked:

  • pins_hub produces the same OCaml hub as before. There are 12 toolchains: 3 cells × {sys, vm} × {std, profile}. Exec and target constraints match OCAML_CELLS[*].exec_compatible_with plus the emitter constraints. ocamlrun and the CELL_ALIASES aliases keep the same labels, and stdlib_cmis still falls back to :none.
  • The old dx_ocaml_<cell> repo names, DIST_PREFIX, and the old hub config_setting names (:<cell>, now :<cell>_exec) have no references left in the tree.
  • Using a list for exec_aliases still gives the same @<repo>//:<target> labels as before, so existing pins_hub callers are unaffected.
  • AGENTS.md: the new docstrings only describe behaviour. They contain no rationale and add no compat code.
  • CI analysis failures (//tools/docs/languages:languages_test, core/quality/testdata/zig_owned:dirty_bin_upstream) are in files this PR does not touch. The same failures show up on consumer-setup: Qt Windows platforms set msvc, Windows preset flags leave cpp_rust and root .bazelrc (part of #11151) #13099 and skeleton: rename eight hyphenated fixtures to underscores (part of #11174, #11158) #13095.

Non-blocking: the hub now creates a toolchain for every cell × every EMITTERS entry and ignores each cell's own emitters list. If a cell ever pins fewer emitters, the hub would point at a dist target that does not exist. Today every cell has ["sys", "vm"].

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

pins_hub gains variants (one toolchain() per cell and variant with extra
constraints), companion_types (a second toolchain type per toolchain) and
dict exec_aliases with alias_defaults. OCaml cell repos become
dx_ocaml_toolchains__<cell> and the OCaml hub is rendered by pins_hub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
@TrapsterDK
TrapsterDK force-pushed the pins-hub-ocaml-haskell-10065 branch from 0b22d8a to fe80aad Compare November 17, 2026 18:11
@TrapsterDK
TrapsterDK merged commit 6162855 into main Nov 17, 2026
1 check failed
@TrapsterDK
TrapsterDK deleted the pins-hub-ocaml-haskell-10065 branch November 17, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant