Skip to content

Commit 419d9f6

Browse files
authored
Merge pull request #4133 from BuckleScript/build_speed
make dev build faster again
2 parents 97fcbd0 + f67cba8 commit 419d9f6

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed
File renamed without changes.

jscomp/main/jsoo_refmt_main.mli renamed to jscomp/refmt/jsoo_refmt_main.mli

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

25-
val make_compiler : name:string -> prefix:string -> (Lexing.lexbuf -> Parsetree.structure) -> unit
25+
26+
val make_compiler : name:string -> prefix:string -> (Lexing.lexbuf -> Parsetree.structure) -> unit
File renamed without changes.

jscomp/snapshot.ninja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ build $SNAP/unstable/js_compiler.ml: bspack | ./bin/bspack.exe
6565
main = Jsoo_main
6666

6767
build $SNAP/unstable/js_refmt_compiler.ml: bspack | ./bin/bspack.exe
68-
flags = -D BS_COMPILER_IN_BROWSER=true -D BS_RELEASE_BUILD=true -bs-MD -module-alias Config=Config_whole_compiler -bs-exclude-I config -I $OCAML_SRC_UTILS -I $OCAML_SRC_PARSING -I $OCAML_SRC_TYPING -I $OCAML_SRC_BYTECOMP -I $OCAML_SRC_DRIVER -I js_parser -I stubs -I ext -I syntax -I depends -I common -I core -I super_errors -I bsb -I outcome_printer -I main
68+
flags = -D BS_COMPILER_IN_BROWSER=true -D BS_RELEASE_BUILD=true -bs-MD -module-alias Config=Config_whole_compiler -bs-exclude-I config -I $OCAML_SRC_UTILS -I $OCAML_SRC_PARSING -I $OCAML_SRC_TYPING -I $OCAML_SRC_BYTECOMP -I $OCAML_SRC_DRIVER -I js_parser -I stubs -I ext -I syntax -I depends -I common -I core -I super_errors -I bsb -I outcome_printer -I main -I refmt
6969
main = Jsoo_refmt_main
7070
# -o $@
7171
# Check it later

scripts/tasks.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,21 @@ var sourceDirs = [
2121
"runtime",
2222
"test",
2323
"ounit_tests",
24-
"bsb_helper"
24+
"bsb_helper",
25+
"refmt"
2526
];
2627

2728
var buildAppending = false;
2829
var isBuilding = false;
2930
var ninjaFile = require("./ninja.js");
3031
var jscompDir = path.join("..", "jscomp");
32+
/**
33+
*
34+
* @param {Date} d
35+
*/
36+
function showDate(d) {
37+
return `${d.getHours()}:${d.getMinutes()}:${d.getSeconds()}`;
38+
}
3139
function rebuild() {
3240
if (isBuilding) {
3341
buildAppending = true;
@@ -53,14 +61,14 @@ function buildFinished(code, signal) {
5361
} else {
5462
if (code !== 0) {
5563
console.log(`File "BUILD", line 1, characters 1-1:`);
56-
console.log(`Error: Failed to build`);
64+
console.log(`Error: Failed to build ${showDate(new Date())}`);
5765
}
5866
console.log(">>>> Finish compiling (options: R|clean|config)");
5967
// TODO: check ninja exit error code
6068
if (code === 0) {
6169
// This is not always correct
6270
// ninjaFile.updateDev();
63-
// This file is cached
71+
// This file is cached
6472
child_process.fork(path.join(__dirname, "ninja.js"), ["-dev"]);
6573
}
6674
}

0 commit comments

Comments
 (0)