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

Issue 644282 link

Starred by 2 users

Issue metadata

Status: Closed
Owner: ----
Closed: Nov 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

GN: visibility not respected for configs

Project Member Reported by sdefresne@chromium.org, Sep 6 2016

Issue description

I would expect the following to report an error about incorrect visibility, but gn does seems to ignore the visibility for the config:

config("foo") {
  visibility = [ ":bar" ]
  include_dirs = [ "foo" ]
}

source_set("bar") {
  configs += [ ":foo" ]
}

source_set("baz") {
  configs += [ ":foo" ]
}

$ gn out/xxx
Done. Made 5010 targets from 958 files in 1270ms

Instead I would expect something like the following (that I get when I change "foo" to a source_set and configs to deps):

$  gn gen out/xxx
ERROR at //BUILD.gn:36:1: Dependency not allowed.
source_set("baz") {
^------------------
The item //:baz
can not depend on //:foo
because it is not in //:foo's visibility list: [
  //.:bar
]


 
Status: Available (was: Untriaged)
Yes, this should give an error but this isn't implemented. I don't see an existing bug (I thought we had one).
Cc: mbjorge@chromium.org
Components: Build
Project Member

Comment 4 by sheriffbot@chromium.org, Nov 12

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Closed (was: Untriaged)
Moved to
https://bugs.chromium.org/p/gn/issues/detail?id=22

Sign in to add a comment