Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132847

Failing to compile well-known type Empty

    XMLWordPrintable

Details

    • Windows

    Description

      Using the well-known Empty message (google.protobuf.Empty) as an input message type fails to generate code properly resulting an error during compile with the following .proto file content:

      syntax = "proto3";
      package version
      import "google/protobuf/empty.proto";
      service VersionCtl {
      rpc VersionCheck(google.protobuf.Empty) returns (google.protobuf.Empty);
      } 

      The build error:

      ..\out\build\version.qpb.h(7): fatal error C1083: Cannot open include file: 'google/protobuf/empty.qpb.h': No such file or directory 

      Other types work correctly.

       

      As a workaround one can define an empty message into the .proto file as follows:

      syntax = "proto3";
      package version;
      import "google/protobuf/empty.proto";
      message Message {}
      service VersionCtl {
      rpc VersionCheck(google.protobuf.Empty) returns (google.protobuf.Empty);
      } 

      But this is a compatibility issue because the change must be made into the .proto file and that impacts other non-Qt client builds.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            semlanik Alexey Edelev
            tiheikka Titta Heikkala
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes