You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my kotlin project I am using Arrow Optics with @optics code generation.
I am trying to use explicitApi() to publish it as a library.
But build fails with Visibility must be specified in explicit API mode in the generated code (I am using ksp).
I would suggest adding explicit visibility modifier in the generated code, e.g.
// now
inline val ... = ...
// after fix
public inline val ... = ...
// or
internal inline val ... = ...
Visibility of generated extensions can be the same as companion object visibility.
Some thoughts
Because generated code has no documentation, it makes sense to make it internal and manually provide public wrappers for some of the generated optics. But in this case, we still need to have explicit internal visibility modifier.
The text was updated successfully, but these errors were encountered:
What version are you currently using?
1.1.2
What would you like to see?
In my kotlin project I am using Arrow Optics with
@optics
code generation.I am trying to use
explicitApi()
to publish it as a library.But build fails with
Visibility must be specified in explicit API mode
in the generated code (I am using ksp).I would suggest adding explicit visibility modifier in the generated code, e.g.
Visibility of generated extensions can be the same as companion object visibility.
Some thoughts
Because generated code has no documentation, it makes sense to make it
internal
and manually providepublic
wrappers for some of the generated optics. But in this case, we still need to have explicitinternal
visibility modifier.The text was updated successfully, but these errors were encountered: