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

Issue 1905473003: 🐣 GN: Print the import trail when parse errors occur. (Closed)

Created:
4 years, 8 months ago by agrieve
Modified:
4 years, 8 months ago
Reviewers:
Dirk Pranke, brettw
CC:
chromium-reviews, Dirk Pranke, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

GN: Print the import trail when parse errors occur. This is especially useful when asserts fail when the file should not be included in the first place. Example error message: ERROR at //build/config/android/internal_rules.gni:11:1: Assertion failed. assert(false) ^----- See //build/config/android/rules.gni:7:1: whence it was imported. import("//build/config/android/internal_rules.gni") ^------------------------------------------------- See //media/midi/BUILD.gn:13:3: whence it was imported. import("//build/config/android/rules.gni") ^---------------------------------------- See //BUILD.gn:193:7: which caused the package to be included. "//media/midi:midi_unittests", ^---------------------------- BUG=604972 Committed: https://crrev.com/dbecf02976975b93db37c3b5e3aa26d6fc92c517 Cr-Commit-Position: refs/heads/master@{#388986}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add null origin check #

Total comments: 4

Patch Set 3 : move is_null() to header #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -5 lines) Patch
M tools/gn/import_manager.cc View 1 chunk +5 lines, -1 line 0 comments Download
M tools/gn/loader.h View 1 chunk +1 line, -0 lines 0 comments Download
M tools/gn/loader.cc View 1 3 chunks +9 lines, -4 lines 0 comments Download
M tools/gn/location.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
agrieve
On 2016/04/20 02:21:45, agrieve wrote: > mailto:agrieve@chromium.org changed reviewers: > + mailto:brettw@chromium.org ptal
4 years, 8 months ago (2016-04-20 02:21:53 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905473003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905473003/1
4 years, 8 months ago (2016-04-20 18:29:31 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-20 19:38:29 UTC) #7
brettw
This looks like a nice improvement. Some comments... https://codereview.chromium.org/1905473003/diff/1/tools/gn/loader.cc File tools/gn/loader.cc (right): https://codereview.chromium.org/1905473003/diff/1/tools/gn/loader.cc#newcode267 tools/gn/loader.cc:267: if ...
4 years, 8 months ago (2016-04-20 20:53:19 UTC) #8
Dirk Pranke
I agree that this will be a good improvement; I've wanted this more than a ...
4 years, 8 months ago (2016-04-20 22:23:24 UTC) #10
agrieve
https://codereview.chromium.org/1905473003/diff/1/tools/gn/loader.cc File tools/gn/loader.cc (right): https://codereview.chromium.org/1905473003/diff/1/tools/gn/loader.cc#newcode267 tools/gn/loader.cc:267: if (err.has_error()) { On 2016/04/20 20:53:19, brettw wrote: > ...
4 years, 8 months ago (2016-04-21 00:59:36 UTC) #11
brettw
lgtm https://codereview.chromium.org/1905473003/diff/20001/tools/gn/location.h File tools/gn/location.h (right): https://codereview.chromium.org/1905473003/diff/20001/tools/gn/location.h#newcode22 tools/gn/location.h:22: bool is_null() const; As per style guide, hacker_case ...
4 years, 8 months ago (2016-04-21 20:33:36 UTC) #12
agrieve
https://codereview.chromium.org/1905473003/diff/20001/tools/gn/location.h File tools/gn/location.h (right): https://codereview.chromium.org/1905473003/diff/20001/tools/gn/location.h#newcode22 tools/gn/location.h:22: bool is_null() const; On 2016/04/21 20:33:36, brettw wrote: > ...
4 years, 8 months ago (2016-04-22 00:16:31 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905473003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905473003/40001
4 years, 8 months ago (2016-04-22 00:17:07 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-22 00:58:17 UTC) #17
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:42:53 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/dbecf02976975b93db37c3b5e3aa26d6fc92c517
Cr-Commit-Position: refs/heads/master@{#388986}

Powered by Google App Engine
This is Rietveld 408576698