Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bzlmod mod commands don't support flags that affect repo generation #24070

Open
rickeylev opened this issue Oct 23, 2024 · 1 comment
Open

bzlmod mod commands don't support flags that affect repo generation #24070

rickeylev opened this issue Oct 23, 2024 · 1 comment
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request untriaged

Comments

@rickeylev
Copy link
Contributor

rickeylev commented Oct 23, 2024

Description of the feature request:

When --action_env is used to set environment variables to affect what repos are generated, bazel mod commands will fail.

Stated more specifically: in rules_python, in a bazel-in-bazel integration test, we pass --action_env=RULES_PYTHON_REPO_DEBUG=1. When this env var is set, it causes our bzlmod extension to generate an extra repo with debugging information in it. If not set, then the repo isn't generated. Unfortunately, the bazel mod command doesn't support --action_env. The net effect is use_repo() in the MODULE file references a repo that doesn't exist, and the mod command fails entirely.

Which category does this issue belong to?

No response

What underlying problem are you trying to solve with this feature?

To make it easy to have the same looking invocation between commands. Similarly, flags that could affect the module phase should also be supported by the mod command (similar to query vs cquery)

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

7.3.2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

A quick search of github didn't show anything

Any other information, logs, or outputs that you want to share?

No response

@fmeum
Copy link
Collaborator

fmeum commented Oct 23, 2024

(Not directly related, but using --repo_env for this is better as it doesn't leak into actions. It's probably still affected by this bug though.)

@sgowroji sgowroji added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. area-Bzlmod Bzlmod-specific PRs, issues, and feature requests labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request untriaged
Projects
None yet
Development

No branches or pull requests

5 participants