|
|
Chromium Code Reviews|
Created:
3 years, 9 months ago by Nico Modified:
3 years, 9 months ago CC:
chromium-reviews, mlamouri+watch-content_chromium.org, extensions-reviews_chromium.org, Peter Beverloo, jam, darin-cc_chromium.org, pfeldman, devtools-reviews_chromium.org, chromium-apps-reviews_chromium.org, jochen+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptiongrit: In generated _map.cc files, use relative includes.
For example, ui_resources_map.cc will now start with
// This file is automatically generated by GRIT. Do not edit.
#include "ui_resources_map.h"
#include <stddef.h>
#include "base/macros.h"
#include "ui_resources.h"
instead of
// This file is automatically generated by GRIT. Do not edit.
#include "grit/ui_resources_map.h"
#include <stddef.h>
#include "base/macros.h"
#include "grit/ui_resources.h"
Since compilers always look for header files next to the source file,
this makes it possible to build grit's output without any additional
-I flags.
BUG=697196
Review-Url: https://codereview.chromium.org/2727483004
Cr-Commit-Position: refs/heads/master@{#454651}
Committed: https://chromium.googlesource.com/chromium/src/+/0ca9a438e4838b7bca5fa78fe77dafb1108e0623
Patch Set 1 #Patch Set 2 : . #
Total comments: 2
Messages
Total messages: 23 (16 generated)
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
thakis@chromium.org changed reviewers: + thestig@chromium.org
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
thakis@chromium.org changed reviewers: + flackr@chromium.org
+flackr, maybe you can look at this before thestig gets around to it. It's a small patch and the last real blocker for a medium size effort.
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
scottmg@chromium.org changed reviewers: + scottmg@chromium.org
lgtm https://codereview.chromium.org/2727483004/diff/20001/tools/grit/grit/format/... File tools/grit/grit/format/resource_map.py (right): https://codereview.chromium.org/2727483004/diff/20001/tools/grit/grit/format/... tools/grit/grit/format/resource_map.py:79: output.GetOutputFilename()) The change from GetFilename to GetOutputFilename was intentional? I couldn't obviously see what the difference between the two was supposed to be.
Thanks! https://codereview.chromium.org/2727483004/diff/20001/tools/grit/grit/format/... File tools/grit/grit/format/resource_map.py (right): https://codereview.chromium.org/2727483004/diff/20001/tools/grit/grit/format/... tools/grit/grit/format/resource_map.py:79: output.GetOutputFilename()) On 2017/03/03 19:29:57, scottmg wrote: > The change from GetFilename to GetOutputFilename was intentional? I couldn't > obviously see what the difference between the two was supposed to be. Yes, it's intentional. If the grd file looks like <output filename="grit/login_resources_map.cc" type="resource_file_map_source" /> <output filename="grit/login_resources_map.h" type="resource_map_header" /> then GetFilename() returns "grit/login_resources_map.h" GetOutputFilename() on the other hand checks if output_filename exists (https://cs.chromium.org/chromium/src/tools/grit/grit/node/io.py?rcl=d80646f53...) and the grit driver takes its -o flag and sets output_filename to join(-o-value, path) (https://cs.chromium.org/chromium/src/tools/grit/grit/tool/build.py?q=%5C-o+fi...), so if the output goes to ui/login then GetOutputFilename() returns ui/login/grit/login_resources_map.h. output_dir for the _map file is ui/login/grit/, so the relpath is then just login_resources_map.h. With GetFilename, the relpath from ui/login/grit to grit/login_resources_map.h would be ../../../grit/login_resources_map.h which wouldn't be good.
The CQ bit was checked by thakis@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1488569717473130,
"parent_rev": "4c9aa5146e5df6682b3fa25e050571c18fd127e6", "commit_rev":
"0ca9a438e4838b7bca5fa78fe77dafb1108e0623"}
Message was sent while issue was closed.
Description was changed from ========== grit: In generated _map.cc files, use relative includes. For example, ui_resources_map.cc will now start with // This file is automatically generated by GRIT. Do not edit. #include "ui_resources_map.h" #include <stddef.h> #include "base/macros.h" #include "ui_resources.h" instead of // This file is automatically generated by GRIT. Do not edit. #include "grit/ui_resources_map.h" #include <stddef.h> #include "base/macros.h" #include "grit/ui_resources.h" Since compilers always look for header files next to the source file, this makes it possible to build grit's output without any additional -I flags. BUG=697196 ========== to ========== grit: In generated _map.cc files, use relative includes. For example, ui_resources_map.cc will now start with // This file is automatically generated by GRIT. Do not edit. #include "ui_resources_map.h" #include <stddef.h> #include "base/macros.h" #include "ui_resources.h" instead of // This file is automatically generated by GRIT. Do not edit. #include "grit/ui_resources_map.h" #include <stddef.h> #include "base/macros.h" #include "grit/ui_resources.h" Since compilers always look for header files next to the source file, this makes it possible to build grit's output without any additional -I flags. BUG=697196 Review-Url: https://codereview.chromium.org/2727483004 Cr-Commit-Position: refs/heads/master@{#454651} Committed: https://chromium.googlesource.com/chromium/src/+/0ca9a438e4838b7bca5fa78fe77d... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/0ca9a438e4838b7bca5fa78fe77d...
Message was sent while issue was closed.
Can we add a test for this? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
