New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 627667 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Blocking:
issue 627373



Sign in to add a comment

GN analyze not detecting that targets need to be compiled when an action's script changes

Project Member Reported by jam@chromium.org, Jul 13 2016

Issue description

See parent bug. A change only touched CodeGeneratorInstrumentation.py and no C++ source files. The GN bots skipped compiles/tests because of analyze. But the GYP bot seems to have noticed this correctly.

Here's the change that triggered this: https://codereview.chromium.org/2139443002
This chromeos GN bot for example skipped building any targets: https://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/165438
However this chromeos GYP build seemed to have noticed that targets were affected: https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/199057 
 
`gn refs out/Default //third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py`

doesn't return anything. This appears to be because CodeGeneratorInstrumentation.py is listed as the `script` rather than as an `input`.

This is probably wrong :).
i.e., `refs` should look at `script`s as well.
Labels: OS-All
Components: Blink>Infra
Components: -Blink>Infra Build
This isn't a Blink>Infra issue; changing the component to Build instead.
Status: Started (was: Assigned)
Proposed fix: https://codereview.chromium.org/2164773002/
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aca08753b705ef13f334c9f0aee6d44c217e4ad6

commit aca08753b705ef13f334c9f0aee6d44c217e4ad6
Author: dpranke <dpranke@chromium.org>
Date: Tue Jul 19 20:23:39 2016

Make `gn refs` look at script files.

Currently, `gn refs` would not look at the script files listed in
action() and action_foreach() targets, so, for example
`gn refs out/Default //tools/grit/grit.py` would return no references.
This (a) is obviously incorrect, and (b) meant that analyze would
not handle this case correctly and compiles would get skipped as a result.

R=brettw@chromium.org
BUG= 627667 

Review-Url: https://codereview.chromium.org/2164773002
Cr-Commit-Position: refs/heads/master@{#406368}

[modify] https://crrev.com/aca08753b705ef13f334c9f0aee6d44c217e4ad6/tools/gn/command_refs.cc

Status: Fixed (was: Started)

Sign in to add a comment