Skip to content

Commit d476e67

Browse files
authored
Merge pull request #643 from bloomberg/file_local_require
fix #274: provide type safe file local variables
2 parents f9e0e47 + 182fef8 commit d476e67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1219
-593
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ env:
44
node_js:
55
- "4.0"
66

7-
script: npm run coveralls
7+
# Not a very reliable service..
8+
# script: npm run coveralls
89

jscomp/Makefile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,32 +36,32 @@ release:snapshot
3636
# TODO: should be done after we do the build
3737
# Carefully check the stored data if it is platform independent
3838

39-
./bin/ocamlpack: ./bin/ocamlpack.mli ./bin/ocamlpack.ml
39+
./bin/bspack: ./bin/bspack.mli ./bin/bspack.ml
4040
$(NATIVE) -w -a -I bin -I +compiler-libs ocamlcommon.cmxa unix.cmxa $^ -o $@
4141

4242
## order matters
43-
_build/ocamlpack: _build/ext/ext.cmxa _build/common/common.cmxa _build/depends/depends.cmxa _build/ocamlpack_main.cmx
43+
_build/bspack: _build/ext/ext.cmxa _build/common/common.cmxa _build/depends/depends.cmxa _build/bspack_main.cmx
4444
$(NATIVE) -I +compiler-libs ocamlcommon.cmxa unix.cmxa $^ -o $@
4545

46-
snapshot: ./bin/ocamlpack snapshotcmj
46+
snapshot: ./bin/bspack snapshotcmj
4747
$(MAKE) snapshotml
4848

49-
snapshotml:./bin/ocamlpack ./bin/compiler.mllib ./bin/bs_ppx.mllib
49+
snapshotml:./bin/bspack ./bin/compiler.mllib ./bin/bs_ppx.mllib
5050
@echo "Snapshot ml"
5151
$< bin/compiler.mllib > bin/compiler.ml
5252
$< bin/bs_ppx.mllib > bin/bs_ppx.ml
5353
snapshotcmj:
5454
@echo "Collecting cmj files"
5555
ocamlbuild -cflags $(OCAMLBUILD_CFLAGS) -lflags -I,+compiler-libs,ocamlcommon.cmxa js_pack.native --
5656

57-
bootocamlpack: ./bin/ocamlpack
58-
@echo "Bootstrap ocamlpack"
59-
./bin/ocamlpack bin/ocamlpack.mllib > ./bin/ocamlpack.ml
60-
$(NATIVE) -w -40 -I +compiler-libs unix.cmxa ocamlcommon.cmxa -I bin bin/ocamlpack.mli bin/ocamlpack.ml -o bin/ocamlpack
61-
@echo "Using the bootstrapped ocamlpack to genreate new ocamlpack.ml: `date`"
62-
./bin/ocamlpack bin/ocamlpack.mllib > ./bin/ocamlpack.ml
63-
@echo "Bootstrap seems finished, please check diffs in ocamlpack"
64-
git diff bin/ocamlpack.ml
57+
bootbspack: ./bin/bspack
58+
@echo "Bootstrap bspack"
59+
./bin/bspack bin/bspack.mllib > ./bin/bspack.ml
60+
$(NATIVE) -w -40 -I +compiler-libs unix.cmxa ocamlcommon.cmxa -I bin bin/bspack.mli bin/bspack.ml -o bin/bspack
61+
@echo "Using the bootstrapped bspack to genreate new bspack.ml: `date`"
62+
./bin/bspack bin/bspack.mllib > ./bin/bspack.ml
63+
@echo "Bootstrap seems finished, please check diffs in bspack"
64+
git diff bin/bspack.ml
6565

6666
releasebuild:
6767
@echo "Make release compiler"
@@ -100,17 +100,17 @@ world-test:
100100
cd test && $(MAKE) all
101101
@echo "Making test finsihed"
102102

103-
travis-world-test:./bin/ocamlpack
103+
travis-world-test:./bin/bspack
104104
@echo "Generating the compiler"
105105
rm -f bin/compiler.ml bin/bs_ppx.ml
106106
$(MAKE) snapshotml
107107
@echo "Generating the compiler finished"
108108
$(MAKE) world-test
109109

110-
# no depend on ./bin/ocamlpack ./bin/bsc
110+
# no depend on ./bin/bspack ./bin/bsc
111111
# since in npm mode, they are generated from a single file
112112
install:
113-
cp ./bin/bsc ./bin/bsppx ../bin/
113+
cp ./bin/bsc ./bin/bsppx ./bin/bspack ../bin/
114114
cp ./runtime/*.cmt* ./runtime/*.cmj* ./stdlib/*.cm* ./others/*.cm* ../lib/ocaml/
115115
cp ./runtime/js.ml ./runtime/js.cmi ./runtime/js_array.mli ./runtime/js_array.ml ./runtime/js_array.cmi ./runtime/js_string.ml ./runtime/js_string.mli ./runtime/js_string.cmi ./runtime/js_re.ml ./runtime/js_re.mli ./runtime/js_re.cmi ./runtime/js_unsafe.cmi ../lib/ocaml/
116116

jscomp/bin/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ppx_metaquot
2-
ocamlpack
2+
bspack
33
bsc

0 commit comments

Comments
 (0)