From 29ae7173548427f5585a008ac25e6f8f0c782056 Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Sun, 14 Jan 2024 13:22:29 -0800 Subject: [PATCH] fix: review suggestions --- packages/base-zone/README.md | 2 ++ packages/store/README.md | 27 +-------------------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/packages/base-zone/README.md b/packages/base-zone/README.md index 19db353c0d91..8d67f6eaa37f 100644 --- a/packages/base-zone/README.md +++ b/packages/base-zone/README.md @@ -8,4 +8,6 @@ a vat upgrade (durable). This library is used internally by [`@agoric/zone`](../zone/README.md); refer to it for more details. Unless you are an author of a new Zone backing store type, or want to use `makeHeapZone` without introducing build dependencies on `@agoric/vat-data`, you should instead use `@agoric/zone`. +--- + Be aware that both this package `@agoric/base-zone` and `@agoric/store` will move from the agoric-sdk repository to the endo repository and likely renamed `@endo/zone` and `@endo/store`. At that time, we will first deprecate the versions here, then replace them with deprecated stubs that reexport from their new home. We hope to eventually remove even these stubs, depending on the compat cost at that time. diff --git a/packages/store/README.md b/packages/store/README.md index ba0996141f68..f4ce46def29b 100644 --- a/packages/store/README.md +++ b/packages/store/README.md @@ -22,31 +22,6 @@ Store adds some additional functionality on top of Map. See `makeScalarWeakMapStore` for the wrapper around JavaScript's WeakMap abstraction. -# External Store - -An External Store is defined by its maker function, and provides abstractions -that are compatible with large, synchronous secondary storage that can be paged -in and out of local memory. - -```js -import { makeExternalStore } from '@agoric/store'; - -// Here is us defining an instance store for 'hello' objects. -const estore = makeExternalStore((msg = 'Hello') => ({ - hello(nickname) { - return `${msg}, ${nickname}!`; - }, -})); - -const h = estore.makeInstance('Hi'); -h.hello('friend') === 'Hi, friend!'; -const wm = estore.makeWeakMap('Hello object'); -wm.init(h, 'data'); -// ... time passes and h is paged out and reloaded. -wm.get(h) === 'data'; -wm.set(h, 'new-data'); -// ... time passes and h is paged out and reloaded. -map.delete(h); -``` +--- Be aware that both `@agoric/base-zone` and this package `@agoric/store` will move from the agoric-sdk repository to the endo repository and likely renamed `@endo/zone` and `@endo/store`. At that time, we will first deprecate the versions here, then replace them with deprecated stubs that reexport from their new home. We hope to eventually remove even these stubs, depending on the compat cost at that time.