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

Add ability to mark code generated for some domains to be Kotlin-internal #108

Open
dlurton opened this issue Nov 15, 2021 · 0 comments
Open

Comments

@dlurton
Copy link
Member

dlurton commented Nov 15, 2021

Currently, multiple permuted domains may exist and the generated code is entirely Kotlin public, however: the client package may wish to expose a subset of those domains as public API, or none at all.

For instance, in partiql-lang-kotlin, we might have several permuted domains:

partiql_ast -> partiql_ast_var_decl -> partiql_algebra_unindexed -> partiql_algebra -> partiql_physical

Of those, the only ones we might wish to expose as public API are: partiq_ast, partiql_algebra and partiql_physical.

partiql-lang-kotlin will need a way to mark only some of these domains as public.

Potentially, we could add syntax to the domain definition:

(define public partiql_ast (domain ...)

(define internal partiql_ast_var_decl (permute_domain ...))

This would be backward-incompatible with previous versions, but this might be unavoidable, unless we want to the default visibility to public. This is sub-optimal because users could accidentally expose generated code publicly that they did not intend.

Either:

  • The default should be internal
  • The visibility must be specified with every define.
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

No branches or pull requests

1 participant