Giter VIP home page Giter VIP logo

Comments (6)

semlanik avatar semlanik commented on July 28, 2024 1

Sorry, all activities are temporary frozen, because of the migration to Qt6. I will try to cover this ASAP. :(

from qtprotobuf.

Eijebong avatar Eijebong commented on July 28, 2024

Just ran into this, any progress?

from qtprotobuf.

glaubnichtalles avatar glaubnichtalles commented on July 28, 2024

Hello,

have also encountered the problem described here and would like to add the following information. From version 3.12 and up to version 3.15 protoc still needs the addition of --experimental_allow_proto3_optional, which is unfortunately not supported with Qt6 using qt_add_protobuf.

Unable to execute /usr/bin/protoc:(1) xxx.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.

A workaround here is to edit the file lib/cmake/Qt6ProtobufTools/Qt6ProtobufToolsMacros.cmake

    string(JOIN "\\$<SEMICOLON>" protoc_arguments
        "--plugin=protoc-gen-${generator}=${generator_file}"
        "--${generator}_out=${tmp_output_directory}"
        "--${generator}_opt=${generation_options_string}"
        "${proto_files_string}"
        "${proto_includes_string}"
        "--experimental_allow_proto3_optional"
    )

Following this, one comes very close to the problem described here, since the error message that now arises is identical.

Unable to execute /usr/bin/protoc:(1) xxx.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-qtprotobufgen hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.

More information about supporting optional can be found in the protobuf repository and I would start by implementing the method uint64_t GetSupportedFeatures() const override in generatorbase.h

King regards

from qtprotobuf.

semlanik avatar semlanik commented on July 28, 2024

Hi, @glaubnichtalles the 'optional' fields support is planned for Qt6: QTBUG-103978

Unfortunately I don't plan any backporting from Qt6 to this repo because of complexity.

from qtprotobuf.

arietto avatar arietto commented on July 28, 2024

Hi, I can't open https://bugreports.qt.io/browse/QTBUG-103978 even after login. The problem does exist in Qt 6.5.1 and Qt 6.6.0 (beta).

from qtprotobuf.

glaubnichtalles avatar glaubnichtalles commented on July 28, 2024

Hi, thanks for the development regarding "Optional fields" support. My latest tests with Qt 6.6.0 beta 3 show that there are problems with the use of reserved c++ keywords. It would be great if for example the following entries could be added to the tests for the proto files:

optional bool private = 13; optional bool public = 42;

Kind reagrds

from qtprotobuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.