Hygiene: Add MESSAGE_STORAGE. No leak Uint32/64 - #91
Open
jonahbeckford wants to merge 2 commits into
Open
jonahbeckford wants to merge 2 commits into
jonahbeckford wants to merge 2 commits into
Conversation
Two hygiene changes: - Expose module type `MESSAGE_STORAGE` which was used as a `Capnp.Message.Make` functor parameter but was previously hidden in `Capnp__MessageStorage.S`. - Stop leaking `Uint32` and `Uint64` in module types.
jonahbeckford
force-pushed
the
expose-public-types
branch
2 times, most recently
from
November 15, 2024 22:09
7e37b41 to
51e15f2
Compare
Capnp.MessageSig.S is public (aka. part of wrapped capnp.ml), and has a ListStorage module. But ListStorage.t has a storage_type field of type 'Capnp.MessageSig.ListStorageType.t' that is not public. This commit makes ListStorageType public.
jonahbeckford
force-pushed
the
expose-public-types
branch
from
November 15, 2024 22:25
51e15f2 to
ce51e36
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three hygiene changes:
MESSAGE_STORAGEwhich was used as aCapnp.Message.Makefunctor parameter but was previously hidden in
Capnp__MessageStorage.S. (I say "hidden" becauseMessageStorageis not being exported by thecapnp.mlwrapper, so a user has to hack into Dune internals to get access to theSmodule type.)Uint32andUint64in module types.ListStorageType. TheCapnp.MessageSig.Sis public (aka. part of wrapped capnp.ml) and has a ListStorage module. But ListStorage.t has a storage_type field of typeCapnp.MessageSig.ListStorageType.tthat was not public.The first one is important since my MlFront analysis tool has a security posture that does not allow external access to double underscore (private) modules.
The second one is part of a broader issue that there are few
.mlifiles incapnp-ocaml. That means unnecessary modules, types and values leak. This PR only addresses the one leak that is very visible to me.The third one is similar to the first one.