[ALOY-1644] Selective compilation does not regenerate platform app.js on Windows
|Affected Version/s||Alloy 1.13.7|
|Fix Version/s||CLI Release 7.0.10|
DescriptionWhile 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.
ActualThe app attempts to reload,
[ERROR] TiHTTPClient: (main) [230,6739] Could not decode response textgets logged to console.
Resources/android/app.jsdoes not exist.
ExpectedThe app should reload, and work as normal,
- 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
- 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.resolvewhen 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.
- Ewan Harris 2019-02-11 PR: https://github.com/appcelerator/alloy/pull/920
- Lokesh Choudhary 2019-02-11 PR Merged.
- Samir Mohammed 2019-02-12
Closing ticket fix verified in SDK version
8.0.0.v20190211161538and 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.