-
Notifications
You must be signed in to change notification settings - Fork 285
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
Refine external reader API #762
Conversation
* Encapsulate message transport by removing `ExternalReaderProcess.getTransport` and adding `getModuleResolver` and `getResourceResolver` methods * Reuse `Random` instances within `ExternalReaderProcessImpl` and module/resource resolvers * Externalize all `ExternalReaderProcessException` messages * Add some missing doc comments to `ModuleKeyFactories` and `ResourceReaders` methods for external readers * Move org.pkl.core.util.Readers to org.pkl.core.Readers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good cleanups!
@HT154 Did you consider addressing this one?
Perhaps I'm missing something, but a high-level user-facing API that exports a low-level internal API is a grave breach of modularity. One more idea: Last but not least, I thought about renaming |
@translatenix Yup, needed some more time to chew on these
The only way I can think of to do this is to move
I don't feel too strongly about this, but happy to take it on if there's desire from the core team.
I am planning on opening a separate PR for this tomorrow. |
One way to hide types from the Then, have record This refactor sounds reasonable, so, go for it @HT154.
Yeah
I'm going to zag here. It's meant for external spawning processes, so, I actually think this is a good name. |
Thanks to @translatenix for identifying these in #759. This is the subset of items that were either low-hanging fruit or definitely need be addressed before this becomes public API.
ExternalReaderProcess.getTransport
and addinggetModuleResolver
andgetResourceResolver
methodsRandom
instances withinExternalReaderProcessImpl
and module/resource resolversExternalReaderProcessException
messagesModuleKeyFactories
andResourceReaders
methods for external readersorg.pkl.core.util.Readers
toorg.pkl.core.Readers