-
Notifications
You must be signed in to change notification settings - Fork 68
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
SES vs rollup #9
Comments
When can we stop using rollup, or any third party translator whose translation we don't control? How soon can we shift to our own Given the |
@erights we'll still need rollup until we can get rid of all CommonJS dependencies from the SwingSet code. Not sure how far away that is. |
3:
|
I am surprised that SES rejects (0, eval)('this')) Are you sure? |
something is complaining about |
Oh, hah, SES is snagging the |
Closing, since all is resolved. @warner feel free to reopen! 1:
|
* fix(resolve): protect against reentrancy attack Closes #9 * fix(resolve): harden argument to HandledPromise.resolve The harden calls in eventual-send already need an SES-like environment for proper security. Make HandledPromise.resolve simpler and prevent proxy trickery. * fix(HandledPromise): set prototype to Promise * fix(test-thenable): proper workaround of override mistake
I'm working on getting SwingSet to build under the new SES shim. I'm going to use this ticket to collect problems that I've run into so far. These aren't necessarily problems with SES, they may be more like ".. so don't do that" items, but we might need to figure out workarounds and include them in the docs for the benefit of programmers trying to use SES.
1:
rollup
usesMath.random()
I was surprised to see that
rollup
callingMath.random()
, which of course fails (throws adisabled
error). A function namedassignChunkColouringHashes
randomizes a list somehow. There are a pair of switches (--preserveModules
or--inlineDynamicImports
) which bypass this code, but have other effects that aren't trivial to deal with. The immediate workaround was tolockdown({ noTameMath: true })
, but of course that's only temporary.2:
rollup
usesfor .. in
instead of aMap
, fails ontoLocaleString
Rollup walks through a list of modules and adds each one to an object named
chunkModules
, using a hash of the entrypoints as the property name. It then attempts to iterate through those modules by callingfor .. in
onchunkModules
. Search rollup'sGraph.ts
forchunkModulesOrdered
to find the code.This is choking on a surprising property named
toLocaleString
. I don't think it's an own-property, but I forget the rules forfor .. in
(because it's horrible and we don't use it, of course), and why it appears when none of the other built-ins show up. We modifytoLocaleString
unlesslockdown()
is called with thenoTameDate: true
option. Setting that is the quick+temporary workaround. But we need to figure out how to tame this property while still hiding it from foolish code that usesfor .. in
instead of a properMap
.The text was updated successfully, but these errors were encountered: