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

Make it possible to specify visibility modifiers for generated classes/methods #190

Closed
garyp opened this issue Dec 2, 2021 Discussed in #174 · 0 comments
Closed

Make it possible to specify visibility modifiers for generated classes/methods #190

garyp opened this issue Dec 2, 2021 Discussed in #174 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@garyp
Copy link
Collaborator

garyp commented Dec 2, 2021

Discussed in #174

Originally posted by itegulov November 2, 2021

Motivation

There are two main use cases that I can see for this feature:

  1. A library author that uses pbandk might want not want to expose auto-generated code to the end-users. For this, the author wants all classes generated by pbandk to have internal visibility modifier.
  2. A library author that uses pbandk and employs explicit API mode who wants to expose proto classes to the end-users. For this, the author wants all classes generated by pbandk to have public visibility modifier.
@garyp garyp added the enhancement New feature or request label Dec 2, 2021
@garyp garyp added this to the 0.13.0 milestone Dec 2, 2021
@garyp garyp self-assigned this Dec 2, 2021
garyp added a commit that referenced this issue Dec 2, 2021
…r to protoc-gen-pbandk

Added the ability to compile pbandk-generated code with Kotlin's
"explicit API" mode turned on. This requires all types/functions/etc. to
have their visibility (`public`/`internal`/`private`) explicitly
spcified and, if they're public, have their type explicitly specified.

Also added a `visibility` option for `protoc-gen-pbandk` to allow
changing the visibility of pbandk-generated code from the default
`public` visibility to `internal`.

Fixes #190.
garyp added a commit that referenced this issue Dec 2, 2021
…r to protoc-gen-pbandk

Added the ability to compile pbandk-generated code with Kotlin's
"explicit API" mode turned on. This requires all types/functions/etc. to
have their visibility (`public`/`internal`/`private`) explicitly
specified and, if they're public, have their type explicitly specified.

Also added a `visibility` option for `protoc-gen-pbandk` to allow
changing the visibility of pbandk-generated code from the default
`public` visibility to `internal`.

Fixes #190.
@garyp garyp closed this as completed in 58f7879 Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant