Repository navigation
pkg: dev hot reload pieces for embedding programs - #42
Merged
Merged
Conversation
…etro) for embedding programs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A program that runs its own hot reload sessions (the MobAI desktop app holding
flutter attachor Metro for an agent) needs the piecesbuilder devuses, without the CLI's prompts. This moves them out ofinternal/devintointernal/hotreloadand exposes them throughpkg/dev.Library
CustomDeviceandWriteCustomDevicewrite themobai-iosFlutter custom device with the caller's own commands (ping, forward, and so on) instead of builder'smobaisubcommands.VMServiceURLreads the Dart VM service URL from a debug build's output line.NewWatcherandFileWatcherConfigare the file watcher, polling for Windows files under WSL2.LocalIPandMetroLaunchArgumentspoint a React Native debug build at Metro.pkg/devimports onlyinternal/hotreload, so embedding it does not pull in promptui.CLI
No behavior change.
builder devbuilds the same custom device (now throughhotreload.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.