-
Notifications
You must be signed in to change notification settings - Fork 227
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
chore(cosmic-swingset): repl.js imports getInterfaceOf/etc #2638
Conversation
Ah, well apparently dapp-svelte-wallet uses it. It looks like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the need to change the stringify API. Agreed that this could be cleaned up sometime, but I'm hesitant to make breaking changes without renaming the function.
@@ -8,7 +9,6 @@ import makeUIAgentMakers from './ui-agent'; | |||
export function stringify( | |||
value, | |||
spaces, | |||
getInterfaceOf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make an incompatible change to the API? Just rename the argument to avoid the shadowing, and default its value as in:
gio = getInterfaceOf,
and then use gio
within the stringify function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aye. I generally like to delete code when it's no longer needed, but I agree it's quicker and only slightly ugly to leave this argument in place.
.. rather than getting them from `vatPowers`, since those are going away. refs #2637
34b025c
to
293e8bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
.. rather than being given them on
vatPowers
, since those are going away.refs #2637
@michaelfig I changed
stringify
to stop accepting agetInterfaceOf
argument because eslint complained about the shadowed name. I didn't see any external importers of the file withincosmic-swingset/
, so I removed theexport
. If there are any external importers of this file, they'll need to be updated for the new signature (I removed the argument from the middle, which is always troublesome). I figured a "cannot import" error would be more obvious than whatever would happen when one argument gets confused for another. As part of your review, please think about whether there are any other importers.