question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

marshal: Allow promise stand-ins

See original GitHub issue

The agoric-sdk kernel needs to transform marshaled messages, preferably while respecting their encoding by using standard marshal interfaces. But doing so effectively requires opaque treatment of remotables and promises, which is not currently possible with smallcaps because it maintains an encoding-level distinction between the two classes and requires that the latter correspond with actual ECMAScript Promise instances.

Proposed solution: Update passStyleOf to support ersatz promises like { [PASS_STYLE]: 'promise' }, allowing convertValToSlot and convertSlotToVal functions to utilize such objects in place of native promises. How much state they should be allowed to carry is an open question, but my initial inclination is to either prohibit it entirely or to have it match what can be carried by a native promise (e.g., the { status: 'fulfilled', value: any } | { status: 'rejected', reason: any } objects from Promise.allSettled.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
FUDCocommented, Oct 11, 2022

that would make difficult (impossible without extra hooks?) for LiveSlots to be able to adopt ersatz promise created from thin air by user code.

I think that’s a feature, not a bug. I don’t think we want anyone to try to use one of these ersatz promises as an actual promise. The whole point is to be able to roundtrip from unserialization to serialization without the intermediate entity being usable as anything other than a (mostly) opaque token.

1reaction
erightscommented, Oct 11, 2022

Requirement: E and E.when must work on these somehow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

U. S. Marshals Service Policy Directives - General Management
The authority and responsibilities of the United States Marshals Service districts, divisions, and offices, including Associate Directors, United States.
Read more >
LaLiga Promises Torneo Fútbol Sub-12 2022 PAMESA ...
Every year the young promises of world soccer of the best teams in the world face each other ... 2022 PAMESA LaLiga Promises...
Read more >
Roger Marshall - Ballotpedia
Marshall said he had delivered on the three promises he made when elected to Congress: “Get Kansas a seat back on the Agriculture...
Read more >
gs0082.pdf - OPM
These standards provide guides for classifying nonsupervisory deputy marshal positions only. The General Schedule Supervisory Guide should ...
Read more >
INSTRUCTIONS FOR COMPLETING THE MARSHAL ...
It is very important to accurately complete the Marshal's form according to the instructions below. If you do not complete the form, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found