Descriptor was relying on the Root for the runtime check, but since the Root is
only startup up when needed, add the debug runtime check to the cases where the
Root isn't started up.
EnumDescriptors are normally started up by fields, but a developer could
directly call the public apis, so add the debug runtime check for safety sake.
PiperOrigin-RevId: 506062884
Looking back through history, figure out each place a generation change was
added and added compile asserts to help leave signals for what can be cleaned up
when if the legacy support is ever moved forward.
PiperOrigin-RevId: 506020387
(Edited by jskeet) For public release notes:
Add a public `IMessage.MergeFrom(ReadOnlySequence<byte>)` extension method, exposing existing internal functionality.
(Parsing a completely new message from `ReadOnlySequence<byte>` was already publicly available, just not merging.)
----
Public the `MergeFrom` method of type `ReadOnlySequence<byte>`.
We found that the `MergeFrom` method of type `ReadOnlySequence<byte>` is internal.
**We need it !!!**
Closes#11124
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11124 from VAllens:patch-1 0ddea03042
PiperOrigin-RevId: 504575534
The ../ was causing an error in how the targets were being copied over. Since we have to copy the files anyway, it doesn't matter where we expect the files.
PiperOrigin-RevId: 503259682
In the multi file case, the function to get the file descriptor has to be
referenced from multiple generated source, so it can't be `static`, ensure the
name is more unique to avoid issues.
PiperOrigin-RevId: 502611183
Prior to this change, running "dotnet test" would result in a
warning about csc only supporting C# up to version 5, and warnings
of unrecognized warnings being suppressed.
With this change in place, the test output doesn't include anything
from csc.
* Change C# generation script to use .pb.cs extension
* Rename generated C# files
This was performed by running generate_protos.sh and then removing the old files.
Notes:
- This does not change the conformance test generated C# code
- This does not change the compatibility C# code
- There's currently no clean-up operation in generate_protos.sh to remove old .pb.cs files (which would now be feasible)
- The changes to TestMessagesProto2.pb.cs are just due to formatting and a new Objective-C option
* Fix well-known type source files for C# Bazel build
We need to call `dotnet restore` in order to properly setup the libraries to pack. The docker image we are using will save the packages in `/lib/csharp`