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

docs(pegasus): Remote<T> -> ERef<T> for board, namesByAddress #9135

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dckc
Copy link
Member

@dckc dckc commented Mar 25, 2024

refs: #9027, #8852 , Agoric/documentation#1031

Description / Documentation Considerations

yarn build-ts was reporting type errors; that interferes with work on reference docs.

It's not clear to me nor to @turadg why yarn lint was not reporting errors.

Security / Scaling / Testing / Upgrade Considerations

I looked for any reason namesByAddress or board couldn't be a promise; for example, if they were in an exo state and hence in durable storage. I didn't see any.

`yarn build-ts` was reporting type errors; that interferes with
work on reference docs.

It's not clear why `yarn lint` was not reporting errors.
@dckc dckc requested review from michaelfig and iomekam March 25, 2024 17:54
@michaelfig
Copy link
Member

This seems to indicate the need for another type:

/**
 * @template T
 * @typedef {import('@endo/far').ERef<import('@agoric/vow').Remote<T>>} ERemote
 * A promise for a potentially remote object (an "eventual remote object"),
 * or just a non-promise immediate reference (presence) for a remote object.
 */

The expansion is thus:

  • ERemote<...>
  • ERef<Remote<...>>
  • Remote<...> | PromiseLike<Remote<...>>

@iomekam, would you be able to pick up this change? If not, I could probably get it done tomorrow.

@dckc
Copy link
Member Author

dckc commented Mar 28, 2024

@michaelfig maybe we want to constrain the interface so that these are not promises in order to make it easier to make pegasus durable / upgradable later?

@dckc
Copy link
Member Author

dckc commented Mar 28, 2024

@michaelfig maybe we want to constrain the interface so that these are not promises in order to make it easier to make pegasus durable / upgradable later?

After some discussion, we agreed I should close this on that basis.

I want to think about what other type change I should make to make the doc gen tool happy instead 1st.

@dckc dckc marked this pull request as draft March 28, 2024 19:28
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

Successfully merging this pull request may close these issues.

3 participants