Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: protocolbuffers/protobuf-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.36.3
Choose a base ref
...
head repository: protocolbuffers/protobuf-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.36.4
Choose a head ref
  • 7 commits
  • 150 files changed
  • 2 contributors

Commits on Jan 15, 2025

  1. all: start v1.36.3-devel

    Change-Id: Ic4aec2037f3460ac94d6caf11ece66dfbe4026c0
    Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/642856
    Reviewed-by: Chressie Himpel <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    stapelberg committed Jan 15, 2025
    Configuration menu
    Copy the full SHA
    132f042 View commit details
    Browse the repository at this point in the history
  2. internal_gengo: store raw descriptor in .rodata section

    In Go, []byte literals go into the writable .data (or .noptrdata) section,
    but string literals goes into the read-only .rodata section.
    
    I verified that the contents move from .noptrdata to .rodata:
    
    % (cd internal/reflection_test && \
      go test -c && \
      objdump -s -j .rodata reflection_test.test | grep '0a4669 6e')
     88bfd0 6e7370e8 070a4669 6e746572 6e616c2f  nsp...Finternal/
    
    Change-Id: I87e190b41c02235abea1967eddca2f0262060ed9
    Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/638135
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Nicolas Hillegeer <[email protected]>
    Reviewed-by: Damien Neil <[email protected]>
    stapelberg committed Jan 15, 2025
    Configuration menu
    Copy the full SHA
    cc8d1c2 View commit details
    Browse the repository at this point in the history
  3. internal_gengo: use unsafe.StringData() to avoid a descriptor copy

    This means our generated code requires Go 1.20+.
    (Go Protobuf currently requires at least Go 1.21.)
    
    Change-Id: Ie65be553bcb5912991d590104ff6b7c6a82b9c38
    Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/642055
    Reviewed-by: Nicolas Hillegeer <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Damien Neil <[email protected]>
    stapelberg committed Jan 15, 2025
    Configuration menu
    Copy the full SHA
    0c3cc2f View commit details
    Browse the repository at this point in the history
  4. internal_gengo: switch back from string literal to hex byte slice

    It tourns out that Piper (the revision control system Google uses)
    has a check that requires marking files containing non-UTF8 bytes
    as binary, preventing textual review. We wanted to avoid this issue
    in http://go.dev/cl/638135 and added \r to the escape set for Gerrit,
    but we did not anticipate how strict other systems are in practice.
    
    (I did not notice this issue earlier because the Piper check
    does not trigger when sending a CL for Google-wide testing,
    only when mailing a CL for review.)
    
    It stands to reason that if our revision control and review systems
    do not like string literals with non-UTF8 content, other systems
    probably behave similarly. Hence, let’s revert that part of the change.
    The key part of the change was to switch the type of the embedded
    descriptor bytes from mutable []byte to immutable string.
    
    I verified that the string literal remains in .rodata:
    
    % (cd internal/reflection_test && \
      go test -c && \
      objdump -s -j .rodata reflection_test.test | grep '0a46696e')
     8e9fd0 0a46696e 7465726e 616c2f74 65737470  .Finternal/testp
    
    The bytes printed above only occur once and match the bytes from
    file_internal_testprotos_testeditions_testeditions_hybrid_test_hybrid_proto_rawDesc
    
    Change-Id: I8e1bfe53a5bbf65abe7861a749ace37b215a8e28
    Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/642857
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Nicolas Hillegeer <[email protected]>
    stapelberg committed Jan 15, 2025
    Configuration menu
    Copy the full SHA
    aee8a9c View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2025

  1. reflect/protodesc: fix panic when working with dynamicpb

    Improves on CL 642575 with a few additional checks to make
    sure a panic doesn't occur even under unexpected conditions.
    
    Fixes golang/protobuf#1671
    
    Change-Id: I25bf1cfdf0b35b381cab603f9e06581b3b630d73
    Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/642975
    Reviewed-by: Damien Neil <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Michael Stapelberg <[email protected]>
    jhump authored and stapelberg committed Jan 16, 2025
    Configuration menu
    Copy the full SHA
    2005adb View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2025

  1. internal_gengo: avoid allocations in rawDescGZIP() accessors

    Use unsafeBytes in rawDescGZIP() as well, which is safe because our
    CompressGZIP() does not write to the byte slice.
    
    Store the result of CompressGZIP as a byte slice so that subsequent
    calls do not cause any more allocations.
    
    In http://go.dev/cl/638135, I asserted that rawDescGZIP() is rarely-used,
    but after rolling out the change Google-internally, affected users made
    me aware of a few programs that heavily access these descriptors.
    
    Change-Id: Ieb5010ddc7b9ac6be88970321ff01a3d29e846bf
    Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/643276
    Reviewed-by: Chressie Himpel <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Nicolas Hillegeer <[email protected]>
    Reviewed-by: Nicolas Hillegeer <[email protected]>
    Commit-Queue: Nicolas Hillegeer <[email protected]>
    stapelberg authored and gopherbot committed Jan 17, 2025
    Configuration menu
    Copy the full SHA
    5f93d99 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2025

  1. all: release v1.36.4

    Change-Id: I0982b0714f2f250df0db242d6300cb5f44d999bf
    Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/643956
    Reviewed-by: Chressie Himpel <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    stapelberg committed Jan 24, 2025
    Configuration menu
    Copy the full SHA
    259e665 View commit details
    Browse the repository at this point in the history
Loading