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

[gogenproto] Allow specifying a Go package mapping for import paths #36

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

bhollis
Copy link
Collaborator

@bhollis bhollis commented Jan 24, 2024

Background

→ It may be the case that you're importing protos that are generated in some other way than with gogenproto but which similarly have a conventional Go path mapping (e.g. they don't specify go_package but instead get automatic package names. Unfortunately right now that means you can't depend on these protos from your gogenproto-using protos, since you can't tell gogenproto what their package name will be.

Changes

  • Add an optional Go package prefix mapping to import paths. By appending = and the Go package prefix, you can use conventional (directory based) path mapping.

Testing

  • Tested in stately monorepo

@drshriveer drshriveer merged commit 2f40c97 into main Jan 24, 2024
3 checks passed
@drshriveer drshriveer deleted the import-path-mapping branch January 24, 2024 22:46
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 this pull request may close these issues.

2 participants