[ALOY-1099] Alloy: Code Analyzer fails to analyze
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-11-26T19:34:16.000+0000 |
Affected Version/s | Alloy 1.4.0 |
Fix Version/s | Alloy 1.5.0 |
Components | Appcelerator Studio |
Labels | qe-3.3.0, qe-manualtest |
Reporter | Shreya Chowbey |
Assignee | Tim Poulsen |
Created | 2014-07-17T11:29:06.000+0000 |
Updated | 2014-11-26T19:34:16.000+0000 |
Description
Code Analyzer fails to analyze Alloy Project from Studio on Windows system only. But working fine from CLI.
1. Create a default alloy project.
2. Execute the Code Analyzer against Android/Mobileweb platforms.
Actual Result - Shows error message. Please refer the attached log file and screen shot for more clarification.
Expected Result - Code Analyzer should work fine for Alloy project from Studio.
Notes -
1. The same works fine for Classic project.
2. Code Analyzer works fine for Alloy Project from CLI.
3. Code Analyzer works fine for Alloy/Classic on Mac and Ubuntu systems.
Attachments
On Mac, analyzing a Alloy project runs without any issues. However, while analyzing a Alloy project on Windows, Alloy writes the debug output onto the console along with the code processor. Since Studio expects only the output from the code processor, having the output from both Alloy and code-processors results in the parsing failure. Alloy should not output the logging on Windows, similar to Mac. Re-directing the ticket to Alloy team to suppress the output on Windows.
[~pinnamuri] I think Studio might be sending the wrong launch command to Alloy. It should be something like:
alloy compile -b -l 0 --config platform=android
To get no log output. The -b says "no banner" and -l sets the logging levels, use 0 to get no log output. Is there a way I can test this on Windows? Like, is there some config file that controls the launch settings Studios uses that I could modify?The config file used to launch code processor contains information only specific to the plugins of the code analyzer. The code analyzer doesn't explicitly invoke Alloy command to compile the source. It fires off the event "codprocessor.pre.run" before it starts to analyze the source code - and alloy adds the hook for this event to compile the source code. The alloy.js file has added the hook for "codprocessor.pre.run" event to run before the code analyzer kicks off to analyze the source code.
PR https://github.com/appcelerator/alloy/pull/495 Functional test: 1. On a Windows system, use Appcelerator Studio to create a new Alloy project. 2. Right-click the project's name in the Project Explorer, choose Code Analysis, Android (or MobileWeb). Code analyzer should run without errors; you can optionally display the results by clicking on the notification in the bottom-right of the window. 3. On a Macintosh system, repeat the above steps to confirm that the changes do not break anything there. Note: If using an existing project, you will need to re-install the Alloy plug-in. From the command line, in the project's directory, enter
alloy install plugin
prior to running the code analyzer.[~fmiao] would you test this PR?
Tested on Windows, code analyzer runs with no errors. Tested on Mac, looks good.
PR merged
Verified fix on: Windows 8.1 Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201408210941 Titanium SDK build: 3.4.0.v20140813022514 Titanium CLI, build: 3.4.0-dev Alloy: 1.5.0-dev Created a new alloy project on a Windows 8.1 machine and ran code analysis on the project, the code analyzer runs with no problems. Ran the same test on a OSX 10.9.4 machine and the code analyzer runs with no problems. Closing ticket.