From 7064f6bef41833533d0b7c3a933b2d62902639b9 Mon Sep 17 00:00:00 2001 From: hunshcn Date: Thu, 1 Aug 2024 16:21:22 +0800 Subject: [PATCH] fix(gazelle): make gazelle_python_manifest.genrule manual (#2097) Fix https://github.com/bazelbuild/rules_python/issues/2096 --------- Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com> --- CHANGELOG.md | 10 ++++++---- gazelle/manifest/defs.bzl | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47c6d762d4..a2e60f70db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,10 @@ A brief description of the categories of changes: when the wheel is downloaded using `download_only` feature to aid debugging. * (gazelle): Simplify and make gazelle_python.yaml have only top level package name. It would work well in cases to reduce merge conflicts. +* (toolchains): Change some old toochain versions to use [20240726] release to + include dependency updates `3.8.19`, `3.9.19`, `3.10.14`, `3.11.9` +* (toolchains): Bump default toolchain versions to: + * `3.12 -> 3.12.4` ### Fixed * (rules) Signals are properly received when using {obj}`--bootstrap_impl=script` @@ -49,10 +53,8 @@ A brief description of the categories of changes: * (pip) Correctly use the `sdist` downloaded by the bazel downloader when using `experimental_index_url` feature. Fixes [#2091](https://github.com/bazelbuild/rules_python/issues/2090). -* (toolchains): Change some old toochain versions to use [20240726] release to - include dependency updates `3.8.19`, `3.9.19`, `3.10.14`, `3.11.9` -* (toolchains): Bump default toolchain versions to: - * `3.12 -> 3.12.4` +* (gazelle) Make `gazelle_python_manifest.update` manual to avoid unnecessary + network behavior. ### Added * (rules) `PYTHONSAFEPATH` is inherited from the calling environment to allow diff --git a/gazelle/manifest/defs.bzl b/gazelle/manifest/defs.bzl index 5211b71aab..eacf1c18cf 100644 --- a/gazelle/manifest/defs.bzl +++ b/gazelle/manifest/defs.bzl @@ -95,6 +95,7 @@ def gazelle_python_manifest( modules_mapping, manifest_generator_hash, ] + ([requirements] if requirements else []), + tags = ["manual"], ) py_binary( @@ -109,7 +110,8 @@ def gazelle_python_manifest( generated_manifest, manifest, ], - **kwargs + tags = kwargs.get("tags", []) + ["manual"], + **{k: v for k, v in kwargs.items() if k != "tags"} ) if requirements: