question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

incompatible_config_setting_private_default_visibility

See original GitHub issue

Visibility on config_setting isn’t historically enforced. This is purely for legacy reasons. There’s no philosophical reason to distinguish them.

This flag, in conjunction with --incompatible_enforce_config_setting_visibility (https://github.com/bazelbuild/bazel/issues/12932), removes that distinction.

Values:

  • --incompatible_config_setting_private_default_visibility=off: if --incompatible_enforce_config_setting_visibility=off, every config_setting is visible to every target, regardless of visibility settings. Else, every config_setting without an explicit visibility setting is //visibility:public (ignoring package visibility defaults)
  • --incompatible_config_setting_private_default_visibility=on: if --incompatible_enforce_config_setting_visibility=off, every config_setting is visible to every target, regardless of visibility settings. Else, config_setting follows the same visibility rules as all other targets.

Incompatibility error:

ERROR: myapp/BUILD:4:1: in config_setting rule //myapp:my_config: target 'myapp:my_config' is not visible from target '//some:other_target. Check the visibility declaration of the former target if you think the dependency is legitimate

Migration:

Treat all config_settings as if they follow standard visibility logic at https://docs.bazel.build/versions/master/visibility.html: have them set visibility explicitly if they’ll be used anywhere outside their own package. The ultimate goal of this migration is to fully enforce that expectation.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

0reactions
aiutocommented, Nov 4, 2022

As much as I would like to see it in 6.x, I keep seeing rippling churn of updating dependencies. rules_pkg was merely the piece that the Bazel team saw. I can easily imagine that kind of problem lurking in any rule set that needs to define a config setting that others reuse.

On Fri, Nov 4, 2022 at 12:29 PM Greg @.***> wrote:

At this point I’d push this through best-effort (whatever version it lands in). There are other outdated dependencies and it’s not vital to be specifically in 6.0.

— Reply to this email directly, view it on GitHub https://github.com/bazelbuild/bazel/issues/12933#issuecomment-1303840389, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHHHFG5IJPX5LLFBJH6IDWGU2VBANCNFSM4WZUY76A . You are receiving this because you were mentioned.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

examples: Update rules_go version for incoming incompatible ...
fmeum force-pushed the 3386-incompatible-config-setting-private-default-visibility branch from 6194c94 to c4caef1 Compare now.
Read more >
Default visibility for C# classes and members (fields, methods ...
Delegates behave like classes and structs. By default, they have internal access when declared directly within a namespace, and private access when nested....
Read more >
INVALID CHASSIS CONFIGURATION (Incompatible Partner
Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact ......
Read more >
Incompatible properties and related elements
If the property visibility is private, protected, or package , then after the conversion visibility of the created port will be set to...
Read more >
About iCloud Private Relay - Apple Support
Go to Settings > [your name]. · Tap iCloud, then select Private Relay. · To turn Private Relay on or off, tap Private...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found