1
1
load (
2
2
"@rules_scala_annex//rules/common:private/utils.bzl" ,
3
- _resolve_execution_reqs = "resolve_execution_reqs" ,
4
3
_short_path = "short_path" ,
5
4
)
6
5
@@ -49,16 +48,13 @@ def build_format(ctx):
49
48
ctx .actions .run (
50
49
arguments = ["--jvm_flag=-Dfile.encoding=UTF-8" , args ],
51
50
executable = ctx .executable ._fmt ,
52
- execution_requirements = _resolve_execution_reqs (
53
- ctx ,
54
- {
55
- "supports-multiplex-workers" : "1" ,
56
- "supports-workers" : "1" ,
57
- "supports-multiplex-sandboxing" : "1" ,
58
- "supports-worker-cancellation" : "1" ,
59
- "supports-path-mapping" : "1" ,
60
- },
61
- ),
51
+ execution_requirements = {
52
+ "supports-multiplex-workers" : "1" ,
53
+ "supports-workers" : "1" ,
54
+ "supports-multiplex-sandboxing" : "1" ,
55
+ "supports-worker-cancellation" : "1" ,
56
+ "supports-path-mapping" : "1" ,
57
+ },
62
58
inputs = [config , src ],
63
59
mnemonic = "ScalaFmt" ,
64
60
outputs = [file ],
@@ -81,9 +77,9 @@ def format_runner(ctx, manifest, files):
81
77
ctx .actions .run_shell (
82
78
arguments = [args ],
83
79
command = "cat $1 | sed -e s#%workspace%#$2# -e s#%manifest%#$3# > $4" ,
84
- execution_requirements = _resolve_execution_reqs ( ctx , {
80
+ execution_requirements = {
85
81
"supports-path-mapping" : "1" ,
86
- }) ,
82
+ },
87
83
inputs = [ctx .file ._runner , manifest ] + files ,
88
84
mnemonic = "CreateScalaFmtRunner" ,
89
85
outputs = [ctx .outputs .scalafmt_runner ],
@@ -100,9 +96,9 @@ def format_tester(ctx, manifest, files):
100
96
ctx .actions .run_shell (
101
97
arguments = [args ],
102
98
command = "cat $1 | sed -e s#%workspace%#$2# -e s#%manifest%#$3# > $4" ,
103
- execution_requirements = _resolve_execution_reqs ( ctx , {
99
+ execution_requirements = {
104
100
"supports-path-mapping" : "1" ,
105
- }) ,
101
+ },
106
102
inputs = [ctx .file ._testrunner , manifest ] + files ,
107
103
mnemonic = "CreateScalaFmtTester" ,
108
104
outputs = [ctx .outputs .scalafmt_testrunner ],
0 commit comments