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

feat(far): new package @agoric/far #4144

Merged
merged 1 commit into from
Dec 2, 2021
Merged

feat(far): new package @agoric/far #4144

merged 1 commit into from
Dec 2, 2021

Conversation

michaelfig
Copy link
Member

@michaelfig michaelfig commented Dec 2, 2021

closes: #3833

Description

Create a new package @agoric/far, as described in the README.md, to cover the common cases of clients of the Agoric distributed objects system.

After this toehold, a follow-on PR can convert many of our redundant:

import { E } from '@agoric/eventual-send';
import { Far, getInterfaceOf, passStyleOf } from '@agoric/marshal';

to just:

import { E, Far, getInterfaceOf, passStyleOf } from '@agoric/far';

The eventual goal is to reduce the dependencies required to implement this package.

Security Considerations

Documentation Considerations

I'd like to get @dckc's involvement to see if it helps simplify example code in https://github.com/Agoric/documentation.

Testing Considerations

Tests were lifted from @agoric/eventual-send and @agoric/marshal, and pruned to test only the features exported by this package.

@michaelfig michaelfig added eventual-send package: eventual-send marshal package: marshal labels Dec 2, 2021
@michaelfig michaelfig self-assigned this Dec 2, 2021
@dckc
Copy link
Member

dckc commented Dec 2, 2021

Hmmm... In #3833 the suggested name was far. It's shorter.

Perhaps we could even lose the @agoric/ qualifier in due course...
https://www.npmjs.com/package/far was last published 10 years ago, though it still has about 150 downloads per week. I wonder if the maintainer would cede to us.

This is clearly a user-visible feature, not just a chore.

@michaelfig michaelfig force-pushed the mfig-agoric-remoting branch 2 times, most recently from 1516aff to 41036a4 Compare December 2, 2021 15:30
@michaelfig michaelfig changed the title chore(remoting): new package chore(far): new package Dec 2, 2021
@michaelfig michaelfig changed the title chore(far): new package chore(far): new package @agoric/far Dec 2, 2021
@michaelfig michaelfig changed the title chore(far): new package @agoric/far feat(far): new package @agoric/far Dec 2, 2021
@michaelfig
Copy link
Member Author

Hmmm... In #3833 the suggested name was far. It's shorter.

👍

Perhaps we could even lose the @agoric/ qualifier in due course... https://www.npmjs.com/package/far was last published 10 years ago, though it still has about 150 downloads per week. I wonder if the maintainer would cede to us.

For branding and logical grouping of packages, I'd like to see this pushed down into @endo/far or even @jessie.js/far. I don't think it makes sense to try to publish non-namespaced packages.

This is clearly a user-visible feature, not just a chore.

Thanks, adjusted.

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exports seem to differ between index.js and the README

packages/remoting/README.md Outdated Show resolved Hide resolved
@dckc
Copy link
Member

dckc commented Dec 2, 2021

Documentation Considerations

I'd like to get @dckc's involvement to see if it helps simplify example code in https://github.com/Agoric/documentation.

yes, quite likely.

In fact, I considered consolidating the eventual-send.md and far.md sections. Keeping them separate seems ok for now.

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff.

I'm curious how much of the new package boilerplate you had to do from memory. I don't see anything about it in https://github.com/Agoric/agoric-sdk/blob/master/CONTRIBUTING.md

@michaelfig michaelfig added far Distributed object helpers automerge:no-update (expert!) Automatically merge without updates labels Dec 2, 2021

/**
* @template T
* @typedef {import('@agoric/eventual-send').EOnly<T>} EOnly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOnly<T> is sort of new to me; I'm used to ERef<T>. hm.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added comments, and good catch: this package should export ERef<T> as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, too late to beat the automerge. I'll do a follow-on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:no-update (expert!) Automatically merge without updates eventual-send package: eventual-send far Distributed object helpers marshal package: marshal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reduce boilerplate for Far and E?
2 participants