[ALOY-1262] a directory ending with ".js" causes Alloy compiler error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-05-28T06:11:57.000+0000 |
Affected Version/s | Alloy 1.6.0 |
Fix Version/s | Alloy 1.7.0 |
Components | Runtime |
Labels | defect |
Reporter | Xavier Lacot |
Assignee | Radamantis Torres-Lechuga |
Created | 2015-04-13T10:03:46.000+0000 |
Updated | 2015-09-04T21:00:18.000+0000 |
Description
This bug is related to [ALOY-920], which introduced a fix for the specific case of
should.js
.
When building an Alloy project containg a library directory named with a .js
suffix, the compiler fails:
[INFO] ----- OPTIMIZING -----
[INFO] - iphone/vendor/validator.js
[ERROR] Error generating AST for "/Users/xavier/titanium/DemoApp/Resources/iphone/vendor/validator.js"
[ERROR] EISDIR, illegal operation on a directory
[ERROR] Alloy compiler failed
The getJsFiles()
Alloy compiler method filters which files have to be optimized, as in https://github.com/appcelerator/alloy/blob/master/Alloy/commands/compile/index.js#L1017
This method fails to exclude items which are directories ending with .js
, and uglifyjs.parse()
then throws an error.
A pull request has been submitted at https://github.com/appcelerator/alloy/pull/683
PR merged.
Verified using: Mac OS 10.10.5 Appc NPM 4.2.0-1 Appc CLI Core 5.0.0-41 (Alloy 1.7.X) Ti SDK 5.0.0.v20150903221516 Directories ending in .js no longer cause compiler errors Closing ticket