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.
incidental
refs: agoric-labs/vstorage-viewer#2
Description
In the course of working on agoric-labs/vstorage-viewer#3 it was hard to work with an async
makeVstorageKit
. It was async because construction of the kit required fetching a bunch of data from vstorage to populateagoricNames
.That concern is a higher level than vstorage so this pulls it out. That allows
makeVstorageKit
to be synchronous.I added a test of
makeAgoricNames
both before and after.Eventually I think something should make it easy to make an AgoricNamesKit that wraps
VstorageKit
the wayVstorageKit
wrapsVstorage
. In hindsight I might have saved a bunch of refactoring if I'd done that in this PR. But it's done now and this way we can be more intentional aboutAgoricNamesKit
.Security Considerations
none
Scaling Considerations
none
Documentation Considerations
not documented but this will make it less complex
Testing Considerations
new test
While refactoring, tsc really let me down by not detecting destuctured properies that were no longer on the source object. I suppose our settings aren't strict enough. I enabled
noImplicitAny
to detect those (by then filtering for makeVstorageKit)Upgrade Considerations
n/a