[ALOY-1644] Selective compilation does not regenerate platform app.js on Windows
GitHub Issue | n/a |
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-02-12T11:16:17.000+0000 |
Affected Version/s | Alloy 1.13.7 |
Fix Version/s | CLI Release 7.0.10 |
Components | Tooling |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2019-02-11T11:54:37.000+0000 |
Updated | 2019-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
JSON Source
It looks like the "orphanage" is removing the app.js/alloy.js files on Windows rebuilds, but not on mac os rebuilds
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 callpath.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.PR: https://github.com/appcelerator/alloy/pull/920
PR Merged.
Closing ticket fix verified in SDK version
8.0.0.v20190211161538
and CLI version7.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.