Skip to content

Commit a4a2128

Browse files
committed
-bin-annot by default, -bs-no-bin-annot for power users
1 parent 098ab37 commit a4a2128

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

docs/docson/build-schema.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,15 @@
177177
},
178178
"ppx-flags": {
179179
"$ref": "#/definitions/ppx-specs",
180-
"description": "TODO: ppx flags"
180+
"description": "syntax is package_name/binary, for example: reason/reactjs_jsx_ppx.native"
181181
},
182182
"bsc-flags": {
183183
"$ref": "#/definitions/stringArray",
184184
"description": "A list of flags for bsc.exe"
185185
},
186186
"package-specs": {
187187
"$ref": "#/definitions/package-specs",
188-
"description": "TODO: currently only support commonjs"
188+
"description": "currently support commonjs, amdjs and google module"
189189
},
190190
"ocamllex": {
191191
"type": "string",
@@ -201,22 +201,24 @@
201201
},
202202
"refmt": {
203203
"type": "string",
204-
"description": "Path to refmt"
204+
"description": "Path to refmt for Reason syntax, for example: reason/refmt_impl.native"
205205
},
206206
"bs-external-includes": {
207207
"$ref": "#/definitions/stringArray",
208-
"description": "external include directories, which will be applied -I to all compilation units, it is not needed in most cases"
208+
"description": "external include directories, which will be applied -I to all compilation units, it is *not needed* in most cases"
209209
},
210210
"sources": {
211211
"oneOf": [
212212
{
213213
"type": "array",
214214
"items": {
215215
"$ref": "#/definitions/sourceItem"
216-
}
216+
},
217+
"description" : "A list of source items"
217218
},
218219
{
219-
"$ref": "#/definitions/sourceItem"
220+
"$ref": "#/definitions/sourceItem",
221+
"description": "A single source item"
220222
}
221223
]
222224
},

jscomp/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,10 @@ OTHER_CORE_SRCS= bsppx_main bspack_main jsoo_main bspp_main js_cmi_datasets \
251251
js_main
252252
OTHER_CORE_CMXS= $(addprefix core/, $(addsuffix .cmx, $(OTHER_CORE_SRCS)))
253253
BSB_SRCS= bsb_config bsb_build_schemas bsb_build_util \
254-
bsb_dep_infos bsb_dir bsb_ninja \
255-
bsb_build_ui bsb_default bsb_gen\
254+
bsb_dir bsb_ninja \
255+
bsb_build_ui bsb_default\
256+
bsb_dep_infos\
257+
bsb_gen\
256258
bsb_unix
257259

258260
BSB_CMXS=$(addprefix bsb/, $(addsuffix .cmx, $(BSB_SRCS)))

jscomp/bin/whole_compiler.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105780,6 +105780,9 @@ let buckle_script_flags =
105780105780
" only check syntax"
105781105781
)
105782105782
::
105783+
("-bs-no-bin-annot", Arg.Clear Clflags.binary_annotations,
105784+
" disable binary annotations (by default on)")
105785+
::
105783105786
("-bs-eval",
105784105787
Arg.String set_eval_string,
105785105788
" (experimental) Set the string to be evaluated, note this flag will be conflicted with -bs-main"
@@ -105883,6 +105886,7 @@ let buckle_script_flags =
105883105886
let _ =
105884105887
Clflags.unsafe_string := false;
105885105888
Clflags.debug := true;
105889+
Clflags.binary_annotations := true;
105886105890
Bs_conditional_initial.setup_env ();
105887105891
try
105888105892
Compenv.readenv ppf Before_args;

jscomp/core/js_main.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ let buckle_script_flags =
155155
" only check syntax"
156156
)
157157
::
158+
("-bs-no-bin-annot", Arg.Clear Clflags.binary_annotations,
159+
" disable binary annotations (by default on)")
160+
::
158161
("-bs-eval",
159162
Arg.String set_eval_string,
160163
" (experimental) Set the string to be evaluated, note this flag will be conflicted with -bs-main"
@@ -258,6 +261,7 @@ let buckle_script_flags =
258261
let _ =
259262
Clflags.unsafe_string := false;
260263
Clflags.debug := true;
264+
Clflags.binary_annotations := true;
261265
Bs_conditional_initial.setup_env ();
262266
try
263267
Compenv.readenv ppf Before_args;

0 commit comments

Comments
 (0)