diff --git a/CHANGELOG.md b/CHANGELOG.md index e59d225189..d7ae4bf0a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,11 +55,14 @@ Unreleased changes template. * (deps) platforms 0.0.4 -> 0.0.11 * (py_wheel) Package `py_library.pyi_srcs` (`.pyi` files) in the wheel. * (py_package) Package `py_library.pyi_srcs` (`.pyi` files) in `py_package`. +* (gazelle) The generated manifest file (default: `gazelle_python.yaml`) will now include the + YAML document start `---` line. Implemented in + [#2656](https://github.com/bazelbuild/rules_python/pull/2656). {#v0-0-0-fixed} ### Fixed * (pypi) The `ppc64le` is now pointing to the right target in the `platforms` package. -* (gazelle) No longer incorrectly merge `py_binary` targets during partial updates in +* (gazelle) No longer incorrectly merge `py_binary` targets during partial updates in `file` generation mode. Fixed in [#2619](https://github.com/bazelbuild/rules_python/pull/2619). * (bzlmod) Running as root is no longer an error. `ignore_root_user_error=True` is now the default. Note that running as root may still cause spurious diff --git a/examples/build_file_generation/gazelle_python.yaml b/examples/build_file_generation/gazelle_python.yaml index cd5904dcba..6b34f3c688 100644 --- a/examples/build_file_generation/gazelle_python.yaml +++ b/examples/build_file_generation/gazelle_python.yaml @@ -3,6 +3,7 @@ # To update this file, run: # bazel run //:gazelle_python_manifest.update +--- manifest: modules_mapping: alabaster: alabaster diff --git a/examples/bzlmod_build_file_generation/gazelle_python.yaml b/examples/bzlmod_build_file_generation/gazelle_python.yaml index c94f93a070..019b051092 100644 --- a/examples/bzlmod_build_file_generation/gazelle_python.yaml +++ b/examples/bzlmod_build_file_generation/gazelle_python.yaml @@ -3,6 +3,7 @@ # To update this file, run: # bazel run //:gazelle_python_manifest.update +--- manifest: modules_mapping: S3: s3cmd diff --git a/examples/bzlmod_build_file_generation/gazelle_python_with_types.yaml b/examples/bzlmod_build_file_generation/gazelle_python_with_types.yaml index b6b0687ea4..7632235aa0 100644 --- a/examples/bzlmod_build_file_generation/gazelle_python_with_types.yaml +++ b/examples/bzlmod_build_file_generation/gazelle_python_with_types.yaml @@ -3,6 +3,7 @@ # To update this file, run: # bazel run //:gazelle_python_manifest_with_types.update +--- manifest: modules_mapping: S3: s3cmd diff --git a/gazelle/manifest/generate/generate.go b/gazelle/manifest/generate/generate.go index 27cf2a21d8..899b1514ee 100644 --- a/gazelle/manifest/generate/generate.go +++ b/gazelle/manifest/generate/generate.go @@ -151,7 +151,7 @@ func writeOutput( } defer outputFile.Close() - if _, err := fmt.Fprintf(outputFile, "%s\n", header); err != nil { + if _, err := fmt.Fprintf(outputFile, "%s\n---\n", header); err != nil { return fmt.Errorf("failed to write output: %w", err) }