Conversation
krisbitney
left a comment
There was a problem hiding this comment.
This is very impressive and cool to see!!
Unfortunately, I wasn't able to build it. It looks like it depends on pwr CLI, but it isn't available in the Docker image.
#11 [7/7] RUN /bin/bash -i -c "pwr js build -f ./wrap.js -o build"
#11 0.063 bash: cannot set terminal process group (1): Inappropriate ioctl for device
#11 0.063 bash: no job control in this shell
#11 0.066 bash: pwr: command not found
#11 ERROR: process "/bin/sh -c /bin/bash -i -c \"pwr js build -f ./wrap.js -o build\"" did not complete successfully: exit code: 127
------
> [7/7] RUN /bin/bash -i -c "pwr js build -f ./wrap.js -o build":
0.063 bash: cannot set terminal process group (1): Inappropriate ioctl for device
0.063 bash: no job control in this shell
0.066 bash: pwr: command not found
------
Dockerfile:14
--------------------
12 | COPY ./bundled/wrap.js ./wrap.js
13 | # Use pwr to build the script
14 | >>> RUN /bin/bash -i -c "pwr js build -f ./wrap.js -o build"
--------------------
ERROR: failed to solve: process "/bin/sh -c /bin/bash -i -c \"pwr js build -f ./wrap.js -o build\"" did not complete successfully: exit code: 127
| "scripts": { | ||
| "bundle": "rollup -c", | ||
| "codegen": "polywrap codegen --verbose", | ||
| "build": "yarn bundle && npx polywrap build --no-codegen --strategy=image", |
There was a problem hiding this comment.
Let's add yarn codegen to the yarn build script?
yarn codegen && yarn bundle && npx polywrap build --no-codegen --strategy=image
| @@ -0,0 +1 @@ | |||
| # TS Wrap Template | |||
There was a problem hiding this comment.
Since TS wraps work a bit differently, it would be nice to get some brief explanation of the nuances here (or a link to docs).
| const textEncoderShims = require("./textEncoder"); | ||
| const msgpackShims = require("./msgpack"); | ||
|
|
||
| const packagesShim = ` |
There was a problem hiding this comment.
For jetbrains IDEs, it's helpful to annotate strings that contain code with a comment indicating the language:
// language=javascript
const packagesShim = `
...This provides syntax highlighting etc.
If it doesn't hurt anything for vs code users, could we add the comment here?
| } | ||
|
|
||
| //HACK: remove this once codegen is fixed | ||
| const __old_subinvoke = __wrap_subinvoke; |
There was a problem hiding this comment.
JavaScript is a wild language 😂
| }); | ||
| } | ||
|
|
||
| const fs = { |
There was a problem hiding this comment.
A bit out of scope of this PR, I just want to suggest that we eventually hide everything but the shim declarations from users. My thought is that they should only need to worry about declaring shims, and not about the other content in this file.
No description provided.