Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1262] a directory ending with ".js" causes Alloy compiler error

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-05-28T06:11:57.000+0000
Affected Version/sAlloy 1.6.0
Fix Version/sAlloy 1.7.0
ComponentsRuntime
Labelsdefect
ReporterXavier Lacot
AssigneeRadamantis Torres-Lechuga
Created2015-04-13T10:03:46.000+0000
Updated2015-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

Comments

  1. Feon Sua Xin Miao 2015-05-28

    PR merged.
  2. Ewan Harris 2015-09-04

    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

JSON Source