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

WIP encapsulate marshal error kludgery #997

Closed
wants to merge 2 commits into from

Conversation

erights
Copy link
Contributor

@erights erights commented Jan 20, 2022

DO NOT MERGE: Based on an ancient master, and probably needs redoing anyway.

Fixes Agoric/agoric-sdk#4310

Please review at this stage, even though it is a WIP Draft. This is because of the need to manage the version skew between the endo repository and agoric-sdk. The API change in this PR is an incompatible break, which needs coordination this PR does not yet provide. But I'd like to postpone thinking about that until we agree on an API that is otherwise good.

@erights erights requested a review from mhofman January 20, 2022 08:10
@erights erights self-assigned this Jan 20, 2022
@erights erights force-pushed the 4310-markm-refactor-marshalSaveError branch 2 times, most recently from db9b58f to 3503e28 Compare January 24, 2022 21:40
Copy link
Member

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

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

The direction here seems generally fine and I like the idea of having an error saver hook. I believe next steps include proposing an Agoric SDK PR that vets the necessary changes to integrate.

Comment on lines +151 to +226
errorId,
message: `${err.message}`,
name: `${err.name}`,
Copy link
Member

Choose a reason for hiding this comment

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

Nit, errorId instead of simply id implies the latter messages should be qualified errorMessage and errorName. I think id would suffice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that I'm now trying to stay compat with existing clients, I don't see a good and painless way to change this.

Comment on lines 123 to 131
marshalSaveError: makeMarshalSaveError({
marshalName: `captp:${ourId}`,
// TODO Temporary hack.
// See https://github.com/Agoric/agoric-sdk/issues/2780
errorIdNum: 20000,
}),
Copy link
Member

Choose a reason for hiding this comment

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

If this is the breaking change, I think we could coerce {marshalName, errorIdNum} up to an error saver for a smoother migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have now engineered things for a smoother migration. But I don't understand how my changes relate to your suggestion.

@erights erights force-pushed the 4310-markm-refactor-marshalSaveError branch 5 times, most recently from 594af95 to f7cb976 Compare March 24, 2022 02:42
@erights
Copy link
Contributor Author

erights commented Mar 24, 2022

I have now enhanced it to be compatible with users of the old interface. The adaptation was ugly, but worth it avoid a more painful upgrade dance. It is now ready for review.

@erights erights marked this pull request as ready for review March 24, 2022 04:15
@erights erights requested a review from kriskowal March 24, 2022 04:16
@erights erights force-pushed the 4310-markm-refactor-marshalSaveError branch 2 times, most recently from 37f3a60 to db15585 Compare April 5, 2022 07:15
@erights
Copy link
Contributor Author

erights commented Apr 9, 2022

ping

@erights erights force-pushed the 4310-markm-refactor-marshalSaveError branch from 051ed0a to bd234a9 Compare August 27, 2022 22:02
@erights erights marked this pull request as draft August 27, 2022 22:38
@erights
Copy link
Contributor Author

erights commented Jun 6, 2023

If we try to do this again, we should start a new PR. Closing this one as fatally stale.

@erights erights closed this Jun 6, 2023
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.

Expose marshal's errorId
2 participants