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

Issue 231813002: Improve GN public header file checking (Closed)

Created:
6 years, 8 months ago by brettw
Modified:
6 years, 8 months ago
Reviewers:
scottmg
CC:
chromium-reviews, tfarina, rginda+watch_chromium.org, yoshiki+watch_chromium.org
Visibility:
Public.

Description

Improve GN public header file checking This makes the header checker and include iterator work from InputFiles (which basically just hold the file buffer) rather than just raw strings. This allows us to reference these files from Err. Some extra line/char tracking is now in the include iterator so we can actually quote from and annotate the place in the source file where the bad include is, which looks much nicer than "the file blah included blah". It also makes it possible to write much shorter error messages that still make sense. This adds visibility checking as previously documented in the help for "public" and a unit test for that. This updates the documentation for "public" which was wrong (it referred to patterns which was not used). R=scottmg@chromium.org Reland of https://codereview.chromium.org/229423002/ Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263082

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -92 lines) Patch
M BUILD.gn View 2 chunks +6 lines, -1 line 0 comments Download
M third_party/freetype2/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M tools/gn/c_include_iterator.h View 1 chunk +18 lines, -7 lines 0 comments Download
M tools/gn/c_include_iterator.cc View 4 chunks +39 lines, -16 lines 0 comments Download
M tools/gn/c_include_iterator_unittest.cc View 5 chunks +51 lines, -13 lines 0 comments Download
M tools/gn/header_checker.h View 2 chunks +7 lines, -2 lines 0 comments Download
M tools/gn/header_checker.cc View 5 chunks +68 lines, -25 lines 0 comments Download
M tools/gn/header_checker_unittest.cc View 3 chunks +25 lines, -10 lines 0 comments Download
M tools/gn/input_conversion.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/input_file_manager.h View 1 chunk +2 lines, -1 line 0 comments Download
M tools/gn/input_file_manager.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M tools/gn/variables.cc View 1 chunk +10 lines, -14 lines 0 comments Download
M tools/gn/visibility.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
brettw
This is the only diff from the previous patch: https://codereview.chromium.org/229423002/diff2/30001:40001/tools/gn/c_include_iterator.cc
6 years, 8 months ago (2014-04-09 20:37:44 UTC) #1
scottmg
diff lgtm
6 years, 8 months ago (2014-04-09 20:38:52 UTC) #2
scottmg
(checked_cast would be more correct I guess, but doesn't matter much in this code) On ...
6 years, 8 months ago (2014-04-09 20:40:03 UTC) #3
brettw
6 years, 8 months ago (2014-04-10 21:13:20 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 manually as r263082 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698