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

Break module extension groups after a use_repo #1339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Mar 5, 2025

This allows users to separate tags and associated use_repo statements into separate groups.

Also use unified diffs in the integration tests since ordinary diffs make it very hard to reason about whitespace.

Before:

go_deps = use_extension("//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
    go_deps,
    "com_github_bazelbuild_buildtools",
)
go_deps.module(name = "foo")
use_repo(go_deps, "foo")

After:

go_deps = use_extension("//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
    go_deps,
    "com_github_bazelbuild_buildtools",
)

go_deps.module(name = "foo")
use_repo(go_deps, "foo")

This allows users to separate tags and associated `use_repo` statements into separate groups.

Also use unified diffs in the integration tests since ordinary diffs make it very hard to reason about whitespace.

Before:
```
go_deps = use_extension("//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
    go_deps,
    "com_github_bazelbuild_buildtools",
)
go_deps.module(name = "foo")
use_repo(go_deps, "foo")
```

After:
```
go_deps = use_extension("//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
    go_deps,
    "com_github_bazelbuild_buildtools",
)

go_deps.module(name = "foo")
use_repo(go_deps, "foo")
```
@fmeum fmeum requested review from vladmos and pmbethe09 as code owners March 5, 2025 09:57
@fmeum
Copy link
Contributor Author

fmeum commented Mar 5, 2025

@Wyverald

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