Context
Upstream merged dataform-co/dataform#2187 — "Migrate to bazel 7.3.2" (merged 2026-06-16, labeled Internal Cleanup). It's a build-infrastructure migration with no user-facing change.
What it does upstream:
- Bumps
.bazelversion 5.4.0 → 7.3.2
- Introduces bzlmod (
MODULE.bazel + MODULE.bazel.lock) for deps that support it (bazel_skylib 1.7.1, protobuf 27.3, rules_go 0.49.0, gazelle 0.37.0, custom gcloud SDK module extension)
- Keeps
WORKSPACE only for the deprecated build_bazel_rules_nodejs rules
- Reworks webpack configs, the
ts_library / ts_proto_library macros, proto BUILD (strip_import_prefix, module_name/module_root), and credential/runfiles path resolution to handle bzlmod's workspace rename
Current sqlanvil state
.bazelversion = 5.4.0
WORKSPACE-only, no MODULE.bazel
- Workspace named
sa (upstream's is df)
- Builds run via
scripts/docker-bazel (native macOS bazel currently broken: wrapped_clang/dyld LC_UUID error)
Plan: do this as part of the next upstream sync, not standalone
Rationale:
- No user benefit — internal cleanup; current build works.
- Invasive + sqlanvil-specific risk — the upstream PR hardcodes the
df / _main workspace names throughout (webpack entry/alias, ts_library module_name, ts_proto_library amd_name/workspace_name fallback, runfiles credential path, proto module_name = "df/protos/ts"). Our workspace is sa, so it can't be applied verbatim — every one of those paths needs adapting to sa (or to the bzlmod _main).
- The diff arrives at sync time anyway —
main is published and we take upstream via merge, not rebase, so these 15 files land in the next sync diff. Reconciling them during that merge is strictly less work than doing it now and re-reconciling later.
Things to verify when we do it
Files touched upstream (15)
.bazelrc, .bazelversion, .github/workflows/test.yaml, MODULE.bazel (new), MODULE.bazel.lock (new), WORKSPACE, cli/index_test_base.ts, cloudbuild-publish.yaml, cloudbuild-test.yaml, packages/@dataform/core/webpack.config.js, packages/sample-extension/webpack.config.js, protos/BUILD, tools/gcloud/extensions.bzl (new), tools/ts_library.bzl, tools/ts_proto_library.bzl
References
Context
Upstream merged dataform-co/dataform#2187 — "Migrate to bazel 7.3.2" (merged 2026-06-16, labeled Internal Cleanup). It's a build-infrastructure migration with no user-facing change.
What it does upstream:
.bazelversion5.4.0 → 7.3.2MODULE.bazel+MODULE.bazel.lock) for deps that support it (bazel_skylib 1.7.1, protobuf 27.3, rules_go 0.49.0, gazelle 0.37.0, custom gcloud SDK module extension)WORKSPACEonly for the deprecatedbuild_bazel_rules_nodejsrulests_library/ts_proto_librarymacros, protoBUILD(strip_import_prefix,module_name/module_root), and credential/runfiles path resolution to handle bzlmod's workspace renameCurrent sqlanvil state
.bazelversion= 5.4.0WORKSPACE-only, noMODULE.bazelsa(upstream's isdf)scripts/docker-bazel(native macOS bazel currently broken:wrapped_clang/dyldLC_UUIDerror)Plan: do this as part of the next upstream sync, not standalone
Rationale:
df/_mainworkspace names throughout (webpack entry/alias,ts_librarymodule_name,ts_proto_libraryamd_name/workspace_namefallback, runfiles credential path, protomodule_name = "df/protos/ts"). Our workspace issa, so it can't be applied verbatim — every one of those paths needs adapting tosa(or to the bzlmod_main).mainis published and we take upstream via merge, not rebase, so these 15 files land in the next sync diff. Reconciling them during that merge is strictly less work than doing it now and re-reconciling later.Things to verify when we do it
wrapped_clang/dyld breakage. If it does, we can drop thedocker-bazelworkaround — this is the one outcome that would justify doing it early. Verify, don't assume.df/_mainworkspace-name references tosa.:package_tarpublish targets still produce a correctly-versioned tarball after the migration.WORKSPACEentirely, so bzlmod is eventually mandatory if we keep pulling upstream — this is a "when," not "if."Files touched upstream (15)
.bazelrc,.bazelversion,.github/workflows/test.yaml,MODULE.bazel(new),MODULE.bazel.lock(new),WORKSPACE,cli/index_test_base.ts,cloudbuild-publish.yaml,cloudbuild-test.yaml,packages/@dataform/core/webpack.config.js,packages/sample-extension/webpack.config.js,protos/BUILD,tools/gcloud/extensions.bzl(new),tools/ts_library.bzl,tools/ts_proto_library.bzlReferences