Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Issue 12262040: Add support for building the new analyzer using gyp. (Closed)

Created:
7 years, 10 months ago by ricow1
Modified:
7 years, 9 months ago
Reviewers:
ahe
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add support for building the new analyzer using gyp. Do we have a name for the new analyzer? I don't really like the new prefix I use for building and naming. Also, I don't particularly like the way I handle the jar files, but I did not find a way to easily make a new string out of a list of strings using a non space separator. Additionally, I currently copy in the dependent on jar files so that we can easily wrap this up, I could make the manifest just refer to the the files relative to tbe build dir, but that is just asking for trouble in the long term IMHO. Committed: https://code.google.com/p/dart/source/detail?r=18804

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 5

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -0 lines) Patch
M dart.gyp View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
A editor/analyzer.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +58 lines, -0 lines 0 comments Download
A editor/tools/compile_analyzer.py View 1 2 3 4 5 6 7 8 9 1 chunk +86 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
ricow1
7 years, 10 months ago (2013-02-14 13:08:08 UTC) #1
ahe
https://codereview.chromium.org/12262040/diff/7/editor/analyzer.gyp File editor/analyzer.gyp (right): https://codereview.chromium.org/12262040/diff/7/editor/analyzer.gyp#newcode42 editor/analyzer.gyp:42: 'destination': '<(PRODUCT_DIR)/<(analyzer_name)', I don't think this is correct. I ...
7 years, 10 months ago (2013-02-14 14:28:16 UTC) #2
ahe
A few Python suggestions. https://codereview.chromium.org/12262040/diff/7001/editor/tools/write_class_path_file.py File editor/tools/write_class_path_file.py (right): https://codereview.chromium.org/12262040/diff/7001/editor/tools/write_class_path_file.py#newcode17 editor/tools/write_class_path_file.py:17: output = open(sys.argv[1], 'w') I'd ...
7 years, 10 months ago (2013-02-14 14:52:34 UTC) #3
ricow1
PTAL https://codereview.chromium.org/12262040/diff/7/editor/analyzer.gyp File editor/analyzer.gyp (right): https://codereview.chromium.org/12262040/diff/7/editor/analyzer.gyp#newcode42 editor/analyzer.gyp:42: 'destination': '<(PRODUCT_DIR)/<(analyzer_name)', On 2013/02/14 14:28:16, ahe wrote: > ...
7 years, 10 months ago (2013-02-14 15:40:20 UTC) #4
ahe
Rico, I'm so sorry. I keep finding problems with this approach. It takes me a ...
7 years, 10 months ago (2013-02-14 16:34:09 UTC) #5
ricow1
https://codereview.chromium.org/12262040/diff/3004/editor/analyzer.gyp File editor/analyzer.gyp (right): https://codereview.chromium.org/12262040/diff/3004/editor/analyzer.gyp#newcode28 editor/analyzer.gyp:28: 'compilation_command': [ On 2013/02/14 16:34:10, ahe wrote: > Unused. ...
7 years, 10 months ago (2013-02-15 12:01:36 UTC) #6
ricow1
PTAL
7 years, 10 months ago (2013-02-19 10:33:17 UTC) #7
ahe
I think you forgot the stuff we discussed in person. Please chat me with follow-up ...
7 years, 10 months ago (2013-02-19 10:38:38 UTC) #8
ricow1
https://codereview.chromium.org/12262040/diff/16001/editor/analyzer.gyp File editor/analyzer.gyp (right): https://codereview.chromium.org/12262040/diff/16001/editor/analyzer.gyp#newcode30 editor/analyzer.gyp:30: 'compilation_classpath': '<(PRODUCT_DIR)/<(analyzer_name)/*', On 2013/02/19 10:38:38, ahe wrote: > This ...
7 years, 10 months ago (2013-02-19 10:44:48 UTC) #9
ricow1
https://codereview.chromium.org/12262040/diff/16001/editor/analyzer.gyp File editor/analyzer.gyp (right): https://codereview.chromium.org/12262040/diff/16001/editor/analyzer.gyp#newcode30 editor/analyzer.gyp:30: 'compilation_classpath': '<(PRODUCT_DIR)/<(analyzer_name)/*', On 2013/02/19 10:44:48, ricow1 wrote: > On ...
7 years, 10 months ago (2013-02-19 10:45:58 UTC) #10
ricow1
unified in one python file
7 years, 10 months ago (2013-02-19 13:50:39 UTC) #11
ahe
LGTM!
7 years, 10 months ago (2013-02-20 12:52:03 UTC) #12
ricow1
Committed patchset #10 manually as r18804 (presubmit successful).
7 years, 10 months ago (2013-02-21 08:25:24 UTC) #13
aam-me
7 years, 9 months ago (2013-03-16 04:27:36 UTC) #14
Message was sent while issue was closed.
As far as I can see there are problems with this script on Windows - build of
analyzer fails there:

1>------ Build started: Project: analyzer, Configuration: ReleaseIA32 Win32
------
1>  Creating "..\build\ReleaseIA32\/new_analyzer/new_analyzer.jar".
1>  The system cannot execute the specified program.
1>C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error
MSB6006: "cmd.exe" exited with code 9020.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

There are two problems as far as I can see:
1) generated command line that invokes compile_analyzer.py lists all java
sources and is over 44k characters long. Windows supports only 8192 characters
long command lines. That I believe results in "The system cannot execute the
specified program." error message.
2) If you fix first problem(by using tempfile with java filenames),
compile_analyzer.py still will fail because javac on windows doesn't handle
wildcard expansion properly in class path
argument(http://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath,
http://stackoverflow.com/questions/11607873/escape-wildcard-processing-in-jav...)

Anyway, in case I'm still making sense, to solve first problem I would move java
source list creation into compile_analyzer.py from gyp and  create temporary
file with all java source listed in there. 
To solve second problem(per second stackoverflow article) on Windows I would
have '*;' rather than '*' at the end of class path.

Hope it helps!

Powered by Google App Engine
This is Rietveld 408576698