Closed andrewhavens closed 8 years ago
Ah, I think I found the source of the issue. The "super repl" seems to skip the build step: https://github.com/HipByte/Flow/blob/master/lib/motion-flow.rb#L234-L235
This seems unintuitive since we have always been used to the build step running automatically for us when we run our apps in the simulator. Not sure why this would intentionally skip the build step.
@andrewhavens must be a regression due to 4.12
@MarkVillacampa what do you think ?
Actually it's by design, as I have been using the super REPL frequently for demos I wanted it to run as fast as possible (and therefore skip the build steps). Maybe we could simply honor a "skip_build" environment variable (and by default build both targets).
@andrewhavens could you try this on android please ?
desc "Start a combined iOS/Android REPL"
task "super_repl" do
require "readline"
cmd = %w{ /usr/bin/rake }
ios_cmd = cmd + ['ios:simulator']
android_cmd = cmd + ['android:emulator:start']
if ENV.fetch("skip_build", nil)
ios_cmd << 'skip_build=1'
android_cmd << 'skip_build=1'
end
ios_io = IO.popen(ios_cmd.join(' '), 'w')
android_io = IO.popen(android_cmd.join(' '), 'w')
while expr = Readline.readline("> ", true)
ios_io.puts expr
android_io.puts expr
sleep 0.2
end
end
Tried on iOS and it's working fine, but don't have a machine with android setup, and my internet is terrible...
@jjaffeux Yes, that code solves the "missing repl_ports.txt" error. Works for Android too.
However, now that I am using the "super repl", a different problem arises. The iOS and Android log statements are all mixed together. When one simulator/emulator crashes, there's no way to relaunch it without stopping the other one. I've learned that when Dropbox is syncing (which it's always doing), I have trouble launching the iOS simulator.
...but I'll leave those topics for a different discussion.
Ok fixed by : https://github.com/HipByte/Flow/commit/d51438d14696f249a6fbcec22c6459f9d7f8751a
Thanks for testing. Will think about the other issues.
I'm trying to run the reddit sample app. I downloaded the source and tried running
rake super_repl
, then I saw this error:I'm using the latest code from master, and RubyMotion 4.12.