Discussion:
[chromium-dev] unexpected gn check failures
Evan Stade
2018-12-10 23:56:24 UTC
Permalink
Hi all,

On a CL I'm working on[1] the mac builders are complaining at the gn args
--check stage [2] for reasons I don't understand. Specifically, one example
failure is:

ERROR at
//chrome/browser/extensions/api/automation_internal/automation_internal_api.cc:47:11:
Include not allowed. #include "ui/aura/env.h" ^------------ It is not in
any dependency of //chrome/browser/extensions:extensions The include file
is in the target(s): //ui/aura:aura which should somehow be reachable.

I gather I could add // nogncheck, but I didn't touch this file or any of
its deps[3], so why was this passing before? Is there some rule for what
directory gets gn checked which this CL is suddenly tripping?

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1359592
[2]
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8927490078549237216/+/steps/generate_build_files__with_patch_/0/stdout
[3] to my knowledge I only touched test-only build targets

-- Evan Stade
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com.
d***@chromium.org
2018-12-10 23:59:45 UTC
Permalink
You changed a public_deps to a deps, which I would assume this was
depending on, possibly transitively.

- Dana
Post by Evan Stade
Hi all,
On a CL I'm working on[1] the mac builders are complaining at the gn args
--check stage [2] for reasons I don't understand. Specifically, one example
ERROR at
Include not allowed. #include "ui/aura/env.h" ^------------ It is not in
any dependency of //chrome/browser/extensions:extensions The include file
is in the target(s): //ui/aura:aura which should somehow be reachable.
I gather I could add // nogncheck, but I didn't touch this file or any of
its deps[3], so why was this passing before? Is there some rule for what
directory gets gn checked which this CL is suddenly tripping?
[1] https://chromium-review.googlesource.com/c/chromium/src/+/1359592
[2]
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8927490078549237216/+/steps/generate_build_files__with_patch_/0/stdout
[3] to my knowledge I only touched test-only build targets
-- Evan Stade
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAHtyhaR0d356RwQNBmxtOQd8X1aJYWHFzX2U6LGL6Ry7eR2Bdg%40mail.gmail.com.
Evan Stade
2018-12-11 01:02:35 UTC
Permalink
Post by d***@chromium.org
You changed a public_deps to a deps, which I would assume this was
depending on, possibly transitively.
- Dana
This is hypothetically possible, but the only build targets I touched the
DEPS on were test targets. Unless we think it's possible that the
//chrome/browser/extensions target depends on views_unittests somehow, I
don't see the connection. (This also applies to //chrome/browser/ui,
//content/browser, etc.)

Correct me if I'm wrong, but I don't think that anything which lacks
USE_AURA /should/ be including aura files, so if it was passing the check
before somehow, it must have indicated an error in the DEPS chain. Yet it's
very rare that aura includes in //chrome/browser apply nogncheck (even
inside USE_AURA blocks). What I can't figure out is what controls whether
gn --check is being run on a directory, since the gn docs still claim that
Chrome doesn't come close to passing a gn check.
Post by d***@chromium.org
Post by Evan Stade
Hi all,
On a CL I'm working on[1] the mac builders are complaining at the gn args
--check stage [2] for reasons I don't understand. Specifically, one example
ERROR at
Include not allowed. #include "ui/aura/env.h" ^------------ It is not in
any dependency of //chrome/browser/extensions:extensions The include file
is in the target(s): //ui/aura:aura which should somehow be reachable.
I gather I could add // nogncheck, but I didn't touch this file or any of
its deps[3], so why was this passing before? Is there some rule for what
directory gets gn checked which this CL is suddenly tripping?
[1] https://chromium-review.googlesource.com/c/chromium/src/+/1359592
[2]
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8927490078549237216/+/steps/generate_build_files__with_patch_/0/stdout
[3] to my knowledge I only touched test-only build targets
-- Evan Stade
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9gTxZ9zgFRohtyTA5BWhZbGk32HMU7GmK93dwfUBkANg%40mail.gmail.com.
Dirk Pranke
2018-12-11 01:27:41 UTC
Permalink
The list of which directories are expected to pass gn check is given
by the `check_targets`
variable in //.gn <https://cs.chromium.org/chromium/src/.gn?l=76> .

It is true that there's still a lot of work left to get everything to pass,
but a greal deal of it already does.

It is not obvious to me either what's causing the failures, even after I
patched the CL in locally and reproduced it. My initial look said the same
thing that you're saying, which is that the changes should've only affected
views_unittests. It's possible that you're hitting a bug in GN, or there's
some weird interaction with circular includes going on (or both), but I
didn't look very long.

If you look into this further and still don't find an answer, please file a
bug, cc me, and I'll dig into it more.

-- Dirk
Post by Evan Stade
Post by d***@chromium.org
You changed a public_deps to a deps, which I would assume this was
depending on, possibly transitively.
- Dana
This is hypothetically possible, but the only build targets I touched the
DEPS on were test targets. Unless we think it's possible that the
//chrome/browser/extensions target depends on views_unittests somehow, I
don't see the connection. (This also applies to //chrome/browser/ui,
//content/browser, etc.)
Correct me if I'm wrong, but I don't think that anything which lacks
USE_AURA /should/ be including aura files, so if it was passing the check
before somehow, it must have indicated an error in the DEPS chain. Yet it's
very rare that aura includes in //chrome/browser apply nogncheck (even
inside USE_AURA blocks). What I can't figure out is what controls whether
gn --check is being run on a directory, since the gn docs still claim that
Chrome doesn't come close to passing a gn check.
Post by d***@chromium.org
Post by Evan Stade
Hi all,
On a CL I'm working on[1] the mac builders are complaining at the gn
args --check stage [2] for reasons I don't understand. Specifically, one
ERROR at
Include not allowed. #include "ui/aura/env.h" ^------------ It is not in
any dependency of //chrome/browser/extensions:extensions The include file
is in the target(s): //ui/aura:aura which should somehow be reachable.
I gather I could add // nogncheck, but I didn't touch this file or any
of its deps[3], so why was this passing before? Is there some rule for what
directory gets gn checked which this CL is suddenly tripping?
[1] https://chromium-review.googlesource.com/c/chromium/src/+/1359592
[2]
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8927490078549237216/+/steps/generate_build_files__with_patch_/0/stdout
[3] to my knowledge I only touched test-only build targets
-- Evan Stade
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEoffTAoeHwoHcV54ww5S315CtgthT04kWM5qx2FWRUhR8ZS-A%40mail.gmail.com.
Colin Blundell
2018-12-11 09:40:19 UTC
Permalink
I looked at this a bit as well; to perhaps state the obvious, it looks like
the problem is that USE_AURA is now defined on Mac when checking the
violating targets, so that the includes guarded by USE_AURA are getting
analyzed. It's not surprising that that creates problems given that IIUC
Mac doesn't use Aura. This would also explain why the problem is springing
up everywhere, as opposed to being limited to targets that are involved in
the affected dependency chain.

I don't have a Mac development environment locally at the moment, so wasn't
able to dig into *why* that would be the case. Nothing in your CL springs
out as causing that change.

Best,

Colin
The list of which directories are expected to pass gn check is given by
the `check_targets` variable in //.gn
<https://cs.chromium.org/chromium/src/.gn?l=76> .
It is true that there's still a lot of work left to get everything to
pass, but a greal deal of it already does.
It is not obvious to me either what's causing the failures, even after I
patched the CL in locally and reproduced it. My initial look said the same
thing that you're saying, which is that the changes should've only affected
views_unittests. It's possible that you're hitting a bug in GN, or there's
some weird interaction with circular includes going on (or both), but I
didn't look very long.
If you look into this further and still don't find an answer, please file
a bug, cc me, and I'll dig into it more.
-- Dirk
Post by Evan Stade
Post by d***@chromium.org
You changed a public_deps to a deps, which I would assume this was
depending on, possibly transitively.
- Dana
This is hypothetically possible, but the only build targets I touched the
DEPS on were test targets. Unless we think it's possible that the
//chrome/browser/extensions target depends on views_unittests somehow, I
don't see the connection. (This also applies to //chrome/browser/ui,
//content/browser, etc.)
Correct me if I'm wrong, but I don't think that anything which lacks
USE_AURA /should/ be including aura files, so if it was passing the check
before somehow, it must have indicated an error in the DEPS chain. Yet it's
very rare that aura includes in //chrome/browser apply nogncheck (even
inside USE_AURA blocks). What I can't figure out is what controls whether
gn --check is being run on a directory, since the gn docs still claim that
Chrome doesn't come close to passing a gn check.
Post by d***@chromium.org
Post by Evan Stade
Hi all,
On a CL I'm working on[1] the mac builders are complaining at the gn
args --check stage [2] for reasons I don't understand. Specifically, one
ERROR at
Include not allowed. #include "ui/aura/env.h" ^------------ It is not in
any dependency of //chrome/browser/extensions:extensions The include file
is in the target(s): //ui/aura:aura which should somehow be reachable.
I gather I could add // nogncheck, but I didn't touch this file or any
of its deps[3], so why was this passing before? Is there some rule for what
directory gets gn checked which this CL is suddenly tripping?
[1] https://chromium-review.googlesource.com/c/chromium/src/+/1359592
[2]
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8927490078549237216/+/steps/generate_build_files__with_patch_/0/stdout
[3] to my knowledge I only touched test-only build targets
-- Evan Stade
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAO4XGS9X3aXsDdO8MC-3wVaTo%2B0K3wHbKTuWzWmM_OgWVLmZCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEoffTAoeHwoHcV54ww5S315CtgthT04kWM5qx2FWRUhR8ZS-A%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEoffTAoeHwoHcV54ww5S315CtgthT04kWM5qx2FWRUhR8ZS-A%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGE5NEj%3D8%2BiHYOUYDL%3DouUS%2BOvNy8Q8XB2Lof23QK26ZGoWcQ%40mail.gmail.com.
Loading...