-
Notifications
You must be signed in to change notification settings - Fork 214
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(types): coreEvalEnv #8666
feat(types): coreEvalEnv #8666
Conversation
8ecd3a1
to
15528f5
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.
This looks really handy.
Of all my comments, Pick<Console, ...>
is the one I suggest is worth making a change for.
re Upgrade Considerations: this becomes practically available for MN2 devs only once it's published to npm as part of our release process, right?
// endowments | ||
var VatData: VatData; | ||
var assert: Assert; | ||
var console: Console; |
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.
these things do run on XSnap, so it seems like these should be included:
Base64: globalThis.Base64, // Present only on XSnap
URL: globalThis.URL, // Absent only on XSnap
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.
ah. not URL
and leaving Base64
undocumented seems OK, I guess.
// endowments | ||
var VatData: VatData; | ||
var assert: Assert; | ||
var console: Console; |
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.
The implementation provides a ses VirtualConsole. Is this Console
type identical?
Boy is that hard to tell.
To be conservative, maybe Pick<Console, 'debug' | 'log' | 'info' | 'warn' | 'error'>
is best?
The rest are noops or reduce to these.
|
||
// endowments | ||
var VatData: VatData; | ||
var assert: Assert; |
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.
What does this Assert
refer to? github finds such a type in @agoric/assert
... which seems to be a copy of a type in endo. OK, whatever.
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.
It's getting the global one. I'll specify it's from ses
var VatData: VatData; | ||
var assert: Assert; | ||
var console: Console; | ||
} |
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.
we're leaving allPowers.modules
undocumented on purpose?
agoric-sdk/packages/vats/src/core/boot-chain.js
Lines 17 to 20 in ba3b776
const modules = { | |
behaviors: { ...behaviors }, | |
utils: { ...utils }, | |
}; |
this comment got lost somehow
yes... near https://docs.agoric.com/guides/coreeval/proposal.html |
tsc is complaining about redefinition. maybe a bug but this workaround is clean.
15528f5
to
6bb6744
Compare
Yep, it should be available as a |
6bb6744
to
d17ce00
Compare
d17ce00
to
3764eee
Compare
@dckc I had to amend the PR because in CI the file reference was looking for What I did instead was change the filename to kebab case. Probably better anyway. I tried moving it to the package root so it's not a deep import, but that messed ran into the difference between the eslint and tsconfigs so I backed off. I figure we revisit when we eliminate deep imports from packages. |
closes: #8643
Description
Provides a typedef file that puts into
global
env what is available within a Core-EvalEslint still needs to have the globals declared. I looked into the
eslint-env
directive, but that appears not to be extensible and is going away in v9 anyway.Security Considerations
n/a
Scaling Considerations
n/a
Documentation Considerations
Something to put into docs.agoric.com?
Testing Considerations
CI
Upgrade Considerations
n/a