grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.6k stars 765 forks source link

Update ES6 imports with comment about corresponding proto import path. #1313

Closed reddaly closed 1 year ago

reddaly commented 1 year ago

Replaces https://github.com/grpc/grpc-web/pull/1311, which I created with my non-corporate account. I can use the corporate account to meet the CLA requirement.

I was experiencing a long import path in the generated code that doesn't work. Outputting the proto file that corresponds to a JS import is helpful for both diagnosing the issue and writing a wrapper for altering the import path to my satisfaction.

Before:

import * as github_com_gonzojive_rules_ts_proto_example_prefix_greeting_pb from '../../../../../github.com/gonzojive/rules_ts_proto/example/prefix/greeting_pb';

After:

import * as github_com_gonzojive_rules_ts_proto_example_prefix_greeting_pb from '../../../../../github.com/gonzojive/rules_ts_proto/example/prefix/greeting_pb'; // proto import: "github.com/gonzojive/rules_ts_proto/example/prefix/greeting.proto"
linux-foundation-easycla[bot] commented 1 year ago

CLA Signed

The committers listed above are authorized under a signed CLA.

reddaly commented 1 year ago

Looks like I need to fix it up to get the build working :)

sampajano commented 1 year ago

Looks like I need to fix it up to get the build working :)

aha yes. I'll rerun the test after you've pushed a new version. thanks!

linux-foundation-easycla[bot] commented 1 year ago

CLA Signed

The committers listed above are authorized under a signed CLA.

gonzojive commented 1 year ago

Looks like I need to fix it up to get the build working :)

aha yes. I'll rerun the test after you've pushed a new version. thanks!

I believe the issue is fixed now. TFTR

sampajano commented 1 year ago

Looks like I need to fix it up to get the build working :)

aha yes. I'll rerun the test after you've pushed a new version. thanks!

I believe the issue is fixed now. TFTR

Great! The tests are passing now! Thanks so much for the change! 😃