@@ -4,9 +4,7 @@ let signFile s = s
4
4
type cliCommand = Add of string | Clean | NoOp | Rm of string list
5
5
6
6
let cli () =
7
- let bsVersion = ref None in
8
7
let cliCommand = ref NoOp in
9
- let setBsVersion s = bsVersion := Some s in
10
8
let usage = " genType version " ^ version in
11
9
let versionAndExit () =
12
10
print_endline usage;
@@ -23,7 +21,6 @@ let cli () =
23
21
and setClean () = Clean |> setCliCommand
24
22
and speclist =
25
23
[
26
- (" -bs-version" , Arg. String setBsVersion, " set the bucklescript version" );
27
24
(" -clean" , Arg. Unit setClean, " clean all the generated files" );
28
25
(" -cmt-add" , Arg. String setAdd, " compile a .cmt[i] file" );
29
26
( " -cmt-rm" ,
@@ -33,7 +30,7 @@ let cli () =
33
30
(" --version" , Arg. Unit versionAndExit, " show version information and exit" );
34
31
]
35
32
in
36
- let executeCliCommand ~ bsVersion cliCommand =
33
+ let executeCliCommand cliCommand =
37
34
match cliCommand with
38
35
| Add s ->
39
36
Log_.Color. forceColor := true ;
@@ -45,14 +42,12 @@ let cli () =
45
42
(cmt, mlast)
46
43
| _ -> assert false
47
44
in
48
- let config =
49
- Paths. readConfig ~bs Version ~namespace: (cmt |> Paths. findNameSpace)
50
- in
45
+ let config = Paths. readConfig ~namespace: (cmt |> Paths. findNameSpace) in
51
46
if ! Debug. basic then Log_. item " Add %s %s\n " cmt mlast;
52
47
cmt |> GenTypeMain. processCmtFile ~sign File ~config ;
53
48
exit 0
54
49
| Clean ->
55
- let config = Paths. readConfig ~bs Version ~ namespace:None in
50
+ let config = Paths. readConfig ~namespace: None in
56
51
let sourceDirs = ModuleResolver. readSourceDirs ~config in
57
52
if ! Debug. basic then
58
53
Log_. item " Clean %d dirs\n " (sourceDirs.dirs |> List. length);
@@ -83,7 +78,7 @@ let cli () =
83
78
(* somehow the CMT hook is passing an absolute path here *)
84
79
let cmt = cmtAbsolutePath |> Paths. relativePathFromBsLib in
85
80
let config =
86
- Paths. readConfig ~bs Version ~ namespace: (cmt |> Paths. findNameSpace)
81
+ Paths. readConfig ~namespace: (cmt |> Paths. findNameSpace)
87
82
in
88
83
let outputFile = cmt |> Paths. getOutputFile ~config in
89
84
if ! Debug. basic then Log_. item " Remove %s\n " cmt;
@@ -98,7 +93,7 @@ let cli () =
98
93
| _ -> print_endline s
99
94
in
100
95
Arg. parse speclist anonArg usage;
101
- executeCliCommand ~bs Version: ! bsVersion ! cliCommand
96
+ executeCliCommand ! cliCommand
102
97
;;
103
98
104
99
cli ()
0 commit comments