@@ -182,7 +182,8 @@ let rec walk_all_deps_aux
182
182
(paths : string list )
183
183
~(top : top )
184
184
(dir : string )
185
- (queue : _ Queue.t ) =
185
+ (queue : _ Queue.t )
186
+ ~pinned_dependencies =
186
187
let bsconfig_json = dir // Literals. bsconfig_json in
187
188
match Ext_json_parse. parse_json_from_file bsconfig_json with
188
189
| Obj {map; loc} ->
@@ -223,7 +224,8 @@ let rec walk_all_deps_aux
223
224
let package_dir =
224
225
Bsb_pkg. resolve_bs_package ~cwd: dir
225
226
(Bsb_pkg_types. string_as_package new_package) in
226
- walk_all_deps_aux visited package_stacks ~top: (Expect_name new_package) package_dir queue ;
227
+ walk_all_deps_aux visited package_stacks ~top: (Expect_name new_package) package_dir queue
228
+ ~pinned_dependencies ;
227
229
| _ ->
228
230
Bsb_exception. errorf ~loc
229
231
" %s expect an array"
@@ -232,15 +234,22 @@ let rec walk_all_deps_aux
232
234
|> ignore in
233
235
begin
234
236
explore_deps Bsb_build_schemas. bs_dependencies;
235
- if top = Expect_none then explore_deps Bsb_build_schemas. bs_dev_dependencies;
237
+ begin match top with
238
+ | Expect_none ->
239
+ explore_deps Bsb_build_schemas. bs_dev_dependencies
240
+ | Expect_name n when
241
+ Set_string. mem pinned_dependencies n ->
242
+ explore_deps Bsb_build_schemas. bs_dev_dependencies
243
+ | Expect_name _ -> ()
244
+ end ;
236
245
Queue. add {top ; proj_dir = dir} queue;
237
246
Hash_string. add visited cur_package_name dir;
238
247
end
239
248
| _ -> ()
240
249
241
250
242
- let walk_all_deps dir : package_context Queue.t =
251
+ let walk_all_deps dir ~ pinned_dependencies : package_context Queue. t =
243
252
let visited = Hash_string. create 0 in
244
253
let cb = Queue. create () in
245
- walk_all_deps_aux visited [] ~top: Expect_none dir cb ;
254
+ walk_all_deps_aux visited [] ~top: Expect_none dir cb ~pinned_dependencies ;
246
255
cb
0 commit comments