Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#### :house: Internal

- Remove internal/unused `-bs-v` flag. https://github.com/rescript-lang/rescript/pull/7627
- Remove unused `-bs-D` and `-bs-list-conditionals` flags. https://github.com/rescript-lang/rescript/pull/7631

# 12.0.0-beta.1

Expand Down
20 changes: 1 addition & 19 deletions compiler/bsc/rescript_compiler_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,6 @@ let eval (s : string) ~suffix =

(* let (//) = Filename.concat *)

module Pp = Rescript_cpp
let define_variable s =
match Ext_string.split ~keep_empty:true s '=' with
| [key; v] ->
if not (Pp.define_key_value key v) then
Bsc_args.bad_arg ("illegal definition: " ^ s)
| _ -> Bsc_args.bad_arg ("illegal definition: " ^ s)

let print_standard_library () =
let standard_library = Config.standard_library in
print_string standard_library;
Expand Down Expand Up @@ -297,11 +289,7 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
( "-bs-syntax-only",
set Js_config.syntax_only,
"*internal* Only check syntax" );
( "-bs-g",
unit_call (fun _ ->
Js_config.debug := true;
Pp.replace_directive_bool "DEBUG" true),
"Debug mode" );
("-bs-g", set Js_config.debug, "Debug mode");
( "-bs-package-name",
string_call Js_packages_state.set_package_name,
"*internal* Set package name, useful when you want to produce npm \
Expand All @@ -323,9 +311,6 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
( "-unboxed-types",
set Clflags.unboxed_types,
"*internal* Unannotated unboxable types will be unboxed" );
( "-bs-D",
string_call define_variable,
"Define conditional variable e.g, -D DEBUG=true" );
( "-bs-unsafe-empty-array",
set Config.unsafe_empty_array,
"*internal* Allow [||] to be polymorphic" );
Expand All @@ -341,9 +326,6 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
The current heuristic for 'auto'\n\
checks that the TERM environment variable exists and is\n\
not empty or \"dumb\", and that isatty(stderr) holds." );
( "-bs-list-conditionals",
unit_call (fun () -> Pp.list_variables Format.err_formatter),
"*internal* List existing conditional variables" );
( "-e",
string_call (fun s -> eval s ~suffix:Literals.suffix_res),
"(experimental) set the string to be evaluated in ReScript syntax" );
Expand Down
5 changes: 1 addition & 4 deletions compiler/core/bs_conditional_initial.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ let setup_env () =
Matching.names_from_construct_pattern :=
Matching_polyfill.names_from_construct_pattern;

Rescript_cpp.replace_directive_bool "BS" true;
Rescript_cpp.replace_directive_bool "JS" true;
Printtyp.print_res_poly_identifier := Res_printer.polyvar_ident_to_string;
Rescript_cpp.replace_directive_string "BS_VERSION" Bs_version.version
Printtyp.print_res_poly_identifier := Res_printer.polyvar_ident_to_string
(*; Switch.cut := 100*)
(* tweakable but not very useful *)

Expand Down
109 changes: 0 additions & 109 deletions compiler/ml/rescript_cpp.ml

This file was deleted.

35 changes: 0 additions & 35 deletions compiler/ml/rescript_cpp.mli

This file was deleted.