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

Add bazel mod dump_repo_mapping #20686

Closed
wants to merge 1 commit into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Dec 28, 2023

bazel mod dump_repo_mapping with no arguments is explicitly made an
error so that a new mode that dumps all repository mappings with a
single Bazel invocation can be added later if needed, e.g. to support
IntelliJ's "sync" workflow.

RELNOTES: bazel mod dump_repo_mapping <canonical repo name>... returns
the repository mappings of the given repositories in NDJSON. This
information can be used by IDEs and Starlark language servers to resolve
labels with --enable_bzlmod.

Work towards #20631

@fmeum fmeum force-pushed the 20631-dump-repo-mappings branch 6 times, most recently from 4bd8108 to 1bc5bee Compare December 29, 2023 09:59
@fmeum fmeum changed the title Add bazel mod dump_repo_mapping and bash completion for external repos Add bazel mod dump_repo_mapping Dec 29, 2023
@fmeum fmeum force-pushed the 20631-dump-repo-mappings branch from 1bc5bee to 6cfd8e5 Compare December 29, 2023 10:03
@fmeum
Copy link
Collaborator Author

fmeum commented Dec 29, 2023

CC @cameron-martin

@fmeum fmeum marked this pull request as ready for review December 29, 2023 10:03
@github-actions github-actions bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Dec 29, 2023
@fmeum fmeum force-pushed the 20631-dump-repo-mappings branch from 6cfd8e5 to 3336ddf Compare January 2, 2024 13:26
@cameron-martin
Copy link
Contributor

Just tested integrating this into the Facebook starlark LSP and it seems to work as expected.

cameron-martin added a commit to cameron-martin/bazel-lsp that referenced this pull request Jan 18, 2024
This uses the `bazel mod dump_repo_mapping` command (bazelbuild/bazel#20686) to map repositories to their canonical form when doing go to definition and autocomplete.
@fmeum fmeum force-pushed the 20631-dump-repo-mappings branch from 3336ddf to 42714a4 Compare January 18, 2024 19:36
@fmeum fmeum requested a review from Wyverald January 18, 2024 19:37
`bazel mod dump_repo_mapping` with no arguments is explicitly made an
error so that a new mode that dumps all repository mappings with a
single Bazel invocation can be added later if needed, e.g. to support
IntelliJ's "sync" workflow.

RELNOTES: `bazel mod dump_repo_mapping <canonical repo name>...` returns
the repository mappings of the given repositories in NDJSON. This
information can be used by IDEs and Starlark language servers to resolve
labels with `--enable_bzlmod`.
@fmeum fmeum force-pushed the 20631-dump-repo-mappings branch from 42714a4 to c749bfb Compare January 18, 2024 20:05
@fmeum fmeum requested a review from Wyverald January 18, 2024 20:05
@Wyverald Wyverald removed the awaiting-review PR is awaiting review from an assigned reviewer label Jan 18, 2024
@Wyverald Wyverald added the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jan 18, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented Jan 22, 2024

@bazel-io fork 7.1.0

@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jan 25, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Jan 25, 2024
`bazel mod dump_repo_mapping` with no arguments is explicitly made an
error so that a new mode that dumps all repository mappings with a
single Bazel invocation can be added later if needed, e.g. to support
IntelliJ's "sync" workflow.

RELNOTES: `bazel mod dump_repo_mapping <canonical repo name>...` returns
the repository mappings of the given repositories in NDJSON. This
information can be used by IDEs and Starlark language servers to resolve
labels with `--enable_bzlmod`.

Work towards bazelbuild#20631

Closes bazelbuild#20686.

PiperOrigin-RevId: 601332180
Change-Id: I828d7c88637bea175e11eccc52c6202f6da4c32c
@fmeum fmeum deleted the 20631-dump-repo-mappings branch January 25, 2024 09:32
iancha1992 pushed a commit to bazel-io/bazel that referenced this pull request Jan 26, 2024
`bazel mod dump_repo_mapping` with no arguments is explicitly made an
error so that a new mode that dumps all repository mappings with a
single Bazel invocation can be added later if needed, e.g. to support
IntelliJ's "sync" workflow.

RELNOTES: `bazel mod dump_repo_mapping <canonical repo name>...` returns
the repository mappings of the given repositories in NDJSON. This
information can be used by IDEs and Starlark language servers to resolve
labels with `--enable_bzlmod`.

Work towards bazelbuild#20631

Closes bazelbuild#20686.

PiperOrigin-RevId: 601332180
Change-Id: I828d7c88637bea175e11eccc52c6202f6da4c32c
github-merge-queue bot pushed a commit that referenced this pull request Jan 26, 2024
`bazel mod dump_repo_mapping` with no arguments is explicitly made an
error so that a new mode that dumps all repository mappings with a
single Bazel invocation can be added later if needed, e.g. to support
IntelliJ's "sync" workflow.

RELNOTES: `bazel mod dump_repo_mapping <canonical repo name>...` returns
the repository mappings of the given repositories in NDJSON. This
information can be used by IDEs and Starlark language servers to resolve
labels with `--enable_bzlmod`.

Work towards #20631

Closes #20686.

Commit
59ac9ce

PiperOrigin-RevId: 601332180
Change-Id: I828d7c88637bea175e11eccc52c6202f6da4c32c

Co-authored-by: Fabian Meumertzheim <[email protected]>
cameron-martin added a commit to cameron-martin/bazel-lsp that referenced this pull request Feb 22, 2024
This uses the `bazel mod dump_repo_mapping` command
(bazelbuild/bazel#20686) to map repositories to
their canonical form when doing go to definition and autocomplete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants