Skip to content

Commit

Permalink
Fix error in worker declaration example sniplet
Browse files Browse the repository at this point in the history
With line:
```
  executable=ctx.attr.worker,
```
I got error like:
```
Error in run: in call to run(), parameter 'executable' got value of type 'Target', want 'File, string, or FilesToRunProvider'
```
  • Loading branch information
bozaro authored Sep 21, 2021
1 parent 8965d25 commit b6daff8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions site/docs/creating-workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,13 @@ startup args, the call to `ctx.actions.run` might be:
ctx.actions.run(
inputs=ctx.files.srcs,
outputs=[ctx.attr.output],
executable=ctx.attr.worker,
executable=ctx.executable.worker,
mnemonic="someMnemonic",
execution_requirements={
“supports-workers” : “1”,
“requires-worker-protocol” : “json},
arguments=ctx.attr.args + [“@flagfile”]
"supports-workers" : "1",
"requires-worker-protocol" : "json",
},
arguments=ctx.attr.args + ["@flagfile"]
)
```

Expand Down

0 comments on commit b6daff8

Please sign in to comment.