Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24915] Windows: run cmake flag does not work from titanium CLI

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-07-11T18:08:47.000+0000
Affected Version/sRelease 6.1.0, Release 6.1.1, Release 6.2.0
Fix Version/sRelease 6.2.0
ComponentsCLI, Tooling, Windows
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2017-06-30T15:57:12.000+0000
Updated2017-08-21T11:12:28.000+0000

Description

Description

When using the --run-cmake cli flag from ti cli it will not work and silently fail, this is because it errors out when the cli tries to read in the hook with the below, nodeappc is passed in to the hook and has async on it so we can use that rather than requiring it, it works fine from the appc cli because either the module lookup path is altered or the module has been cached already (I think the former)
{ Error: Cannot find module 'async'                                                                                                             
    at Function.Module._resolveFilename (module.js:469:15)                                                                                      
    at Function.Module._load (module.js:417:25)                                                                                                 
    at Module.require (module.js:497:17)                                                                                                        
    at require (internal/module.js:20:19)                                                                                                       
    at Object.<anonymous> (C:\Users\ewan\Documents\Appcelerator_Studio_Workspace\ti.paint\windows\plugins\hooks\windows.js:6:13)                
    at Module._compile (module.js:570:32)                                                                                                       
    at Object.Module._extensions..js (module.js:579:10)                                                                                         
    at Module.load (module.js:487:32)                                                                                                           
    at tryModuleLoad (module.js:446:12)                                                                                                         
    at Function.Module._load (module.js:438:3)                                                                                                  
---------------------------------------------                                                                                                   
    at Object.exports.execFile (child_process.js:287:9)                                                                                         
    at exports.exec (child_process.js:103:18)                                                                                                   
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\environ.js:267:3                                      
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3694:9                   
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:356:16                   
    at replenish (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:877:25)       
    at iterateeCallback (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:867:17)
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:840:16                   
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3691:13                  
---------------------------------------------                                                                                                   
    at Object.exports.execFile (child_process.js:287:9)                                                                                         
    at exports.exec (child_process.js:103:18)                                                                                                   
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\environ.js:255:6                                      
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3686:9                   
    at replenish (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:882:17)       
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:886:9                    
    at eachOfLimit (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:913:22)     
    at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:918:16                   
    at _parallel (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\dist\async.js:3685:5)       
---------------------------------------------                                                                                                   
    at run (C:\ProgramData\Titanium\mobilesdk\win32\6.2.0.v20170630052324\node_modules\windowslib\lib\wptool.js:126:9)                          
    at C:\ProgramData\Titanium\mobilesdk\win32\6.2.0.v20170630052324\node_modules\windowslib\lib\wptool.js:170:6                                
    at C:\ProgramData\Titanium\mobilesdk\win32\6.2.0.v20170630052324\node_modules\windowslib\lib\utilities.js:106:10                            
    at FSReqWrap.oncomplete (fs.js:123:15) code: 'MODULE_NOT_FOUND' }                                                                           

Steps to reproduce

Download ti.paint from github https://github.com/appcelerator-archive/ti.paint

Run the module build with ti build -p windows --build-only --run-cmake

Actual

The build skips every architecture as CMake is not run

Expected

CMake should be run

Comments

  1. Ewan Harris 2017-06-30

    PR: https://github.com/appcelerator/titanium_mobile_windows/pull/1030
  2. Ewan Harris 2017-08-21

    Verified in 6.2.0.v20170821001430, closing ticket

JSON Source