Commit Graph

2155 Commits

Author SHA1 Message Date
Esun Kim 78b9d84fd3 [Dep] Rollback Protobuf upgrade to v25.1 (#36247)
This is for gRPC Python that has an issue with Protobuf Python v26

Closes #36247

PiperOrigin-RevId: 621629528
2024-04-03 13:56:36 -07:00
tony a087266a27 C#: Grpc.Tools: Handle regex timeout when parsing protoc output (#36185)
Fix for https://github.com/grpc/grpc/issues/36162

Increase the regex timeout to 1 second. If a timeout occurs then log that the line could not be parsed.

Closes #36185

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36185 from tonydnewell:grpc.tools-regex-timeout 324b301d40
PiperOrigin-RevId: 620767619
2024-04-01 00:01:11 -07:00
Esun Kim 03312884dc [Deps] Upgraded protobuf to v26.1 (#35796)
This is to upgrade Protobuf to v26.1 along with upb, and utf8_range.

Closes #35796

PiperOrigin-RevId: 620259696
2024-03-29 09:19:06 -07:00
Eugene Ostroukhov 6c157f9128 [Release] Bump version to 1.63.0-dev (on master branch) (#35899)
Change was created by the release automation script. See go/grpc-release.

Closes #35899

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35899 from eugeneo:bump_dev_version_202402131133 73950425c9
PiperOrigin-RevId: 606777850
2024-02-13 16:09:36 -08:00
Stanley Cheung 7c347b96eb [Release] Bump version to 1.62.0-dev (on master branch) (#35580)
Change was created by the release automation script. See go/grpc-release.

Closes #35580

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35580 from stanley-cheung:bump_dev_version_202401171835 b363888ca5
PiperOrigin-RevId: 599267642
2024-01-17 13:19:59 -08:00
Esun Kim 769b27479a [Deps] Update protobuf & upb to 3.25.1 (#35315)
On top of https://github.com/grpc/grpc/pull/35285, upb is also upgraded in this PR.

Closes #35315

PiperOrigin-RevId: 592672254
2023-12-20 15:29:31 -08:00
Mark D. Roth 15e2f9e873
[release] Bump version on master to 1.61.0-dev (#34923) 2023-11-13 08:33:46 -08:00
Adam Cozzette 016ed921ce
[deps] Upgrade protobuf version to v25.0 (#34513)
This commit upgrades gRPC to protobuf v25.0 and makes some fixes to
account for upb changes. One major change is that upb has been merged
into the protobuf repo, so we can now drop the separate `@upb`
dependency. Another is that `.upb.c` files no longer exist and there are
new `.upb_minitable.h` and `.upb_minitable.c` files. The longer
filenames exceeded a Windows restriction, so to work around that I
renamed the `upb-generated` directory to just `upb-gen`, and likewise
for `upbdefs-generated`.
2023-11-10 00:11:09 -08:00
tony 301636dae0
[csharp] Grpc.Tools documentation for sharing proto files between projects and nuget packages (#34521)
Added documented for Grpc.Tools for sharing proto files

- between projects in a solution
- in NuGet packages to be used by other projects

This addresses the questions raised in:
- https://github.com/grpc/grpc-dotnet/issues/1458
- https://github.com/grpc/grpc-dotnet/issues/183

@jtattermusch @JamesNK

---------

Co-authored-by: James Newton-King <james@newtonking.com>
2023-10-18 09:39:42 -07:00
Richard Belleville 3bdd972c4a
[Release] Bump master version to 1.60 (gjallarhorn) (#34488)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-09-26 13:10:20 -07:00
Esun Kim 91a7dbb44b
[Deps] Updated protobuf to 24.3 + layout fix (#34322)
Updating Protobuf & upb to 24.3 (the latest at this point) and having
https://github.com/protocolbuffers/protobuf/pull/14042
2023-09-12 11:08:09 -07:00
Esun Kim 1a1124903c
[Deps] Upgrade Protobuf and Upb to 24.x (#34123)
On top of https://github.com/grpc/grpc/pull/34120
2023-08-29 10:58:48 -07:00
Esun Kim a90f30008d
[Release] Bump version to 1.59.0-dev (on master branch) (#34144)
Change was created by the release automation script. See
go/grpc-release.
2023-08-23 15:53:32 -07:00
AJ Heller 42b0d01e68
[Release] Bump version to 1.58.0-dev (on master branch) (#33825)
Change was created by the release automation script. See go/grpc-release
2023-07-24 10:09:08 -07:00
tony 82cdea3b88
[C#] Grpc.Tools - Remove TODOs for splitting package (#33581)
It has been decided that we will no longer try and split Grpc.Tools
NuGet package logic into two packages by adding logic to
Google.Protobuf.Tools. See
https://github.com/protocolbuffers/protobuf/issues/5957

This PR removes some of the TODOs and redundant files.

There is further simplification work that could be done to combine the
props and targets files that were already split. But this is the first
step in the tidying up the code.
2023-07-17 07:44:34 +02:00
AJ Heller c81bdf7a83
[Protobuf] Upgrade third_party/protobuf to 23.4 (#33695)
This was done manually due to a problem with
`tools/distrib/python/make_grpcio_tools.py`. ~I fixed it in this PR
(depends on cl/547979185), so there is a fair chance this upgrade will
work normally for the next release.~ The fix may be problematic for
upgrading protobuf on older release branches, so the improvement will be
worked on separately. CC @jtattermusch

This also updates the UPB dep to the latest commit on the 23.x branch.
2023-07-14 12:04:40 -07:00
Jan Tattermusch 1002319736
[csharp] reintroduce base_namespace experimental option to C# (with a patch) (#33535)
Reintroduces patched version of https://github.com/grpc/grpc/pull/32636
(which was reverted in https://github.com/grpc/grpc/pull/32957).

Together with cl/542843305, the internal build should work fine.

Supersedes https://github.com/grpc/grpc/pull/33310 (since a patch is
also needed).

---------

Co-authored-by: tony <tony.newell@pobox.com>
2023-06-26 11:20:26 +02:00
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Yijie Ma 5a0678001b
[Release] Bump version to 1.57.0-dev (on master branch) (#33311)
Change was created by the release automation script. See
go/grpc-release.
2023-06-01 10:55:31 -07:00
Esun Kim a3dae00f89
[Deps] Upgrade Protobuf to v23.1 (#33164)
Along with the required Abseil & upb upgrade.
2023-05-18 14:46:59 -07:00
Esun Kim dc95133140
[Deps] Upgrade Protobuf v23 (#32914)
Upgrading Protobuf and Upb to v23.0
2023-05-09 12:24:21 -07:00
AJ Heller d63f8d4dcf
Revert "[CSHARP] Add base_namespace experimental option to C# plugin" (#32957)
Reverts grpc/grpc#32636

```
src/compiler/csharp_generator_helpers.h:25:7: error: no member named 'compiler' in namespace ...
src/compiler/csharp_generator_helpers.h:25:25: error: no member named 'csharp' in namespace 'compiler' ...
```
2023-04-27 12:52:54 -07:00
tony d534b4ad7a
[CSHARP] Add base_namespace experimental option to C# plugin (#32636)
Added `base_namespace` experimental option to `grpc_csharp_plugin` as
this has been requested several times by
people not using `Grpc.Tools` to generate their code - see
https://github.com/grpc/grpc/issues/28663

Notes:
- it should not be used with `Grpc.Tools`. That has a different way of
handling duplicate proto file names in different directories. Using this
option will break those builds. It can only be used on the `protoc`
command line.
- it uses common code with the `base_namespace` option for C# in
`protoc`, which unfortunately has a slightly different name mangling
algorithm for converting proto file names to C# camel case names. This
only affects files with punctation or numbers in the name. This should
not matter unless you are expecting specific file names
- See
https://protobuf.dev/reference/csharp/csharp-generated/#compiler_options
for an explanation of this option
2023-04-27 08:48:32 -07:00
Yash Tibrewal dc075539e7
[Release] Bump version to 1.56.0-dev (on master branch) (#32918)
Change was created by the release automation script. See go/grpc-release
2023-04-24 10:47:57 -07:00
Jan Tattermusch 0f1afec5a8
[protobuf] Upgrade third_party/protobuf to 22.x (#32606)
The very non-trivial upgrade of third_party/protobuf to 22.x
This PR strives to be as small as possible and many changes that were
compatible with protobuf 21.x and didn't have to be merged atomically
with the upgrade were already merged.
Due to the complexity of the upgrade, this PR wasn't created
automatically by a tool, but manually. Subsequent upgraded of
third_party/protobuf with our OSS release script should work again once
this change is merged.

This is best reviewed commit-by-commit, I tried to group changes in
logical areas.

Notable changes:
- the upgrade of third_party/protobuf submodule, the bazel protobuf
dependency itself
- upgrade of UPB dependency to 22.x (in the past, we used to always
upgrade upb to "main", but upb now has release branch as well). UPB
needs to be upgraded atomically with protobuf since there's a de-facto
circular dependency (new protobuf depends on new upb, which depends on
new protobuf for codegen).
- some protobuf and upb bazel rules are now aliases, so `
extract_metadata_from_bazel_xml.py` and `gen_upb_api_from_bazel_xml.py`
had to be modified to be able to follow aliases and reach the actual
aliased targets.
- some protobuf public headers were renamed, so especially
`src/compiler` needed to be updated to use the new headers.
- protobuf and upb now both depend on utf8_range project, so since we
bundle upb with grpc in some languages, we now have to bundle utf8_range
as well (hence changes in build for python, PHP, objC, cmake etc).
- protoc now depends on absl and utf8_range (previously protobuf had
absl dependency, but not for the codegen part), so python's
make_grpcio_tools.py required partial rewrite to be able to handle those
dependencies in the grpcio_tools build.
- many updates and fixes required for C++ distribtests (currently they
all pass, but we'll probably need to follow up, make protobuf's and
grpc's handling of dependencies more aligned and revisit the
distribtests)
- bunch of other changes mostly due to overhaul of protobuf's and upb's
internal build layout.

TODOs:
- [DONE] make sure IWYU and clang_tidy_code pass
- create a list of followups (e.g. work to reenable the few tests I had
to disable and to remove workaround I had to use)
- [DONE in cl/523706129] figure out problem(s) with internal import

---------

Co-authored-by: Craig Tiller <ctiller@google.com>
2023-04-12 18:43:58 +02:00
Stanley Cheung ec1d75bb0a
[Release process] Bump version to 1.55.0-dev (on master branch) (#32743)
Change was created by the release automation script. See
go/grpc-release.
2023-03-29 11:03:07 -07:00
tony 3679f5ee75
Document using other binaries in Grpc.Tools (#32553)
Added documentation on how to use `Grpc.Tools` MSBuild integration with
*unsupported* architectures - i.e. third party built `protoc` and
`grpc_csharp_plugin`.
2023-03-23 15:44:58 +01:00
Jan Tattermusch 5873ba96dc
Ensure compatibility with the new custom kokoro win2019 image (#32649)
Fix incompatibilities identified when running adhoc runs on the new
custom win2019 image.
After merging this, it should be possible to switch to the new image
without breaking any tests.

- for most fixes I added a comment that explains why they're necessary.
- the new image won't have VS2015 installed, so I'm switching the protoc
artifact build to VS2017

This PR will need to be backported to older release branches to ensure
the windows tests continue working on those branches as well (IMHO I
haven't made any changes that would be difficult to backport and I tried
to keeps the diff as small as possible to avoid issues when
backporting).

After we switch to the new image (and all the windows tests are green),
we can incrementally move the builds that are still using VS2017 to
VS2019.
2023-03-20 16:03:50 +01:00
tony 2abf140f98
Add more Grpc.Tools integration tests (#32311)
Further Grpc.Tools tests
- TestCharactersInName - proto files with dots and numbers in their
names
- TestExtraOptions - test setting AdditionalProtocArguments,
OutputOptions and GrpcOutputOptions
- TestGrpcServices - test setting GrpcServices to "none", "client",
"server" and "both"
- TestSetOutputDirs - test setting OutputDir and GrpcOutputDir
2023-03-02 14:44:52 +01:00
Mark D. Roth 50e6af14ff
Bump dev version to 1.54.0-dev (#32426) 2023-02-21 12:03:19 -08:00
tony 3e70a163e2
Rewrite Grpc.Tools BUILD-INTEGRATION.md docs (#32075)
* Rewrite Grpc.Tools BUILD-INTEGRATION.md docs

* Minor edits to text

* various adjustments and typos for Grpc.Tools readme

* Updated with review suggestions

* Further refinements to the docs

* Add README for Grpc.Tools package

* Update BUILD-INTEGRATION.md

* Updated from review comments

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
2023-01-23 16:49:42 +01:00
tony 13186065a8
Add test for duplicate proto file name (#32152) 2023-01-23 11:16:16 +01:00
Jan Tattermusch dafcb3b6e6
Update third_party/protobuf to 3.21.12 (#32136)
* Update third_party/protobuf

* run tools/distrib/python/make_grpcio_tools.py

* update build_handwritten.yaml

* regenerate projects

* manual change: fix tools/distrib/check_protobuf_pod_version.sh to accept new-style protobuf tags

* improve comments for check_protobuf_pod_version hack
2023-01-20 21:18:53 +01:00
Jan Tattermusch 7fd808f6f9
Bump version to 1.53.0-dev (on master branch) (#32086)
* bump version to 1.53.0-dev

* regenerate projects
2023-01-18 09:41:33 +01:00
dependabot[bot] baedc454e7
Bump Newtonsoft.Json in /src/csharp/Grpc.Tools.Tests (#32047)
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 9.0.1 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/9.0.1...13.0.1)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-16 15:47:02 +01:00
tony aea02409bb
Use x86 protoc binaries on arm64 Windows (#32017) 2023-01-16 11:10:46 +01:00
tony 0ff115e49c
Initial version of Grpc.Tools & Msbuild integration tests (#31638)
* Inital Grpc.Tools unit tests

* refining the tests

* Get tests to run on Linux

* further grpc.tools tests changes

* changes for relative/absoulte paths

* Simplify running on just one framework

* Add Protobuf.MSBuild.dll for tests to use

* fix typo in comment

* fix copyright note

* Revert "Add Protobuf.MSBuild.dll for tests to use"

This reverts commit 542756cade.

* cleanup Directory.Build.props

* fix location of tasksAssembly

* cleanup in preparing paths

* add test-out to .gitignore

* many simplifications to MsBuildIntegrationTest

* update expected test results data

* many improvements to fakeprotoc.py

* yapf code

* fix copyright licenses

* reintroduce normalized paths

* minor fixes

* attempt simplify Directory.Build.targets

* newline at EOF

* simplify result comparison

* add a TODO

* further simplify MsBuildIntegrationTest test harness

* avoid internal symbol conflict by diambiguating test protos

* add TODO

* style fixes

* one more fixup

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
2023-01-09 14:29:47 +01:00
tony 1cd92d9446
Add internal documentation for Grpc.Tools MSBuild integration (#31784)
* Developer doc for Grpc.Tools msbuild integration

* Fix formatting

* update docs from review comments

* small changes to the documentation
2022-12-22 09:50:40 +01:00
Richard Belleville 51f296b4f8
Bump master branch to 1.52.0-dev (gribkoff) (#31618)
* bump version to 1.52.0-dev

* regenerate projects
2022-11-10 16:11:08 -08:00
Esun Kim 42c2767c19
Revert "Bump v1.51.x to 1.51.0-pre1 (#31620)" (#31621)
This reverts commit bae9dd79aa.
2022-11-10 15:21:14 -08:00
Richard Belleville bae9dd79aa
Bump v1.51.x to 1.51.0-pre1 (#31620)
* bump version to 1.51.0-pre1

* regenerate projects
2022-11-10 15:17:59 -08:00
tony d3d2b64d23
Fix msbuild failing when '@' is present in path (2nd attempt) (#31527)
* Fix msbuild failing when '@' is present in path

There was ambiguity in references to Source metadata on some Items. These
are now qualified to remove the ambiguity.

* Revert "Fix msbuild failing when '@' is present in path"

This reverts commit bb5d5ddc61.

* Unescape Indentity when creating Source

* Fix spelling in comment
2022-11-08 12:07:39 +01:00
Jan Tattermusch ffe1f4af78
Revert "Fix msbuild failing when '@' is present in path (#31133)" (#31464)
This reverts commit 1a5ad72063.
2022-10-26 20:10:55 +02:00
tony 1a5ad72063
Fix msbuild failing when '@' is present in path (#31133)
There was ambiguity in references to Source metadata on some Items. These
are now qualified to remove the ambiguity.
2022-10-24 12:19:28 +02:00
Esun Kim f11282df8d
Bump dev version v1.51-dev (#31174)
* bump version to 1.51.0-dev

* regenerate projects
2022-09-29 14:58:01 -07:00
Richard Belleville e609ad88c9
Update protobuf to v21.6 (#31015)
* Update third_party/protobuf

* run tools/distrib/python/make_grpcio_tools.py

* update build_handwritten.yaml

* regenerate projects

* Update Python version floor
2022-09-16 17:50:52 -07:00
tony e313ac8398
Grpc.Tools: Parse warnings from libprotobuf (fix #27502) (#30371)
* issue 27502 - parse warning from libprotobuf

The warnings and errors logged by some of the pluggins such as the csharp
plugin are in a different format from other warnings etc logged by the
protobuf compiler (the plugins use GOOGLE_LOG to log message).
The parsing code in Grpc.Tools has been modified to correctly parse these
so that warnings are no longer handled as errors.

* Fix typos in comments
2022-09-05 10:58:25 +02:00
tony f0948a7c38
Grpc.Tools add support for env variable GRPC_PROTOC_PLUGIN (fix #27099) (#30411)
* issue 27099 Grpc.Tools add env GRPC_TOOL_PLUGIN
Added environment variable GRPC_TOOL_PLUGIN to override the
GRPC plugin path

* Change GRPC_TOOL_PLUGIN to GRPC_PROTOC_PLUGIN
2022-09-05 10:32:54 +02:00
tony dce1c83617
Grpc.Tools document AdditionalImportDirs (#30405)
* Grpc.Tools document AdditionalImportDirs

* Update doc for AdditionalImportDirs

* fix type

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
2022-09-02 17:25:48 +02:00
apolcyn 778f04dccf
Bump version on master branch to 1.50.0.dev (#30614)
* bump version to 1.50.0-dev

* regenerate projects
2022-08-17 18:20:27 -07:00