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

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

Merged
merged 1 commit into from
Mar 26, 2023

Conversation

reddaly
Copy link
Contributor

@reddaly reddaly commented Jan 9, 2023

Replaces #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
Copy link

linux-foundation-easycla bot commented Jan 9, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: reddaly / name: Red Daly (c137e11)

Copy link
Collaborator

@sampajano sampajano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reddaly Hi! Thanks again for the change!

@reddaly
Copy link
Contributor Author

reddaly commented Jan 9, 2023

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

@sampajano
Copy link
Collaborator

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
Copy link

linux-foundation-easycla bot commented Mar 25, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: reddaly / name: Red Daly (c137e11)
  • ✅ login: gonzojive / name: Red Daly (3672778)

@gonzojive gonzojive force-pushed the proto-import-comment branch from 3672778 to 63d8bea Compare March 25, 2023 17:02
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:

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

After:

```js
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"
```
@gonzojive gonzojive force-pushed the proto-import-comment branch from 64b1859 to 81b1569 Compare March 25, 2023 17:03
@gonzojive
Copy link
Contributor

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
Copy link
Collaborator

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! 😃

@sampajano sampajano merged commit e4084fd into grpc:master Mar 26, 2023
gonzojive added a commit to gonzojive/grpc-web that referenced this pull request Apr 15, 2023
…t path.

grpc#1313 updated the code generator to print a
"proto import: "foo/bar.proto" suffix for each import statement for the
generated gRPC-web client code. This commit updates ensures the .d.ts file
output by grpc-web contains the same type of comments.
gonzojive added a commit to gonzojive/grpc-web that referenced this pull request Apr 15, 2023
…t path.

grpc#1313 updated the code generator to print a
"proto import: "foo/bar.proto" suffix for each import statement for the
generated gRPC-web client code. This commit updates ensures the .d.ts file
output by grpc-web contains the same type of comments.
gonzojive added a commit to gonzojive/grpc-web that referenced this pull request Apr 15, 2023
…t path.

grpc#1313 updated the code generator to print a
`proto import: "foo/bar.proto"` suffix for each import statement for the
generated gRPC-web client code. This commit updates ensures the .d.ts file
output by grpc-web contains the same type of comments.
gonzojive added a commit to gonzojive/grpc-web that referenced this pull request Oct 2, 2023
sampajano pushed a commit that referenced this pull request Oct 5, 2023
…t path. (#1330)

#1313 updated the code generator to print a
`proto import: "foo/bar.proto"` suffix for each import statement for the
generated gRPC-web client code. This commit updates ensures the .d.ts file
output by grpc-web contains the same type of comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants