Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate dot after enum's namespace in typescript file when using dot in package name #1284

Closed
johejo opened this issue Sep 26, 2022 · 5 comments · Fixed by #1286
Closed

Comments

@johejo
Copy link

johejo commented Sep 26, 2022

related #1271

#1278 breaks the package name includes dot.

$ tree
.
├── child
│   └── enum.proto
└── test.proto

1 directory, 2 files

test.proto

syntax = "proto3";

import "child/enum.proto";

package test;

message HelloRequest {
    child.DocEnum doc = 1;
}

child/enum.proto

syntax = "proto3";

package test.child;

enum DocEnum {
    DOC_ENUM_PDF = 0;
    DOC_ENUM_HTML = 1;
}
$ protoc-gen-grpc-web --version
protoc-gen-grpc-web 1.4.0
protoc -I=. *.proto --plugin=/path/to/protoc-gen-js --plugin=/path/to/protoc-gen-grpc-web --js_out=import_style=commonjs:. --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:.
import * as jspb from 'google-protobuf'

import * as child_enum_pb from './child/enum_pb';


export class HelloRequest extends jspb.Message {
  getDoc(): child_enum_pb..DocEnum;
  setDoc(value: child_enum_pb..DocEnum): HelloRequest;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): HelloRequest.AsObject;
  static toObject(includeInstance: boolean, msg: HelloRequest): HelloRequest.AsObject;
  static serializeBinaryToWriter(message: HelloRequest, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): HelloRequest;
  static deserializeBinaryFromReader(message: HelloRequest, reader: jspb.BinaryReader): HelloRequest;
}

export namespace HelloRequest {
  export type AsObject = {
    doc: child_enum_pb..DocEnum,
  }
}
@augi
Copy link
Contributor

augi commented Sep 26, 2022

Hello, we are observing exactly the same issue 🙏

@sampajano
Copy link
Collaborator

@johejo @augi Thanks so much for reporting this issue! I'll take a look and provide a fix release soon!

@augi
Copy link
Contributor

augi commented Sep 27, 2022

Thank you very much for the quick fix! 👍
When can we expect a new release, please? 🙏

@sampajano
Copy link
Collaborator

sampajano commented Sep 27, 2022

Thank you very much for the quick fix! 👍 When can we expect a new release, please? 🙏

You're very welcome.. And yes of course.. No later than end of day tomorrow! 😃

@sampajano
Copy link
Collaborator

sampajano commented Sep 28, 2022

@augi Hi FYI I've cut a new release containing the bug fix here: https://github.com/grpc/grpc-web/releases/tag/1.4.1

Thanks again for the support! :)

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

Successfully merging a pull request may close this issue.

3 participants