Skip to content

Gazelle target generation (breaking) changed in 1.6.0#3499

Description

@thejcannon

馃悶 bug report

Affected Rule

py_test/py_library (and Gazelle, not a rule)

Is this a regression?

I'd argue so 馃槗. #2998 introduced the new behavior (released in 1.6.0).

(more details in description)

Description

(Before I begin, please note I like #2998 as a change. I just don't like a seemingly breaking change without any warning or toggles or migration path).

I'm upgrading my work monorepo rules_python to the latest, version-by-version. 1.6.0 has apparently become a very hard stop on my journey, due to incompatible gazelle changes. At a high level this is because:

  • After upgrade, gazelle is happy to add new targets, while leaving the old targets alone
  • There's no way to emulate the old behavior. The closest is trying different # gazelle:python_generation_modes to see what gives me a small (enough) diff
  • There's no way to incrementally roll this out (e.g. the result is one mega-PR)
  • Whereas the old way made it so you could cleverly solve import cycles (across multiple subdirs) the new way makes that challenging
  • conftest inclusion is a bit broken

馃敩 Minimal Reproduction

(I'll try and work on a demo repo showing each of the bullet points above, bear with me)

馃敟 Exception or Error

(N/A)

馃實 Your Environment

(N/A)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gazelleGazelle plugin related issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions