Commit Graph

41 Commits

Author SHA1 Message Date
Jan Tattermusch f213ccd454
Merge pull request #23358 from jtattermusch/cleanup_grpc_tools
unify Grpc.Tools projects with other csproj projects
2020-07-09 13:44:46 +02:00
Jan Tattermusch 88cd5b0881
Merge pull request #22869 from Falco20019/grpc-fix-collisions
Avoid collisions in cs files generated by Grpc.Tools
2020-07-01 13:41:18 +02:00
Jan Tattermusch 2253b82fcc unify Grpc.Tools projects with other csproj projects 2020-06-30 08:30:29 +02:00
Kraemer, Benjamin e165a33048 Add support for Protobuf_ProtoRoot 2020-06-16 14:13:44 +02:00
Kraemer, Benjamin 5494c54cee Use same logic in csharp as in cpp 2020-06-16 12:10:27 +02:00
Kraemer, Benjamin 6bcc37b07c Reverted GetDepFilenameForProto
Otherwise it creates conflicts with non-standard $(Protobuf_DepFilesPath)
2020-06-16 11:59:58 +02:00
Kraemer, Benjamin da4fe1e051 Updated unit tests 2020-06-16 11:59:58 +02:00
Kraemer, Benjamin 47ec56beb4 Avoid collisions in cs files generated by Grpc.Tools 2020-06-16 11:59:57 +02:00
Jan Tattermusch 005dbafe66 fix mac tests on kokoro workers 2020-06-16 09:58:56 +02:00
Jan Tattermusch 47ae4cd5d9 move Mono msbuild test hack to C# code 2020-06-10 11:49:42 -04:00
Jan Tattermusch b19f287144 use Microsoft.NETFramework.ReferenceAssemblies for Grpc.Tools 2020-06-10 07:03:53 -04:00
Gavin Lambert 32ef13c264 Fix cpp paths in tools to match actual codegen. 2020-02-24 10:12:12 +13:00
Jan Tattermusch 8bfb713c80 fix Grpc.Tools build 2019-06-26 04:38:55 -04:00
Jan Tattermusch a827504ffb get rid of workaround to build net45 targets on linux and mac 2019-06-26 04:38:54 -04:00
Jan Tattermusch 632191f890
Merge pull request #18446 from JunTaoLuo/error-list
Ensure errors link to correct line numbers through the VS Error List
2019-03-26 11:43:20 -07:00
= 68c3414cf4 fix test 2019-03-26 02:06:45 -07:00
John Luo f699bd8604 Ensure errors link to correct line numbers through the error list 2019-03-26 01:49:35 -07:00
Jan Tattermusch 6fba3c0221 dependency versions are imported through Directory props 2019-03-25 12:47:29 -07:00
James Newton-King 297dd0cb62
PR feedback 2019-03-25 18:26:14 +13:00
Jan Tattermusch 1805e2e431
Merge pull request #18470 from kkm000/kkm/17661-filenamegen
C# tools: support generated filename corner cases
2019-03-22 09:11:30 -07:00
kkm aa40424bb2 fixup! C# tools: support generated filename corner cases 2019-03-22 08:03:15 -07:00
kkm c07a74d0e5 C# Tooling: change the case to 'Protobuf' consistently
Users will not be affected, as MSBuild is not case-sensitive.

The changes in C# code are also entirely for consistency; they
do not affect the tooling dll at runtime.

Closes #17884
2019-03-22 01:17:14 -07:00
kkm cbb70f534b C# tools: support generated filename corner cases
protoc and gRPC codegens differently treat non-ASCII letter
characters and symbols other than underscores when constructing
their respective output filenames for generated .cs files.
This change reproduces their respective behaviors exactly.

Fixes #17661
2019-03-22 00:46:52 -07:00
John Luo 55897b9f69 WIP Fix tests 2019-03-13 16:56:16 -07:00
Jan Tattermusch 3291154db0 update all executables to netcoreapp2.1 2019-03-11 07:59:33 -04:00
Jan Tattermusch b021add5e4 C#: avoid unnecessary ifdefine in NUnitMain.cs 2018-12-03 15:17:52 +01:00
Jan Tattermusch 2e54a2bc36 update compiler defines 2018-11-30 13:04:33 +01:00
Jan Tattermusch ba6b1c215c switch netcoreapp1.0->1.1 2018-11-30 13:04:33 +01:00
kkm 3b7c408262 Remove target netcoreapp2.1 from Tools.Tests csproj 2018-10-16 15:27:04 -07:00
kkm 5103951117 Infer coding style, adjust .editorconfig, reformat Tools code 2018-10-14 08:34:03 -07:00
kkm 9158493c41 Improve ProtoToolsPlatformTask tests 2018-10-14 04:26:02 -07:00
kkm ccacf24fb0 Fix dotnet/Mono build and testing under Linux 2018-10-14 04:24:52 -07:00
Jan Tattermusch 716b5577fc fixup: rename *Tests files to *Test 2018-10-09 13:09:41 +02:00
kkm a844323c7e Rename test classes *Test; UWYU in Tools.Test project 2018-10-07 03:09:54 -07:00
Jan Tattermusch e3e7e32a7e sync nunit version for all test projects 2018-08-13 15:55:54 +02:00
Jan Tattermusch 5f4dfaac9e split up GeneratorTests into individual files 2018-08-13 15:02:40 +02:00
Jan Tattermusch 8a98ab97ac fix typo in DepFileUtilTests 2018-08-13 15:01:31 +02:00
Jan Tattermusch 86df93d4e1 split up ProtoCompile tests to individual files 2018-08-13 15:00:44 +02:00
Jan Tattermusch dd06e68fef add linux/mac net45 compilation fix to Grcp.Tools.Tests.csproj 2018-08-13 14:16:41 +02:00
kkm 17df1f8cf5 fixup! Add Grpc.Tools MsBuild taks assembly, test and scripting 2018-06-21 19:56:23 -07:00
kkm a93e3d2753 Add Grpc.Tools MsBuild taks assembly, test and scripting
This is a complete set of tooling to build .proto files, with or without
gRPC services, in .csproj, both "classic" and SDK flavors, and a bare
minimum support for C++ projects.

Highlights and omissions:
 * By default, generated files are placed into project's intermediate
   directory under obj/, and treated as temporary generated sources.
 * The projects are highly customizabe thorugh item metadata on Protobuf
   items.
 * SDK projects only use Visual Studio new build system, and automatically
   import XAML property sheets that allow setting per-file properties,
   such as generated file access, and whether to expect gRPC outputs, from
   VS properties windows. This possibly requires VS restart after the
   package is added to solution. Classic projects cannot be extended this
   way, and only show Protobuf as the possible item; settings are modified
   by editing the project only.
 * For C++ projects, only the tool and standard proto import paths are
   provided, no custom targets yet. This is in the works.
 * gRPC and Protobuf scripts are separate, and everything is programmed to
   easily split the Tools package into one for Google.Protobuf and another
   for Grpc.Tools. This requires tighter coordination between the teams.
 * The tasks DLL knows about gRPC. I tried to use it to support gRPC in a
   script-only fashion, but using the tasks results in much cleaner
   scripts. This is probably how it should remain.
 * In multitarget projects (multiple frameworks) protoc files are compiled
   for each target, and also for Debug/Release configuration sepatately. A
   possible fix is in the works, but requries some MsBuild tooling fixes,
   so it will take a while.
 * There are 4 tasks. The "smart" task predicts protoc outputs, and knows
   things about protoc naming conventions. This supports only C# and C++.
   The "dumb" task simply invokes protoc in a language-independent way,
   and supports all languages known to protoc. In the (not very likely)
   case protoc is used with MsBuild for these languages, instructions for
   extending the build is provided in build script comments. The other 2
   tasks are one to detect current platform and therefore tools paths, and
   another to read protoc generated dependency file. We use it for C#, but
   custom project may opt not to use the dependecy files.
 * 64-bit tools for Windows (protoc and grpc plugin exe) have been removed
   from package, as Windows is alsways able to run 32-bit executable (and
   they are smaller and faster, and always preferred when 2G address space
   is enough).
2018-06-21 19:56:23 -07:00