Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Nov 29, 2020
1 parent 92dad73 commit 88f68e1
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
- create-opam-switch
- run:
name: Install extra deps from opam
command: opam install js_of_ocaml.3.4.0 | cat
command: opam install js_of_ocaml.3.6.0 | cat
- save-opam-cache
- run:
name: Build flow
Expand Down
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,6 @@ clean:
rm -f flow.odocl

build-flow: _build/scripts/ppx_gen_flowlibs.exe $(BUILT_OBJECT_FILES) $(COPIED_FLOWLIB) $(COPIED_PRELUDE) $(INTERNAL_BUILD_FLAGS)
# Both lwt and lwt_ppx provide ppx stuff. Fixed in lwt 4.0.0
# https://github.com/ocsigen/lwt/issues/453
export OCAMLFIND_IGNORE_DUPS_IN="$(shell ocamlfind query lwt)"; \
$(OCB) $(INTERNAL_FLAGS) $(INCLUDE_OPTS) -tag thread $(NATIVE_FINDLIB_OPTS) \
-lflags "$(LINKER_FLAGS)" \
$(RELEASE_TAGS) \
Expand Down Expand Up @@ -383,15 +380,13 @@ bin/flow$(EXE): build-flow
cp _build/src/flow.native $@

$(BUILT_OUNIT_TESTS): $(BUILT_OBJECT_FILES) FORCE
export OCAMLFIND_IGNORE_DUPS_IN="$(shell ocamlfind query lwt)"; \
$(OCB) $(INTERNAL_FLAGS) $(INCLUDE_OPTS) -tag thread $(NATIVE_FINDLIB_OPTS) \
-I $(patsubst _build/%,%,$(@D)) \
-lflags "$(LINKER_FLAGS)" \
$(patsubst _build/%,%,$@)

.PHONY: build-ounit-tests
build-ounit-tests: $(BUILT_OBJECT_FILES) FORCE
export OCAMLFIND_IGNORE_DUPS_IN="$(shell ocamlfind query lwt)"; \
$(OCB) $(INTERNAL_FLAGS) $(INCLUDE_OPTS) -tag thread $(NATIVE_FINDLIB_OPTS) \
$(foreach dir,$(dir $(OUNIT_TESTS)),-I $(dir)) \
-lflags "$(LINKER_FLAGS)" \
Expand Down Expand Up @@ -421,16 +416,12 @@ test: bin/flow$(EXE)

js: _build/scripts/ppx_gen_flowlibs.exe $(BUILT_OBJECT_FILES) $(COPIED_FLOWLIB)
mkdir -p bin
# NOTE: temporarily disabling warning 31 because
# src/hack_forked/third-party/core/result.ml and the opam `result` module both define
# result.cma, and this is the most expedient (though fragile) way to unblock
# ourselves.
$(OCB) \
-pkg js_of_ocaml \
-build-dir _build \
-lflags -custom \
$(INCLUDE_OPTS) $(JS_FINDLIB_OPTS) \
-lflags "$(BYTECODE_LINKER_FLAGS) -warn-error -31" \
-lflags "$(BYTECODE_LINKER_FLAGS)" \
src/flow_dot_js.byte
# js_of_ocaml has no ability to upgrade warnings to errors, but we want to
# error if, for example, there are any unimplemented C primitives.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Flow is written in OCaml (OCaml 4.07.1 is required).
6. Build `flow.js` (optional):

```sh
opam install -y js_of_ocaml.3.4.0
opam install -y js_of_ocaml.3.6.0
make js
```

Expand Down
2 changes: 1 addition & 1 deletion _tags
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<**/*.ml*>: ocaml, warn_A, warn(-4-6-29-35-42-44-48-50), warn_error_A, safe_string
<**/*.ml*>: ocaml, warn_A, warn(-4-6-29-35-42-44-48-50-60-67), warn_error_A, safe_string
(not <src/parser/**>) or <src/parser/test/**>: package(base), package(ppx_deriving), package(ppx_deriving.eq), package(ppx_deriving.iter), package(ppx_deriving.map), package(ppx_deriving.ord), package(ppx_deriving.show), package(dtoa), package(wtf8), package(visitors.runtime), package(sedlex.ppx)
<scripts/ppx_gen_flowlibs/**>: package(ocaml-migrate-parsetree)
<**/__tests__/**>: package(oUnit)
Expand Down
21 changes: 0 additions & 21 deletions js/str.js

This file was deleted.

11 changes: 0 additions & 11 deletions js/unix_isatty.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Flow Parser is a JavaScript parser written in OCaml. It produces an AST that

## Building the Flow Parser

Building the Flow Parser requires OCaml. Compiling to JavaScript requires js_of_ocaml >= 2.8.
Building the Flow Parser requires OCaml. Compiling to JavaScript requires js_of_ocaml >= 3.6.

### Initial set up

Expand All @@ -14,7 +14,7 @@ Building the Flow Parser requires OCaml. Compiling to JavaScript requires js_of_
### Building the OCaml Flow Parser library

make

### Compiling the Flow Parser to JavaScript

make js
Expand Down

0 comments on commit 88f68e1

Please sign in to comment.