Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1644] Selective compilation does not regenerate platform app.js on Windows

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-02-12T11:16:17.000+0000
Affected Version/sAlloy 1.13.7
Fix Version/sCLI Release 7.0.10
ComponentsTooling
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2019-02-11T11:54:37.000+0000
Updated2019-03-13T13:58:30.000+0000

Description

Description

While fixing TIMOB-26781 I ran into an issue where on a reload, the code for pulling a fresh file via the LiveView would log [ERROR] TiHTTPClient: (main) [252,94480] Could not decode response text, chasing that down it appears that when we do selective compilation on windows the platform specific app.js file (Resources/android/app.js) gets removed by Alloy, but not regenerated causing LiveView to fallback to the empty (Resources/app.js)

Steps to reproduce

*You must be using SDK 8* 1. Build an Alloy app with LiveView enabled 2. Once launched make some changes and save.

Actual

The app attempts to reload, [ERROR] TiHTTPClient: (main) [230,6739] Could not decode response text gets logged to console. Resources/android/app.js does not exist.

Expected

The app should reload, and work as normal, Resources/android/app.js should exist

Comments

  1. Ewan Harris 2019-02-11

    It looks like the "orphanage" is removing the app.js/alloy.js files on Windows rebuilds, but not on mac os rebuilds
  2. Ewan Harris 2019-02-11

    This looks to be down to walk-sync always returning paths with posix separators, while (as expected and is correct) we construct paths using the platforms separator and when comparing the comparison fails because android/app.js !== android\app.js. The two solutions are * Keep using walk-sync and always call path.resolve when working with the path * Move to klaw-sync which returns paths correctly for the platform I'm going to go for the former because it's less churn.
  3. Ewan Harris 2019-02-11

    PR: https://github.com/appcelerator/alloy/pull/920
  4. Lokesh Choudhary 2019-02-11

    PR Merged.
  5. Samir Mohammed 2019-02-12

    Closing ticket fix verified in SDK version 8.0.0.v20190211161538 and CLI version 7.0.10-master.14. Able to build an Android application with LiveView enabled and once changes were made and then saved the application would reflect changes.

JSON Source