Skip to content

Commit

Permalink
Move get_git deprecation to start in 2.14.0.dev0 (pantsbuild#15423)
Browse files Browse the repository at this point in the history
Bump `get_git` deprecation to start in `2.14.0.dev0`, because it is challenging to consume a `@rule` via a `Get` in a backwards-compatible way. A `QueryRule` can be installed conditionally, but not a `Get` (since they will always be detected via `@rule`'s static analysis).

[ci skip-rust]
[ci skip-build-wheels]
  • Loading branch information
stuhood committed May 12, 2022
1 parent 742018a commit b3da025
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/python/pants/base/build_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ class _GitInitialized(Enum):
_Git: _GitInitialized | Git | None = _GitInitialized.NO


@deprecated("2.14.0.dev0", "Use QueryRule(MaybeGitWorktree, [GitWorktreeRequest]) instead.")
@deprecated(
start_version="2.14.0.dev0",
removal_version="2.15.0.dev0",
hint="Use QueryRule(MaybeGitWorktree, [GitWorktreeRequest]) instead.",
)
def get_git() -> Git | None:
"""Returns Git, if available."""
global _Git
Expand Down

0 comments on commit b3da025

Please sign in to comment.