bazelbuild / bazelbuild/examples

Deprecated ctx.outputs.executable used in rules/test_rule

Open
#151 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
957
Forks
578
Avg merge
3d 22h
Merged PRs (30d)
1

Description

In ```line_length.bzl```:
```
ctx.actions.write(
output = ctx.outputs.executable,
content = script,
)
```
Notice that ```ctx.outputs.executable``` default field is used, and the [documentation](https://docs.bazel.build/versions/2.0.0/skylark/lib/ctx.html#outputs) states this is deprecated:

> (Deprecated) If the rule is marked executable or test, there is a field named "executable", which is the default executable. It is recommended that instead of using this, you pass another file (either predeclared or not) to the executable arg of DefaultInfo.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.