Skip to content

refactor(visibility)!: limit visibility of an internal library#1490

Merged
chrislovecnm merged 1 commit intobazel-contrib:mainfrom
aignas:refactor/limit-pip-repository-bzl-visibility
Oct 15, 2023
Merged

refactor(visibility)!: limit visibility of an internal library#1490
chrislovecnm merged 1 commit intobazel-contrib:mainfrom
aignas:refactor/limit-pip-repository-bzl-visibility

Conversation

@aignas
Copy link
Copy Markdown
Collaborator

@aignas aignas commented Oct 13, 2023

This was arguably made too-visible previously and since all of the consumable
symbols by the end users are re-exported via the //python:pip_bzl, we can keep
everything that is in pip_install internal.

This could be a breaking change for people who are depending on internal
symbols or if they are using whl_library to create their own implementation
of the pip_repository rule and are generating documentation internally.
However, in that case they can apply a small patch to change the visibility of
the pip_repository_bzl target.

This was arguably made too-visible previously and since all of the
consumable symbols by the end users are re-exported via the
//python:pip_bzl, we can keep everything that is in pip_install
internal.
@aignas aignas requested a review from rickeylev as a code owner October 13, 2023 14:24
@aignas
Copy link
Copy Markdown
Collaborator Author

aignas commented Oct 13, 2023

I have created this to start a discussion around visibility. I am OK to close
this without merging if others think that restricting the visibility does not
bring enough value.

@rickeylev rickeylev changed the title refactor!(bzl_library): limit visibility of an internal library refactor(docs)!: limit visibility of an internal library Oct 13, 2023
@rickeylev rickeylev changed the title refactor(docs)!: limit visibility of an internal library refactor(visibility)!: limit visibility of an internal library Oct 13, 2023
@rickeylev
Copy link
Copy Markdown
Collaborator

Yeah, we want to make //docs private, see #1458

I made //python/pip_install:pip_repository_bzl public because, ... hm why did I do that. I think I was just trying to provide some alternative to the prior public bzl_library targets in //docs that covered pip_repository.bzl. It's very unclear to me whether pip_repository.bzl is supposed to be a publicly loadable target or not, and some of the old targets in //docs were very broad. The top of the docs, for example, says package_annotation is public. So it wasn't entirely clear how to split and restrict things.

Copy link
Copy Markdown
Collaborator

@groodt groodt left a comment

Choose a reason for hiding this comment

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

LGTM

@aignas aignas added this pull request to the merge queue Oct 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2023
@chrislovecnm
Copy link
Copy Markdown
Contributor

@groodt when you do a lgtm could you push the merge button?

@chrislovecnm chrislovecnm added this pull request to the merge queue Oct 15, 2023
Merged via the queue into bazel-contrib:main with commit 0100a82 Oct 15, 2023
linzhp pushed a commit to linzhp/rules_python that referenced this pull request Oct 15, 2023
…-contrib#1490)

This was arguably made too-visible previously and since all of the
consumable
symbols by the end users are re-exported via the //python:pip_bzl, we
can keep
everything that is in pip_install internal.

This could be a breaking change for people who are depending on internal
symbols or if they are using `whl_library` to create their own
implementation
of the `pip_repository` rule and are generating documentation
internally.
However, in that case they can apply a small patch to change the
visibility of
the `pip_repository_bzl` target.
@aignas aignas deleted the refactor/limit-pip-repository-bzl-visibility branch May 13, 2024 06:48
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.

4 participants