[ALOY-488] Orphan file cleanup deletes builtins and widget assets
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-19T04:52:51.000+0000 |
Affected Version/s | Alloy 1.0.0 |
Fix Version/s | Alloy 1.5.0 |
Components | Tooling |
Labels | qe-manualtest |
Reporter | Tony Lukasavage |
Assignee | Tim Poulsen |
Created | 2013-01-26T22:14:34.000+0000 |
Updated | 2014-08-25T22:06:55.000+0000 |
Description
During 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.
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.
**APPROVED**
PR merged
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 3.4.0.201408201526 CLI 3.4.0-dev Alloy 1.5.0-dev Xcode6-beta5 Test case added. Closing.
Closing as per Federico's comment.