Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Trying to run with protobuf-gradle plugin failed to compile #134

Open
Rustem opened this issue Dec 16, 2022 · 0 comments
Open

Trying to run with protobuf-gradle plugin failed to compile #134

Rustem opened this issue Dec 16, 2022 · 0 comments

Comments

@Rustem
Copy link

Rustem commented Dec 16, 2022

I think it fails specifically for google.protobuf folder that contains protobuf definitions. See the stack trace for more information.
Screen Shot 2022-12-16 at 3 41 37 PM

Plugin: https://github.com/google/protobuf-gradle-plugin/

build.gradle

dependencies {
   protobuf project(":project-contains-protobuf")
}
protobuf {
    generatedFilesBaseDir = "$projectDir/generated"
    protoc {
        artifact = "com.google.protobuf:protoc:$protobufVersion"
//        path = '/usr/local/bin/protoc'
    }
    plugins {
        jsonschema {
            path = "/Users/rkamun/Downloads/protoc-gen-jsonschema/bin/protoc-gen-jsonschema"
        }
    }
    generateProtoTasks {
        all().each { task ->
            task.builtins {
                // In most cases you don't need the full Java output
                // if you use the lite output.
                remove java
            }

            task.plugins {
                jsonschema {
                    option "prefix_schema_files_with_package"
                    outputSubDir = 'definitions'
//                    generatedFilesBaseDir="$projectDir/src/main/definitions"
                }
            }
        }

//        copyDefinitions.dependsOn(generateProto)
    }
}

stacktrace.log

Stack trace (Last 500):

protoc: stdout: . stderr: orders/ShippingInfo.proto:6:1: warning: Import google/protobuf/timestamp.proto is unused.
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/BDecimal.json msg_name=BDecimal proto_filename=Types.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/BInteger.json msg_name=BInteger proto_filename=Types.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/SupportCase.json msg_name=SupportCase proto_filename=Types.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/DoubleValue.json msg_name=DoubleValue proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/FloatValue.json msg_name=FloatValue proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Int64Value.json msg_name=Int64Value proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/UInt64Value.json msg_name=UInt64Value proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Int32Value.json msg_name=Int32Value proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/UInt32Value.json msg_name=UInt32Value proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/BoolValue.json msg_name=BoolValue proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/StringValue.json msg_name=StringValue proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/BytesValue.json msg_name=BytesValue proto_filename=wrappers.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/CancelRequest.json msg_name=CancelRequest proto_filename=CIPCancel.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/CancelResponse.json msg_name=CancelResponse proto_filename=CIPCancel.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/UnlinkRequest.json msg_name=UnlinkRequest proto_filename=CIPUnlink.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/UnlinkResponse.json msg_name=UnlinkResponse proto_filename=CIPUnlink.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=package/RefundRequest.json msg_name=RefundRequest proto_filename=DevRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=package/RefundResponse.json msg_name=RefundResponse proto_filename=DevRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=package/RefundabilityRequest.json msg_name=RefundabilityRequest proto_filename=DevRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=package/RefundabilityResponse.json msg_name=RefundabilityResponse proto_filename=DevRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/Request.json msg_name=Request proto_filename=DeveloperInAppRefundLookup.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/Response.json msg_name=Response proto_filename=DeveloperInAppRefundLookup.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/InAppPurchaseRefund.json msg_name=InAppPurchaseRefund proto_filename=DeveloperInAppRefundLookup.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model.refund/RefundRequest.json msg_name=RefundRequest proto_filename=HardwareSubscriptionRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model.refund/PliInfo.json msg_name=PliInfo proto_filename=HardwareSubscriptionRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model.refund/PliComponentInfo.json msg_name=PliComponentInfo proto_filename=HardwareSubscriptionRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model.refund/RefundResponse.json msg_name=RefundResponse proto_filename=HardwareSubscriptionRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/Account.json msg_name=Account proto_filename=Account.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model.inapps/Request.json msg_name=Request proto_filename=LookupAccountsByInAppAccountToken.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model.inapps/Response.json msg_name=Response proto_filename=LookupAccountsByInAppAccountToken.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/MetcalfIssueStoreCreditRequest.json msg_name=MetcalfIssueStoreCreditRequest proto_filename=MetcalfStoreCredit.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/TradeInInfo.json msg_name=TradeInInfo proto_filename=MetcalfStoreCredit.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/MetcalfIssueStoreCreditResponse.json msg_name=MetcalfIssueStoreCreditResponse proto_filename=MetcalfStoreCredit.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for stand-alone ENUM" enum_name=RefundError jsonschema_filename=package/RefundError.json proto_filename=Enums.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for stand-alone ENUM" enum_name=CancellationSource jsonschema_filename=package/CancellationSource.json proto_filename=Enums.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=package/SubscriptionRefundRequest.json msg_name=SubscriptionRefundRequest proto_filename=SubscriptionRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=package/SubscriptionRefundResponse.json msg_name=SubscriptionRefundResponse proto_filename=SubscriptionRefund.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/SupportCommentRequest.json msg_name=SupportCommentRequest proto_filename=SupportComment.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=com.apple.amp.commerce.support.model/SupportCommentResponse.json msg_name=SupportCommentResponse proto_filename=SupportComment.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=support.common/ApiStatus.json msg_name=ApiStatus proto_filename=ApiStatus.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=support.common/BigDecimalProto.json msg_name=BigDecimalProto proto_filename=BigDecimalProto.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=support.common/SupportAgentContext.json msg_name=SupportAgentContext proto_filename=SupportAgentContext.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Timestamp.json msg_name=Timestamp proto_filename=timestamp.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=support.common/SupportComment.json msg_name=SupportComment proto_filename=SupportComment.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Any.json msg_name=Any proto_filename=any.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/SourceContext.json msg_name=SourceContext proto_filename=source_context.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Type.json msg_name=Type proto_filename=type.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Field.json msg_name=Field proto_filename=type.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Enum.json msg_name=Enum proto_filename=type.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/EnumValue.json msg_name=EnumValue proto_filename=type.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Option.json msg_name=Option proto_filename=type.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Api.json msg_name=Api proto_filename=api.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Method.json msg_name=Method proto_filename=api.proto
  time="2022-12-16T15:41:21-08:00" level=info msg="Generating JSON-schema for MESSAGE" jsonschema_filename=google.protobuf/Mixin.json msg_name=Mixin proto_filename=api.proto
  runtime: goroutine stack exceeds 1000000000-byte limit
  runtime: sp=0xc14b5003b8 stack=[0xc14b500000, 0xc16b500000]
  fatal error: stack overflow

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant