Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1099] Alloy: Code Analyzer fails to analyze

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-11-26T19:34:16.000+0000
Affected Version/sAlloy 1.4.0
Fix Version/sAlloy 1.5.0
ComponentsAppcelerator Studio
Labelsqe-3.3.0, qe-manualtest
ReporterShreya Chowbey
AssigneeTim Poulsen
Created2014-07-17T11:29:06.000+0000
Updated2014-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

FileDateSize
alloy code analyzer fails.png2014-07-17T11:29:06.000+0000129069
code analyzer fails on alloy-log file.txt2014-07-17T11:29:06.000+000022930

Comments

  1. Praveen Innamuri 2014-07-24

    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.
  2. Tim Poulsen 2014-07-29

    [~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?
  3. Praveen Innamuri 2014-07-29

    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.
  4. Tim Poulsen 2014-07-30

    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.
  5. Tim Poulsen 2014-07-30

    [~fmiao] would you test this PR?
  6. Feon Sua Xin Miao 2014-07-31

    Tested on Windows, code analyzer runs with no errors. Tested on Mac, looks good.
  7. Tim Poulsen 2014-08-01

    PR merged
  8. Ewan Harris 2014-08-26

    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.

JSON Source