Skip to content

fix: fix various build failures in the generator; update gax versions; update baselines#8237

Open
feywind wants to merge 7 commits intomainfrom
feywind-gh8018-fix-gen
Open

fix: fix various build failures in the generator; update gax versions; update baselines#8237
feywind wants to merge 7 commits intomainfrom
feywind-gh8018-fix-gen

Conversation

@feywind
Copy link
Copy Markdown
Contributor

@feywind feywind commented May 7, 2026

Split off from: #8130 (#8018)

This fixes several issues keeping us from moving forward with generator work:

  • ESM failures in the templater namer
  • Small performance improvement in baseline updater
  • Add an explicit pnpm lock refresh to bazel builds
  • Update versions of gax to be a real release, not an old RC

No tests are removed.

@feywind feywind requested a review from a team as a code owner May 7, 2026 21:35
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a custom Bazel repository rule to manage pnpm lockfiles, downgrades the google-gax dependency across multiple baselines and templates, and updates baseline API dumps with new proto field descriptions and deprecations. Additionally, it improves ESM support in the templater and refactors baseline update scripts to use parallel execution. Feedback identifies a significant anti-pattern in the new Bazel rule, which modifies the source tree during the loading phase, and points out inconsistencies between package.json and package-lock.json regarding dependency changes for prettier and @types/long.

Comment on lines +9 to +12
result = repository_ctx.execute(
["node", pnpm_cjs_path, "--dir", workspace_root, "install", "--lockfile-only"],
working_directory = workspace_root,
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Modifying the source tree from a repository rule is a significant anti-pattern in Bazel. Repository rules are executed during the loading phase and should be hermetic, only affecting their own external repository directory. Running pnpm install --lockfile-only on the workspace root (workspace_root) can lead to non-deterministic builds, potential infinite loops if Bazel detects the change and restarts the loading phase, and failures in environments where the source tree is read-only (e.g., many CI systems).

Consider moving this lockfile refresh to a separate maintenance script or a CI check instead of running it as part of the Bazel workspace loading process.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny, you wrote this code :P

Comment thread core/generator/gapic-generator-typescript/package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant