Skip to content

Commit

Permalink
pw_protobuf: Remove code-generation timestamps
Browse files Browse the repository at this point in the history
Google discourages timestamps in generated files due to determinism
concerns, and the timestamp comments in Pigweed's proto codegen don't
seem necessary. This change removes those timestamps to ensure the
generated files don't change between builds unless the inputs or build
settings have changed.

Bug: b/234067834
Change-Id: I4e480f93fe41671ab8ad4e36c9ef578855fcdc8b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/96161
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Matthias Guenther <mrguenther@google.com>
  • Loading branch information
Matthias Guenther authored and CQ Bot Account committed May 27, 2022
1 parent 4861a9a commit 11424d0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pw_protobuf/py/pw_protobuf/codegen_pwpb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"""This module defines the generated code for pw_protobuf C++ classes."""

import abc
from datetime import datetime
import enum
# Type ignore here for graphlib-backport on Python 3.8
from graphlib import CycleError, TopologicalSorter # type: ignore
Expand Down Expand Up @@ -2208,7 +2207,6 @@ def generate_code_for_package(file_descriptor_proto, package: ProtoNode,

output.write_line(f'// {os.path.basename(output.name())} automatically '
f'generated by {PLUGIN_NAME} {PLUGIN_VERSION}')
output.write_line(f'// on {datetime.now()}')
output.write_line('#pragma once\n')
output.write_line('#include <algorithm>')
output.write_line('#include <array>')
Expand Down

0 comments on commit 11424d0

Please sign in to comment.