@@ -8,7 +8,6 @@ use miette::Diagnostic;
8
8
use pixi_consts:: consts;
9
9
use pixi_manifest:: { Manifest , PackageManifest , PrioritizedChannel , WorkspaceManifest } ;
10
10
use rattler_conda_types:: { ChannelConfig , MatchSpec } ;
11
- use serde:: { de:: IntoDeserializer , Deserialize } ;
12
11
use thiserror:: Error ;
13
12
use which:: Error ;
14
13
@@ -143,35 +142,28 @@ impl ProtocolBuilder {
143
142
}
144
143
145
144
fn get_tool_spec ( & self , channel_config : & ChannelConfig ) -> Result < ToolSpec , FinishError > {
146
- // The tool is either overridden or its not, with pixi the backend is specified in the toml
147
- // so it's unclear if we need to override the tool until this point, lets check that now
145
+ // The tool is either overridden or its not, with pixi the backend is specified
146
+ // in the toml so it's unclear if we need to override the tool until
147
+ // this point, lets check that now
148
148
if let Some ( backend_override) = self . backend_override . as_ref ( ) {
149
- let tool_name = self
150
- . package_manifest
151
- . build_system
152
- . build_backend
153
- . name
154
- . clone ( ) ;
149
+ let tool_name = self . package_manifest . build . backend . name . clone ( ) ;
155
150
if let Some ( tool) = backend_override. overridden_tool ( tool_name. as_normalized ( ) ) {
156
151
return Ok ( tool. as_spec ( ) ) ;
157
152
}
158
153
}
159
154
160
155
// If we get here the tool is not overridden, so we use the isolated variant
161
- let build_system = & self . package_manifest . build_system ;
162
- let specs = [ (
163
- & build_system. build_backend . name ,
164
- & build_system. build_backend . spec ,
165
- ) ]
166
- . into_iter ( )
167
- . chain ( build_system. additional_dependencies . iter ( ) )
168
- . map ( |( name, spec) | {
169
- spec. clone ( )
170
- . try_into_nameless_match_spec ( channel_config)
171
- . map ( |spec| MatchSpec :: from_nameless ( spec, Some ( name. clone ( ) ) ) )
172
- } )
173
- . collect :: < Result < _ , _ > > ( )
174
- . map_err ( FinishError :: SpecConversionError ) ?;
156
+ let build_system = & self . package_manifest . build ;
157
+ let specs = [ ( & build_system. backend . name , & build_system. backend . spec ) ]
158
+ . into_iter ( )
159
+ . chain ( build_system. additional_dependencies . iter ( ) )
160
+ . map ( |( name, spec) | {
161
+ spec. clone ( )
162
+ . try_into_nameless_match_spec ( channel_config)
163
+ . map ( |spec| MatchSpec :: from_nameless ( spec, Some ( name. clone ( ) ) ) )
164
+ } )
165
+ . collect :: < Result < _ , _ > > ( )
166
+ . map_err ( FinishError :: SpecConversionError ) ?;
175
167
176
168
// Figure out the channels to use
177
169
let channels = build_system. channels . clone ( ) . unwrap_or_else ( || {
@@ -184,7 +176,7 @@ impl ProtocolBuilder {
184
176
185
177
Ok ( ToolSpec :: Isolated ( IsolatedToolSpec {
186
178
specs,
187
- command : build_system. build_backend . name . as_source ( ) . to_string ( ) ,
179
+ command : build_system. backend . name . as_source ( ) . to_string ( ) ,
188
180
channels,
189
181
} ) )
190
182
}
@@ -210,20 +202,9 @@ impl ProtocolBuilder {
210
202
. await
211
203
. map_err ( FinishError :: Tool ) ?;
212
204
213
- let configuration = self
214
- . package_manifest
215
- . build_system
216
- . build_backend
217
- . additional_args
218
- . map_or ( serde_json:: Value :: Null , |value| {
219
- let deserializer = value. into_deserializer ( ) ;
220
- serde_json:: Value :: deserialize ( deserializer) . unwrap_or ( serde_json:: Value :: Null )
221
- } ) ;
222
-
223
205
Ok ( JsonRPCBuildProtocol :: setup (
224
206
self . source_dir ,
225
207
self . manifest_path ,
226
- configuration,
227
208
build_id,
228
209
self . cache_dir ,
229
210
tool,
@@ -238,21 +219,10 @@ impl ProtocolBuilder {
238
219
ipc : InProcessBackend ,
239
220
build_id : usize ,
240
221
) -> Result < JsonRPCBuildProtocol , FinishError > {
241
- let configuration = self
242
- . package_manifest
243
- . build_system
244
- . build_backend
245
- . additional_args
246
- . map_or ( serde_json:: Value :: Null , |value| {
247
- let deserializer = value. into_deserializer ( ) ;
248
- serde_json:: Value :: deserialize ( deserializer) . unwrap_or ( serde_json:: Value :: Null )
249
- } ) ;
250
-
251
222
Ok ( JsonRPCBuildProtocol :: setup_with_transport (
252
223
"<IPC>" . to_string ( ) ,
253
224
self . source_dir ,
254
225
self . manifest_path ,
255
- configuration,
256
226
build_id,
257
227
self . cache_dir ,
258
228
Sender :: from ( ipc. rpc_out ) ,
0 commit comments