aspect-build / aspect-build/rules_js

[Bug]: failures with future config_setting visibility rules

Open
#1,256 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### What happened?

`aspect_rules_js` fails when building with compatibility options `--incompatible_config_setting_private_default_visibility --incompatible_enforce_config_setting_visibility`:

```
ERROR: /.../kythe/typescript/BUILD:98:13: in jasmine_test rule //kythe/typescript:utf8_test: alias '@aspect_rules_js//js/private:enable_runfiles' referring to target '@aspect_rules_js//js:enable_runfiles' is not visible from target '//kythe/typescript:utf8_test'. Check the visibility declaration of the former target if you think the dependency is legitimate
ERROR: /.../kythe/typescript/BUILD:98:13: in jasmine_test rule //kythe/typescript:utf8_test: alias '@aspect_rules_js//js/private:experimental_allow_unresolved_symlinks' referring to target '@aspect_rules_js//js:allow_unresolved_symlinks' is not visible from target '//kythe/typescript:utf8_test'. Check the visibility declaration of the former target if you think the dependency is legitimate
```

### Version

Development (host) and target OS/architectures:

Output of `bazel --version`: 6.3.0

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:

The version depended on by `rules_ts-2.0.0-rc1`

Language(s) and/or frameworks involved:

### How to reproduce

```shell
bazel build --incompatible_config_setting_private_default_visibility --incompatible_enforce_config_setting_visibility //path/to/any/target
```
```

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the two incompatible visibility flags and a target such as //kythe/typescript:utf8_test, then inspect kythe/typescript/BUILD around line 98 and the referenced @aspect_rules_js aliases. Done means the target builds without visibility errors under both flags.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.