Skip to content

Commit 1223c8f

Browse files
authored
Merge pull request #3832 from BuckleScript/fix_release_issues
update changes, fix release issues
2 parents a975086 + 846fd1d commit 1223c8f

File tree

10 files changed

+48
-37
lines changed

10 files changed

+48
-37
lines changed

Changes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Features
88
- #3799 Improve code gen, better code equality for block
99
- #3778 #3770 Improve pattern match compilation against the outer-most staticfail
1010
- #3764 better code gen for lazy evaluation
11+
- #3822 allow `f##"Content-Type"` for uncommon property name
1112

1213
Fixes
1314
- #3809 Escape question mark and ampersand to special chars
@@ -18,10 +19,17 @@ Fixes
1819
- #3781 #3783 quote package path properly
1920
- #3793 pass bs-version to genType
2021
- #3674 installation from master works out of box
22+
- #3823 fix reason language server
2123

2224
Docs
2325
- #3795 Fix docs for stringifyAny
2426
- #3788 Rename getUnasfe to getUnsafe
27+
- #3830 fix isSortedExample
28+
- #3829 fix mapWithDefault example
29+
- #3828 fix getExn example
30+
- #3827 fix partition example
31+
- #3826 simplify truncateToLengthUnsafe example
32+
2533

2634

2735

lib/4.02.3/bsdep.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29743,7 +29743,7 @@ val jsx_version : int ref
2974329743
val refmt : string option ref
2974429744
val is_reason : bool ref
2974529745

29746-
val no_js_stdout : bool ref
29746+
val js_stdout : bool ref
2974729747
end = struct
2974829748
#1 "js_config.ml"
2974929749
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -29857,7 +29857,7 @@ let refmt = ref None
2985729857

2985829858
let is_reason = ref false
2985929859

29860-
let no_js_stdout = ref false
29860+
let js_stdout = ref true
2986129861
end
2986229862
module Bs_warnings : sig
2986329863
#1 "bs_warnings.mli"

lib/4.02.3/bsppx.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2648,7 +2648,7 @@ val jsx_version : int ref
26482648
val refmt : string option ref
26492649
val is_reason : bool ref
26502650

2651-
val no_js_stdout : bool ref
2651+
val js_stdout : bool ref
26522652
end = struct
26532653
#1 "js_config.ml"
26542654
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -2762,7 +2762,7 @@ let refmt = ref None
27622762

27632763
let is_reason = ref false
27642764

2765-
let no_js_stdout = ref false
2765+
let js_stdout = ref true
27662766
end
27672767
(** Interface as module *)
27682768
module Asttypes

lib/4.02.3/unstable/all_ounit_tests.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7395,7 +7395,7 @@ val jsx_version : int ref
73957395
val refmt : string option ref
73967396
val is_reason : bool ref
73977397

7398-
val no_js_stdout : bool ref
7398+
val js_stdout : bool ref
73997399
end = struct
74007400
#1 "js_config.ml"
74017401
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -7509,7 +7509,7 @@ let refmt = ref None
75097509

75107510
let is_reason = ref false
75117511

7512-
let no_js_stdout = ref false
7512+
let js_stdout = ref true
75137513
end
75147514
module Ml_binary : sig
75157515
#1 "ml_binary.mli"

lib/4.02.3/unstable/bspack.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8162,7 +8162,7 @@ val jsx_version : int ref
81628162
val refmt : string option ref
81638163
val is_reason : bool ref
81648164

8165-
val no_js_stdout : bool ref
8165+
val js_stdout : bool ref
81668166
end = struct
81678167
#1 "js_config.ml"
81688168
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -8276,7 +8276,7 @@ let refmt = ref None
82768276

82778277
let is_reason = ref false
82788278

8279-
let no_js_stdout = ref false
8279+
let js_stdout = ref true
82808280
end
82818281
module Ml_binary : sig
82828282
#1 "ml_binary.mli"

lib/4.02.3/unstable/js_compiler.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11693,7 +11693,7 @@ val jsx_version : int ref
1169311693
val refmt : string option ref
1169411694
val is_reason : bool ref
1169511695

11696-
val no_js_stdout : bool ref
11696+
val js_stdout : bool ref
1169711697
end = struct
1169811698
#1 "js_config.ml"
1169911699
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -11807,7 +11807,7 @@ let refmt = ref None
1180711807

1180811808
let is_reason = ref false
1180911809

11810-
let no_js_stdout = ref false
11810+
let js_stdout = ref true
1181111811
end
1181211812
module Bs_warnings : sig
1181311813
#1 "bs_warnings.mli"
@@ -116287,7 +116287,7 @@ let lambda_as_module
116287116287
(if !Js_config.bs_suffix then Literals.suffix_bs_js else Literals.suffix_js)
116288116288
in
116289116289
let package_info = Js_packages_state.get_packages_info () in
116290-
if Js_packages_info.is_empty package_info && not !Js_config.no_js_stdout then
116290+
if Js_packages_info.is_empty package_info && !Js_config.js_stdout then
116291116291
Js_dump_program.dump_deps_program ~output_prefix NodeJS lambda_output stdout
116292116292
else
116293116293
Js_packages_info.iter package_info (fun {module_system; path = _path} ->

lib/4.02.3/unstable/native_ppx.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11671,7 +11671,7 @@ val jsx_version : int ref
1167111671
val refmt : string option ref
1167211672
val is_reason : bool ref
1167311673

11674-
val no_js_stdout : bool ref
11674+
val js_stdout : bool ref
1167511675
end = struct
1167611676
#1 "js_config.ml"
1167711677
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -11785,7 +11785,7 @@ let refmt = ref None
1178511785

1178611786
let is_reason = ref false
1178711787

11788-
let no_js_stdout = ref false
11788+
let js_stdout = ref true
1178911789
end
1179011790
module Bs_warnings : sig
1179111791
#1 "bs_warnings.mli"

lib/4.02.3/whole_compiler.ml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4998,7 +4998,7 @@ val jsx_version : int ref
49984998
val refmt : string option ref
49994999
val is_reason : bool ref
50005000

5001-
val no_js_stdout : bool ref
5001+
val js_stdout : bool ref
50025002
end = struct
50035003
#1 "js_config.ml"
50045004
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -5112,7 +5112,7 @@ let refmt = ref None
51125112

51135113
let is_reason = ref false
51145114

5115-
let no_js_stdout = ref false
5115+
let js_stdout = ref true
51165116
end
51175117
module Ast_reason_pp : sig
51185118
#1 "ast_reason_pp.mli"
@@ -113982,7 +113982,7 @@ let lambda_as_module
113982113982
(if !Js_config.bs_suffix then Literals.suffix_bs_js else Literals.suffix_js)
113983113983
in
113984113984
let package_info = Js_packages_state.get_packages_info () in
113985-
if Js_packages_info.is_empty package_info && not !Js_config.no_js_stdout then
113985+
if Js_packages_info.is_empty package_info && !Js_config.js_stdout then
113986113986
Js_dump_program.dump_deps_program ~output_prefix NodeJS lambda_output stdout
113987113987
else
113988113988
Js_packages_info.iter package_info (fun {module_system; path = _path} ->
@@ -125927,7 +125927,6 @@ end = struct
125927125927

125928125928
let process_interface_file ppf name =
125929125929
Js_implementation.interface ppf name (Compenv.output_prefix name)
125930-
125931125930
let process_implementation_file ppf name =
125932125931
Js_implementation.implementation ppf name (Compenv.output_prefix name)
125933125932

@@ -126239,9 +126238,9 @@ let buckle_script_flags : (string * Arg.spec * string) list =
126239126238
)
126240126239

126241126240
:: Ocaml_options.mk_impl
126242-
(fun file -> Js_config.no_js_stdout := true; impl file )
126241+
(fun file -> Js_config.js_stdout := false; impl file )
126243126242
:: Ocaml_options.mk_intf
126244-
(fun file -> Js_config.no_js_stdout := true ; intf file)
126243+
(fun file -> Js_config.js_stdout := false ; intf file)
126245126244
:: Ocaml_options.mk__ anonymous
126246126245
:: Ocaml_options.ocaml_options
126247126246

scripts/buildocaml.js

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ var path = require("path");
55
var fs = require("fs");
66

77
var ocamlSrcDir = path.join(__dirname, "..", "ocaml");
8+
var ocamlVersionFilePath = path.join(ocamlSrcDir, "VERSION");
9+
10+
/**
11+
* Ensures the ocaml folder exists at the root of the project, either from the submodule,
12+
* or by extracting the vendor/ocaml.tar.gz there
13+
*/
14+
function ensureOCamlExistsSync() {
15+
if (!fs.existsSync(ocamlSrcDir)) {
16+
fs.mkdirSync(ocamlSrcDir);
17+
}
18+
if (!fs.existsSync(ocamlVersionFilePath)) {
19+
cp.execSync(`tar xzvf ../vendor/ocaml.tar.gz`, {
20+
cwd: ocamlSrcDir,
21+
stdio: [0, 1, 2]
22+
});
23+
}
24+
}
25+
826
/**
927
* @type {string}
1028
*/
@@ -19,16 +37,10 @@ function getVersionPrefix() {
1937
return cached;
2038
}
2139

22-
var file = path.join(__dirname, "..", "ocaml", "VERSION");
23-
if (!fs.existsSync(file)) {
24-
cp.execSync(`tar xzvf ../vendor/ocaml.tar.gz`, {
25-
cwd: ocamlSrcDir,
26-
stdio: [0, 1, 2]
27-
});
28-
}
40+
ensureOCamlExistsSync();
2941

30-
console.log(`${file} is used in version detection`);
31-
var version = fs.readFileSync(file, "ascii");
42+
console.log(`${ocamlVersionFilePath} is used in version detection`);
43+
var version = fs.readFileSync(ocamlVersionFilePath, "ascii");
3244
cached = version.substr(0, version.indexOf("+"));
3345
return cached;
3446
}
@@ -39,15 +51,7 @@ exports.getVersionPrefix = getVersionPrefix;
3951
* @param {boolean} config
4052
*/
4153
function build(config) {
42-
if (!fs.existsSync(ocamlSrcDir)) {
43-
fs.mkdirSync(ocamlSrcDir);
44-
}
45-
if (!fs.existsSync(path.join(ocamlSrcDir, "VERSION"))) {
46-
cp.execSync(`tar xzvf ../vendor/ocaml.tar.gz`, {
47-
cwd: ocamlSrcDir,
48-
stdio: [0, 1, 2]
49-
});
50-
}
54+
ensureOCamlExistsSync();
5155

5256
var prefix = path.normalize(
5357
path.join(__dirname, "..", "native", getVersionPrefix())

vendor/ocaml.tar.gz

350 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)