Bazel 8 consumers require legacy compatibility flags and deprecated options

Aperta
#139 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
android, kotlin

Direzione di ricerca

Inizia con gli override di compatibilità di Bazelrc, il percorso di bootstrap del consumer Bzlmod e il fixture CI del consumer esterno proposto. Esegui Bazel 8.3.1 con le configurazioni macOS e Linux web, test e Android elencate. Il lavoro è completato quando è documentata una matrice Bazel/JDK/Android supportata con i flag di compatibilità e il lavoro sulle dipendenze patchate è stato rimosso o mantenuto esplicitamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

A Bzlmod consumer using Bazel 8.3.1 currently needs several legacy compatibility overrides and locally patched dependency metadata to build Valdi across web/test/Android configurations. Some flags suppress hard Bazel 8 incompatibilities; others produce deprecation warnings and are likely to become hard failures in a future Bazel release.

This is an anonymized consumer report intended as an umbrella/checklist for declaring and testing a supported Bazel 8 configuration.

Environment

  • Bazel 8.3.1
  • macOS arm64 consumer; Android and web/test targets exercised
  • Valdi through Bzlmod
  • Hermetic Android SDK and NDK
  • Patched rules_kotlin 1.9.0 dependency stack

Compatibility overrides currently required

# Host-specific hermetic NDK globs can be empty on macOS.
common --noincompatible_disallow_empty_glob

# The patched rules_kotlin 1.9.0 graph still uses legacy APIs/providers.
common --incompatible_disallow_struct_provider_syntax=false
common --noincompatible_disallow_ctx_resolve_tools

# Android/rules_kotlin migration compatibility.
common --experimental_google_legacy_api=true
common --experimental_enable_android_migration_apis=true
common --incompatible_java_common_parameters=false

The consumer also still receives/uses deprecated configuration such as:

build --android_crosstool_top=@androidndk//:toolchain
build --experimental_generate_json_trace_profile

Bazel reports that android_crosstool_top is deprecated in favor of Android platforms and that experimental_generate_json_trace_profile has been replaced by generate_json_trace_profile.

The consumer's local registry additionally carries compatibility patches around the rules_kotlin module extension and hermetic Android SDK integration. Without the corresponding switches/patches, analysis fails before application code is reached.

Expected result

Valdi should either:

  • build from a documented Bzlmod consumer template on a named Bazel 8 release without legacy incompatible switches, or
  • explicitly publish the supported Bazel range and a maintained compatibility configuration while migration is in progress.

Proposed cleanup checklist

  • Add a minimal external-consumer CI fixture, not only in-repository targets.
  • Exercise Bazel 8 on macOS and Linux for a Valdi test, exported web package, and Android application analysis/build.
  • Replace or update patched rules_kotlin APIs so struct-provider and ctx.resolve_tools compatibility switches can be removed.
  • Make host-dependent NDK file selection explicit (select, repository generation, or intentional allow_empty) instead of globally permitting empty globs.
  • Complete the Android-platform/toolchain migration and remove android_crosstool_top.
  • Rename the trace-profile option to its supported non-experimental spelling.
  • Remove each compatibility flag individually in CI so regressions cannot silently add it back.
  • Document the supported Bazel/JDK/Android toolchain matrix for external Bzlmod consumers.

An umbrella issue seems useful because the switches interact in the same consumer bootstrap path, but individual checklist items can be split if that is easier to land.

Lingua principale
C++
Stelle
16.4k
Fork
539
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Snapchat/Valdi

Tutte le issue di Snapchat/Valdi

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.