File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,10 @@ def _clippy_aspect_impl(target, ctx):
97
97
if crate_info .is_test :
98
98
args .rustc_flags .add ("--test" )
99
99
100
+ # For remote execution purposes, the clippy_out file must be a sibling of crate_info.output
101
+ # or rustc may fail to create intermediate output files because the directory does not exist.
100
102
if ctx .attr ._capture_output [CaptureClippyOutputInfo ].capture_output :
101
- clippy_out = ctx .actions .declare_file (ctx .label .name + ".clippy.out" )
103
+ clippy_out = ctx .actions .declare_file (ctx .label .name + ".clippy.out" , sibling = crate_info . output )
102
104
args .process_wrapper_flags .add ("--stdout-file" , clippy_out .path )
103
105
104
106
# If we are capturing the output, we want the build system to be able to keep going
@@ -107,7 +109,7 @@ def _clippy_aspect_impl(target, ctx):
107
109
else :
108
110
# A marker file indicating clippy has executed successfully.
109
111
# This file is necessary because "ctx.actions.run" mandates an output.
110
- clippy_out = ctx .actions .declare_file (ctx .label .name + ".clippy.ok" )
112
+ clippy_out = ctx .actions .declare_file (ctx .label .name + ".clippy.ok" , sibling = crate_info . output )
111
113
args .process_wrapper_flags .add ("--touch-file" , clippy_out .path )
112
114
113
115
# Turn any warnings from clippy or rustc into an error, as otherwise
You can’t perform that action at this time.
0 commit comments