cli: pocket compile --aot in a source checkout reports the missing pocketjs.wasm without naming the command that builds it

オープン 初心者向け
#724 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bun, typescript, wasm
領域
cli

調査の方向性

tools/aot-compile.ts の 128-129 行目付近で、欠落した layout oracle が発生する箇所を開き、同じファイルに対して site/microts/lib/kit.ts:53 ですでに使われている表現と比較してください。--aot コンパイルコマンドを、platforms/web/pocketjs.wasm がないチェックアウトで使って再現し、次にエラーを言い換えて bun tools/wasm.ts と rustup target add wasm32-unknown-unknown の要件を名指しするようにしてください。tools/wasm.ts は、修正が代わりにアセットをビルドする場合に ensureHostWasm() をエクスポートします。完了とは、メッセージがチェックアウトの利用者にファイルを生成する方法を伝えている状態です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Version

PocketJS v0.17.0 (83c6cac9, current main), used as a git submodule. macOS 27.2 arm64, Bun 1.4.2.

Repro

In a fresh clone of the repository (no platforms/web/pocketjs.wasm; the file is in .gitignore), compile any aot: true application:

bun $POCKETJS/tools/pocket.ts compile --config pocket.host.config.ts --aot --out gen

Actual

✓ pocket.host.config.ts app
✓ repro-esp32s3 hosts the application
✓ TypeScript (62 app module(s))
✓ ResolvedBuildPlan sha256:…
PocketJS: AOT: prebuilt layout oracle not found: <pocketjs>/platforms/web/pocketjs.wasm; install/build the compiler's wasm asset before compilation

cli.md states that a missing oracle is an error but not how to produce it. The npm package ships the file (files whitelist; CI runs bun tools/wasm.ts before publishing, skills/pocketjs-release/SKILL.md), so the case arises in checkouts: a framework clone, or a product that pins PocketJS as a submodule and runs the CLI from it, as an ESP-IDF build does.

Expected

In a checkout the message names the command and its requirement, for example:

AOT: the layout oracle platforms/web/pocketjs.wasm is missing; build it with `bun tools/wasm.ts` (needs `rustup target add wasm32-unknown-unknown`)

site/microts/lib/kit.ts:53 already reports the same file this way. Alternatively the CLI builds it: tools/wasm.ts exports ensureHostWasm().

Cause

tools/aot-compile.ts:128–129.

Workaround

Run bun tools/wasm.ts in the PocketJS checkout before the first AOT compile.

主要言語
TypeScript
スター
1.6k
フォーク
88
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pocket-stack/pocketjs のほかの issue

pocket-stack/pocketjs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。