Document .NET build integration with Grpc.Tools#15754
Document .NET build integration with Grpc.Tools#15754jtattermusch merged 4 commits intogrpc:masterfrom
Conversation
|
@kkm000 good job 👍 |
|
@listepo-alterpost, thank you, feel free to review and check the doc for typos, grammar and clarity. All comments are indeed welcome! |
a1517ec to
27771aa
Compare
src/csharp/INTEGRATION.md
Outdated
|
|
||
| ```xml | ||
| <ItemGroup> | ||
| <Protobuf Include="**/*.proto /> |
There was a problem hiding this comment.
Uh, nothing is a "nit" in the user-facing documentation! I'm also scrambling someone to proofread the text today.
src/csharp/INTEGRATION.md
Outdated
| ### I just want to compile .proto files into my library | ||
|
|
||
| This is the approach taken by the examples in the `csharp/examples` directory. | ||
| Protoc output files (for example, `Hello.cs` and `HelloGrps.cs` compiled from |
src/csharp/INTEGRATION.md
Outdated
|
|
||
| This is the approach taken by the examples in the `csharp/examples` directory. | ||
| Protoc output files (for example, `Hello.cs` and `HelloGrps.cs` compiled from | ||
| `hello.proto`) are placed among *object* and other temporary files of your |
There was a problem hiding this comment.
it's helloworld.proto and Helloworld.cs and HelloworldGrpc.cs
src/csharp/INTEGRATION.md
Outdated
|
|
||
| * "Classic" .csproj with `packages.config` (Visual Studio, Mono): This is | ||
| handled automatically by NuGet. See the attribute added to the | ||
| [helloworld/packages.config] file by Visual Studio. |
There was a problem hiding this comment.
btw, the layout of examples/csharp has been changed in the meantime. "Helloworld" now has the new-style csproj for dotnet SDK and "HelloworldLegacyCsproj" has the legacy projects. I usually call them "Legacy" rather than "Classic" btw.
src/csharp/INTEGRATION.md
Outdated
|
|
||
| * "Classic" .csproj with `packages.config` (Visual Studio, Mono): This is | ||
| handled automatically by NuGet. See the attribute added to the | ||
| [helloworld/packages.config] file by Visual Studio. |
There was a problem hiding this comment.
missing link to packages.config
src/csharp/INTEGRATION.md
Outdated
| [Greeter.csproj](/examples/csharp/helloworld-from-cli/Greeter/Greeter.csproj#L9) | ||
| example project in this repository. If adding a package reference in Visual | ||
| Studio, edit the project file and add this attribute. [This is a bug in Nuget | ||
| clinet](https://github.com/NuGet/Home/issues/4125). |
src/csharp/INTEGRATION.md
Outdated
| Studio, edit the project file and add this attribute. [This is a bug in Nuget | ||
| clinet](https://github.com/NuGet/Home/issues/4125). | ||
|
|
||
| If building a NuGet package from your library with a .nuspec file, then the spec |
There was a problem hiding this comment.
nit: add a not that .nuspec will be only used by legacy users, dotnet SDK users don't need to care anymore?
src/csharp/INTEGRATION.md
Outdated
|
|
||
| If building a NuGet package from your library with a .nuspec file, then the spec | ||
| file may (and probably should) reference the Grpc metapackage, but **do not add | ||
| a reference to Grpc.Tools** to it. "SDK" projects handle this automatically when |
There was a problem hiding this comment.
nit replace "SDK" with "dotnet SDK"?
src/csharp/INTEGRATION.md
Outdated
| * __Access__ | ||
| Sets generated class access on _both_ generated message and gRPC stub classes. | ||
|
|
||
| -=- End of INTEGRATION.md -=- |
There was a problem hiding this comment.
remove the end marker?
| @@ -0,0 +1,357 @@ | |||
| Protocol Buffers/gRPC Integration Into .NET Build | |||
There was a problem hiding this comment.
nit: the name of file INTEGRATION.md seems a bit too general - it's not immediately obvious what's meant by that.
How about CODEGEN.md or CODEGENERATION.md, CODEGEN-INTEGRATION.md, MSBUILD-INTEGRATION.md ....?
There was a problem hiding this comment.
Most regular developers have no idea what MSBuild is, and are hardly aware that they are in fact using it when hitting Shift+Ctrl+B for "Build" in Visual Studio or typing dotnet build; I'd rather avoid mentioning it in a file name. The common theme is "build" here; BUILD-INTEGRATION.md maybe then?
Or TOOLS-NUGET-PACKAGE.md?
CODEGEN etc. sounds also less appealing, looking through the user's eyes. As in "I want to compile proto files." The documentation refers to protoc as the Protocol Buffer compiler; codegen may be perceived as just a teensy option to it. I'm afraid CODEGEN would not ring the bell when seen from the user's perspective.
But overall, I think that a link from README will go a long way toward rendering the name choice not very important. Absolutely most people read README files on GitHub these days, not looking for one after unpacking a tarball--not .NET users, certainly. Just let me know what name you pefer.
From your other comment:
I usually call them "Legacy" rather than "Classic" btw.
I never heard them called legacy anywhere in MS' own and related development. The operational jargon is "Classic projects" vs "SDK projects" (or s/project/build/ when speaking of the process, not file format). FWIW, the "classic" is not obsolete; they in fact now support ProjectReference, just like SDK projects, with NuGet tasks integrated into MBuild, in lieu of packages.conf (which relied on a plugin shipped with VS to modify the .csproj content). Or maybe I was just spending too much time digging through MSBuld, netcore and NuGet repositories while working on our thing. :)
One point statistics is not convincing, but here's a single example I just happened to hit first: a Googler discusses an issue with an MSBuild architect in this jargon: dotnet/msbuild#3546. I'd go with Classic even in the example name, if I were to choose. When I first seen it renamed to HelloWorldLegacy, it fell on my ear as not exactly right. Yes, I'm biased, but it seems I'm biased in the right direction this time. :)
I could not find any named "official" names in the documentation (docs.microsoft.com), so we are drawing a blank here. .NET project, Visual Stdio project. Boring. Even my cats have names, although they also do not care...
* Fix typos. * Correct pointers to example files. * Refer to v1.17 or 1.17.0 throughout. * Change wording where requested, remove trailer. * Rename INTEGRATION.md -> BUILD-INTEGRATION.md. * Change a pointer in README.md to point to the new name.
ed4adc6 to
4912fb2
Compare
|
@jtattermusch, Done. I renamed the file The highlighted line numbers in the links to example files are off, as they refer to files in the examples PR #14684. |
jtattermusch
left a comment
There was a problem hiding this comment.
LGTM. I'll merge soon and we can continue improving in followup PRs if needed. Thanks for such detailed docs!
|
Docs only change, merging early. |
|
This is to document features in #13207, and refers to examples changed in #14684, so depends on them both.
Explicitly refers to v1.14. Needs change if delayed past the cut-off.