[ALOY-488] Orphan file cleanup deletes builtins and widget assets
|Affected Version/s||Alloy 1.0.0|
|Fix Version/s||Alloy 1.5.0|
DescriptionDuring the compile process Alloy will attempt to remove files from the Resources directory that are no longer present anywhere in the "app" folder. Alloy searches a number of locations in the "app" folder to see if the file is an orphan or not. False negatives should be avoided as they will leave unused files in the project. False positives on the other hand are not really worrisome since those resources will be recreated on the next compile anyway. With that in mind, there are currently false positives for orphan file deletion for builtins and widgets. Builtins and widgets will be pulled in fresh each time. Again, this will not negatively impact a developer's build process or app in any way, it would just be more true to the logic if these files were left alone during the orphan cleanup phase.
- Tim Poulsen 2014-08-14 PR https://github.com/appcelerator/alloy/pull/507 Functional test: 1. Create a new Alloy project, then replace its app folder with that of the test/apps/testing/ALOY\-488 test app (you can't use the jake scripts to test this PR) 2. Build the app once. Examine the Resources/_platform_/alloy/ folder and you'll see the presence of two folders for the two widgets included in this app: starwidget & foo. 3. Edit config.json to remove the dependency on the foo widget. (It's not actually used in the app) 4. Build the app again. The Resources/_platform_/alloy/widgets/foo folder and contents are removed. The app will function properly with the starwidget, as it is correctly kept in the build. Prior to this PR, if you removed a widget from a project, its files would remain behind in the Resources directory. PR also includes comment fixes and a fix for a code error with an incorrect call to the die() function.
- Feon Sua Xin Miao 2014-08-19 **APPROVED**
- Feon Sua Xin Miao 2014-08-19 PR merged
- Federico Casali 2014-08-23 Verified working as expected. Widget folder is deleted if the widget is no more included in the dependencies. TiSDK 3.4.0.v20140820125714 Appcelerator Studio 22.214.171.124408201526 CLI 3.4.0-dev Alloy 1.5.0-dev Xcode6-beta5 Test case added. Closing.
- Ewan Harris 2014-08-25 Closing as per Federico's comment.