Skip to content

pkg: dev hot reload pieces for embedding programs - #42

Merged
Interlap01 merged 2 commits into
mainfrom
pkg-dev
Oct 26, 2026
Merged

Interlap01 merged 2 commits into
mainfrom
pkg-dev

Conversation

@Interlap01

Copy link
Copy Markdown
Collaborator

A program that runs its own hot reload sessions (the MobAI desktop app holding flutter attach or Metro for an agent) needs the pieces builder dev uses, without the CLI's prompts. This moves them out of internal/dev into internal/hotreload and exposes them through pkg/dev.

Library

  • dev: CustomDevice and WriteCustomDevice write the mobai-ios Flutter custom device with the caller's own commands (ping, forward, and so on) instead of builder's mobai subcommands. VMServiceURL reads the Dart VM service URL from a debug build's output line. NewWatcher and FileWatcherConfig are the file watcher, polling for Windows files under WSL2. LocalIP and MetroLaunchArguments point a React Native debug build at Metro.
  • pkg/dev imports only internal/hotreload, so embedding it does not pull in promptui.

CLI

No behavior change. builder dev builds the same custom device (now through hotreload.WriteCustomDevice) and uses the same watcher, VM service URL parsing and Metro arguments.

Tests

internal/hotreload/customdevice_test.go (VM service URL parsing) plus the moved watcher tests. Full suite passes; gofmt and vet clean; builds for Windows.

@Interlap01
Interlap01 merged commit 4df2290 into main Oct 26, 2026
8 checks passed
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.

1 participant