Robuuster returns in javascript.
This commit is contained in:
@@ -76,42 +76,46 @@ Use this prompt when asking ChatGPT to make a new Racket module or extend this
|
||||
one:
|
||||
|
||||
```text
|
||||
Work on a Racket module/package in a version-locked buildmap.
|
||||
Work on a Racket module/package in a versioned build directory.
|
||||
|
||||
Important:
|
||||
- Always create a new subdirectory for the release, for example
|
||||
- Always create a new subdirectory for the deliverable, for example
|
||||
/mnt/data/<project>-build-NNN/<collection-name>.
|
||||
- Do not work directly in /mnt/data with individual files of the same name;
|
||||
avoid version confusion by copying/patching everything into that buildmap.
|
||||
- Keep the package structure consistent:
|
||||
- Do not work directly in /mnt/data with loose files that have the same names;
|
||||
avoid version confusion by copying and patching everything inside that build
|
||||
directory.
|
||||
- Keep the package structure stable:
|
||||
- main.rkt for the public module;
|
||||
- testing/ for test infrastructure and regression tests;
|
||||
- demo/ for demonstration files;
|
||||
- info.rkt for package metadata and test entry points.
|
||||
- Adjust require paths to match that structure before testing.
|
||||
- Adjust require paths to that structure before testing.
|
||||
- Test with Racket itself, for example:
|
||||
/tmp/racket/bin/raco make <collection>/main.rkt <collection>/testing/<tests>.rkt
|
||||
/tmp/racket/bin/racket <collection>/testing/<tests>.rkt
|
||||
- If JavaScript is required, use a separate executor/test-framework module.
|
||||
Tests must not fail simply because node/deno/bun/qjs is missing; they must
|
||||
skip with clear warnings unless a REQUIRE environment variable has been set.
|
||||
- Do not use shell-based internet access for dependencies. If packages are needed, retrieve
|
||||
them via the rktsndbx bootstrap/package-index flow.
|
||||
- After completion, provide a zip file containing exactly the tested buildmap.
|
||||
- Briefly report which commands were executed, what the test results were,
|
||||
and which zip file contains the tested result.
|
||||
- If JavaScript execution is needed, use a separate executor/test-framework
|
||||
module. Tests must not fail solely because node/deno/bun/qjs is missing; in
|
||||
that case they should use an explicit non-failing JavaScript stub that reports
|
||||
this to stdout, unless a REQUIRE environment variable is set.
|
||||
- Do not use shell-based internet access for dependencies. If packages are
|
||||
needed, fetch them through the rktsndbx bootstrap/package-index flow.
|
||||
- Deliver a zip file containing exactly the tested build directory.
|
||||
- Briefly report which commands were run, what the test results were, and which
|
||||
zip contains the tested result.
|
||||
```
|
||||
|
||||
|
||||
## Latest tested fix
|
||||
|
||||
This build includes the `with-handlers` callee-position fix for inline lambda
|
||||
handlers, including rest-argument handlers such as `(lambda args ...)`. It also
|
||||
fixes top-level `js` statement-context handling for `with-handlers`, so a
|
||||
side-effecting catch handler does not prematurely return from the surrounding
|
||||
JavaScript wrapper. Use `js/expression` when the value of a `with-handlers`
|
||||
form itself is needed. The build also adds a Racket-like division-by-zero
|
||||
runtime check for `/`, so the generic `exn?` handler subset can catch
|
||||
`(/ 10 0)`.
|
||||
fixes top-level `js` statement-context handling in general: `js` now emits
|
||||
program/statement text and does not invent an implicit top-level `return`. This
|
||||
keeps snippets valid when they are passed directly to WebView
|
||||
`runJavaScript`/`evaluateJavaScript`, where a top-level JavaScript `return` is
|
||||
a syntax error. Use `js/expression` when a generated JavaScript value is needed.
|
||||
The build also adds a Racket-like division-by-zero runtime check for `/`, so the
|
||||
generic `exn?` handler subset can catch `(/ 10 0)`.
|
||||
|
||||
## JavaScript use case demos
|
||||
|
||||
|
||||
Reference in New Issue
Block a user