44
44
* and use the proper interfaces as stated by the apiVersion.
45
45
*
46
46
* -----------------------------
47
- * Version History:
48
- * v2: Remove refmt support (removes compiler.reason apis)
47
+ * Version History: * v2: Remove refmt support (removes compiler.reason apis)
48
+ * v3: Switched to Uncurried mode by default (requires third party packages
49
+ to be built with uncurried: true in bsconfig.json). Also added
50
+ `config.uncurried` to the BundleConfig.
49
51
* *)
50
- let apiVersion = " 2 "
52
+ let apiVersion = " 3 "
51
53
52
54
module Js = Jsoo_common. Js
53
55
@@ -73,12 +75,18 @@ module BundleConfig = struct
73
75
mutable module_system : Js_packages_info .module_system ;
74
76
mutable filename : string option ;
75
77
mutable warn_flags : string ;
78
+
79
+ (* This one can't be mutated since we only provide
80
+ third-party packages that were compiled for uncurried
81
+ mode *)
82
+ uncurried : bool ;
76
83
}
77
84
78
85
let make () = {
79
86
module_system= Js_packages_info. NodeJS ;
80
87
filename= None ;
81
88
warn_flags= Bsc_warnings. defaults_w;
89
+ uncurried= (! Config. uncurried = Uncurried );
82
90
}
83
91
84
92
@@ -661,13 +669,16 @@ module Export = struct
661
669
);
662
670
" warn_flags" ,
663
671
inject @@ (Js. string config.warn_flags);
672
+ " uncurried" , inject @@ (Js. bool config.uncurried);
664
673
|]))
665
674
);
666
675
|])
667
676
668
677
end
669
678
670
679
let () =
680
+ (* From now on the default setting will be uncurried mode *)
681
+ Config. uncurried := Uncurried ;
671
682
export " rescript_compiler"
672
683
(Js.Unsafe. (obj
673
684
[|
0 commit comments