Skip to content

chore(pip_parse, gazelle): generate/use hub repo aliases by default#1525

Merged
aignas merged 6 commits intobazel-contrib:mainfrom
aignas:chore/flip-generate-aliases
Nov 1, 2023
Merged

chore(pip_parse, gazelle): generate/use hub repo aliases by default#1525
aignas merged 6 commits intobazel-contrib:mainfrom
aignas:chore/flip-generate-aliases

Conversation

@aignas
Copy link
Copy Markdown
Collaborator

@aignas aignas commented Oct 31, 2023

This makes pip_parse.incompatible_generate_aliases = True the default. This only affects
workspace builds; it is already the default for bzlmod.

Summary:

  • Enable the generation of aliases in pip_repository.
  • Flip usage of aliases in gazelle.
  • Remove usage of the old flags from the example code.
  • Update the gazelle manifest generator to leave the
    gazelle_python.yaml manifest unchanged for people who have
    use_pip_repository_aliases = True in their BUILD.bazel files.
    Once they remove the flag, the gazelle_python.yaml will be updated.
  • Update multi_pip_parse to handle sub-hub repositories where
    the all_requirements returns aliased targets.

Fixes #1498

@aignas aignas force-pushed the chore/flip-generate-aliases branch from 506615a to 81214dc Compare October 31, 2023 04:17
@aignas aignas changed the title chore(pip_parse, gazelle): generate incompatible aliases by default chore(pip_parse, gazelle): generate hub repo aliases by default Oct 31, 2023
@aignas aignas changed the title chore(pip_parse, gazelle): generate hub repo aliases by default chore(pip_parse, gazelle): generate/use hub repo aliases by default Oct 31, 2023
@aignas aignas force-pushed the chore/flip-generate-aliases branch from 81214dc to 2e8780e Compare October 31, 2023 14:37
@rickeylev rickeylev changed the title chore(pip_parse, gazelle): generate/use hub repo aliases by default chore(pip_parse, gazelle)!: generate/use hub repo aliases by default Oct 31, 2023
@rickeylev rickeylev changed the title chore(pip_parse, gazelle)!: generate/use hub repo aliases by default chore(pip_parse, gazelle): generate/use hub repo aliases by default Oct 31, 2023
@rickeylev
Copy link
Copy Markdown
Collaborator

What's the incompatible part again? I can't remember what the potential incompatibility is. The existing @pip_foo targets will still exist and can still be directly referenced, right? The only edge case I can think of is maybe pip_parse.annotations? e.g. changes to the BUILD file would be reflected in the @pip_foo repo, but not @pip//foo.

Let's just make sure to note this in the changelog/docs.

Otherwise lgtm.

Summary:
- Flip the generation of aliases in `pip_repository`.
- Flip usage of aliases in `gazelle`.
- Remove usage of the old flags from the example code.
- Update the `gazelle` manifest generator to leave the
  `gazelle_python.yaml` manifest unchanged for people who have
  `use_pip_repository_aliases = True` in their `BUILD.bazel` files.
  Once they remove the flag, the `gazelle_python.yaml` will be updated.
@aignas
Copy link
Copy Markdown
Collaborator Author

aignas commented Nov 1, 2023

I think for non-bzlmod it is a backwards incompatible change, however, in the early days it was an incompatible change for bzlmod users and the name just stuck.

@aignas aignas force-pushed the chore/flip-generate-aliases branch from a6b5ce0 to 3916156 Compare November 1, 2023 00:01
@aignas aignas enabled auto-merge November 1, 2023 00:02
@aignas aignas added this pull request to the merge queue Nov 1, 2023
Merged via the queue into bazel-contrib:main with commit 9b73d02 Nov 1, 2023
@aignas aignas deleted the chore/flip-generate-aliases 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.

Flip feature flags for 0.27.0

2 participants