Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18420] LiveView: Manual Alloy compile causes running LiveView session to constantly reload

GitHub Issuen/a
TypeBug
PriorityCritical
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsTooling
LabelsAlloy, LiveView
ReporterFokke Zandbergen
AssigneePraveen Innamuri
Created2015-01-20T08:54:24.000+0000
Updated2015-03-26T00:30:53.000+0000

Description

Use case scenario

This would happen if you do a new build after adding a module, made a change to a strings.xml file or something else caused the app to be outdated, needing a fresh build.

Steps to reproduce

1. Use a fairly big Alloy app, e.g.: git clone https://github.com/aaronksaunders/alloy_fugitive.git 2. Build it (in Simulator) with LiveView: ti build -p ios --liveview 3. Open a new terminal window 4. Build it with or without LiveView: ti build -p ios --liveview 5. Notice the existing app in Simulator reloading constantly. 6. Notice the console showing the Alloy compile of our second build triggering a lot of reloads (see attachment).

Workaround

Killing the active session in our first terminal window doesn't help. This doesn't kill the actual LiveView server. Killing the iOS Simulator or the app running in it does work, but it would be good to not require this extra step and prevent users to see all the flickering and console horror going on.

Attachments

FileDateSize
logs.txt2015-01-20T08:54:24.000+000011660

Comments

  1. Tim Poulsen 2015-01-30

    I'm unclear how this is a valid bug. The first build sets watchers on all the files, while in a second terminal you're building the project again which means many files will be changing. Each change would signal the LiveView server to reload the app. This seems to be an invalid use-case. The proper method when a full app rebuild is needed is to stop the app in the first terminal, thereby stopping the LiveView server. Then, rebuild the app, which would restart the LiveView server and re-set the watchers.
  2. Fokke Zandbergen 2015-02-01

    [~skypanther] I understand *why* it happens, but in daily use it's something I run into too often, e.g. when I have an app with LiveView running in iOS Simulator and then I want to do a build to Genymotion or to an iOS device. This almost always crashes the app running in iOS Simulator because it can't handle all the files being changed. I agree it's not a bug, but there's room for improvement in the dev flow.

JSON Source