Skip to content

Fix wavedash dev for Ruffle and JsDos engines#25

Merged
franzwarning merged 1 commit intomainfrom
fix/ruffle-dev-entrypoint
Apr 1, 2026
Merged

Fix wavedash dev for Ruffle and JsDos engines#25
franzwarning merged 1 commit intomainfrom
fix/ruffle-dev-entrypoint

Conversation

@cloud9c
Copy link
Copy Markdown
Contributor

@cloud9c cloud9c commented Mar 24, 2026

Summary

  • wavedash dev failed with "Engine config requires an entrypoint" for Ruffle and JsDos projects
  • Root cause: the dev command called entrypoint() for all three engine types (Custom, JsDos, Ruffle), but entrypoint() only reads from [custom].entrypoint
  • Fix: only require entrypoint() for Custom engines; for Ruffle/JsDos, pass executable_entrypoint_params() instead — matching the existing build push logic

Test plan

  • Run wavedash dev from a project with a [ruffle] config — should launch dev server without error
  • Run wavedash dev from a project with a [jsdos] config — should work similarly
  • Run wavedash dev from a project with a [custom] config — should still require entrypoint as before

🤖 Generated with Claude Code

The dev command incorrectly required `entrypoint()` (which only reads
from [custom].entrypoint) for Ruffle and JsDos engines. This caused
"Engine config requires an entrypoint" errors for valid Ruffle/JsDos
configs. Now mirrors the build push logic: Custom uses entrypoint(),
Ruffle/JsDos use executable_entrypoint_params().

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@cloud9c cloud9c force-pushed the fix/ruffle-dev-entrypoint branch from 8793c17 to 100f8c5 Compare March 30, 2026 16:39
@cloud9c cloud9c marked this pull request as ready for review March 30, 2026 16:41
@claude
Copy link
Copy Markdown

claude bot commented Mar 30, 2026

Claude finished @cloud9c's task in 1m 2s —— View job


Code Review

  • Gather context
  • Read changed files
  • Review diff
  • Post feedback

Fix is correct and well-scoped. The root cause analysis in the PR description is accurate: the original code called entrypoint() (which only reads [custom].entrypoint) for all three engine types, so JsDos/Ruffle would always error with "Engine config requires an entrypoint".

Change 1 — entrypoint variable (src/dev/mod.rs:66-75)

// Before: matched Custom | JsDos | Ruffle → error for JsDos/Ruffle since entrypoint() returns None
// After: only matches Custom
let entrypoint = if matches!(engine_kind, EngineKind::Custom) {

Correct. entrypoint (a plain &str) is only meaningful for Custom engines, where it maps to [custom].entrypoint. JsDos/Ruffle use the structured entrypoint_params path instead.

Change 2 — entrypoint_params match arm (src/dev/mod.rs:91-92)

// Before: JsDos | Ruffle => None
// After:  JsDos | Ruffle => wavedash_config.executable_entrypoint_params()

Correct. This now matches the existing build push logic in src/builds.rs:200. The build_sandbox_url function in src/dev/sandbox.rs already handles both entrypoint and entrypoint_params independently as Option values, so this wires up correctly.

Minor observations

  1. EngineKind::Custom => None in the entrypoint_params match — intentional and correct: Custom engines pass their entrypoint via the entrypoint string param, not entrypoint_params. No issue.

  2. executable_entrypoint_params() can return None (if neither jsdos nor ruffle config section is present) — this would be a config loading error caught earlier by engine_type(), so it's not a new risk introduced here.

No issues found. The change is minimal, accurate, and consistent with the build push path.

@franzwarning franzwarning merged commit d1b12ff into main Apr 1, 2026
8 checks passed
@franzwarning franzwarning deleted the fix/ruffle-dev-entrypoint branch April 1, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants