@@ -53,7 +53,6 @@ pub fn generate_asts(
53
53
root_package. to_owned ( ) ,
54
54
& source_file. implementation . path . to_owned ( ) ,
55
55
& build_state. bsc_path ,
56
- & build_state. workspace_root ,
57
56
) ;
58
57
59
58
let iast_result = match source_file. interface . as_ref ( ) . map ( |i| i. path . to_owned ( ) ) {
@@ -62,7 +61,6 @@ pub fn generate_asts(
62
61
root_package. to_owned ( ) ,
63
62
& interface_file_path. to_owned ( ) ,
64
63
& build_state. bsc_path ,
65
- & build_state. workspace_root ,
66
64
)
67
65
. map ( Some ) ,
68
66
_ => Ok ( None ) ,
@@ -243,21 +241,12 @@ pub fn parser_args(
243
241
config : & config:: Config ,
244
242
root_config : & config:: Config ,
245
243
filename : & Path ,
246
- workspace_root : & Option < PathBuf > ,
247
244
root_path : & Path ,
248
245
contents : & str ,
249
246
) -> ( PathBuf , Vec < String > ) {
250
247
let file = & filename;
251
248
let ast_path = helpers:: get_ast_path ( file) ;
252
- let ppx_flags = config:: flatten_ppx_flags (
253
- & if let Some ( workspace_root) = workspace_root {
254
- workspace_root. join ( "node_modules" )
255
- } else {
256
- root_path. join ( "node_modules" )
257
- } ,
258
- & filter_ppx_flags ( & config. ppx_flags , contents) ,
259
- & config. name ,
260
- ) ;
249
+ let ppx_flags = config:: flatten_ppx_flags ( root_path, & filter_ppx_flags ( & config. ppx_flags , contents) ) ;
261
250
let jsx_args = root_config. get_jsx_args ( ) ;
262
251
let jsx_module_args = root_config. get_jsx_module_args ( ) ;
263
252
let jsx_mode_args = root_config. get_jsx_mode_args ( ) ;
@@ -292,7 +281,6 @@ fn generate_ast(
292
281
root_package : packages:: Package ,
293
282
filename : & Path ,
294
283
bsc_path : & PathBuf ,
295
- workspace_root : & Option < PathBuf > ,
296
284
) -> Result < ( PathBuf , Option < helpers:: StdErr > ) , String > {
297
285
let file_path = PathBuf :: from ( & package. path ) . join ( filename) ;
298
286
let contents = helpers:: read_file ( & file_path) . expect ( "Error reading file" ) ;
@@ -302,7 +290,6 @@ fn generate_ast(
302
290
& package. config ,
303
291
& root_package. config ,
304
292
filename,
305
- workspace_root,
306
293
& root_package. path ,
307
294
& contents,
308
295
) ;
0 commit comments