Skip to content

Commit c0c0922

Browse files
committed
Put back most things
1 parent 465796b commit c0c0922

File tree

3 files changed

+54
-44
lines changed

3 files changed

+54
-44
lines changed

.github/workflows/ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
echo "cat -A Auto.res.txt"
3232
cat -A tests/src/expected/Auto.res.txt
3333
echo "make now===="
34-
& $env:CYGWIN_ROOT\\bin\\ocaml-env exec -- make foo
35-
# make foo
34+
& $env:CYGWIN_ROOT\\bin\\ocaml-env exec -- make test
3635
artifact-folder: win32
3736

3837
runs-on: ${{matrix.os}}

analysis/Makefile

+42-42
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,57 @@ OCAMLDEP = ocamldep.opt
88

99
OUTPUT = rescript-editor-analysis.exe
1010

11-
# %.cmi : %.mli
12-
# @echo Building $@
13-
# @$(OCAMLOPT) $(OCAMLFLAGS) -c $<
14-
# %.cmx : %.ml
15-
# @echo Building $@
16-
# @$(OCAMLOPT) $(OCAMLFLAGS) -c $<
11+
%.cmi : %.mli
12+
@echo Building $@
13+
@$(OCAMLOPT) $(OCAMLFLAGS) -c $<
14+
%.cmx : %.ml
15+
@echo Building $@
16+
@$(OCAMLOPT) $(OCAMLFLAGS) -c $<
1717

18-
# include .depend
19-
# depend:
20-
# @$(OCAMLDEP) -native $(INCLUDES) `find src -name "*.ml" -o -name "*.mli"` > .depend
18+
include .depend
19+
depend:
20+
@$(OCAMLDEP) -native $(INCLUDES) `find src -name "*.ml" -o -name "*.mli"` > .depend
2121

22-
# SOURCE_FILES = $(shell $(OCAMLDEP) -sort `find src -name "*.ml"` | sed -E "s/\.ml/.cmx/g")
22+
SOURCE_FILES = $(shell $(OCAMLDEP) -sort `find src -name "*.ml"` | sed -E "s/\.ml/.cmx/g")
2323

24-
# $(OUTPUT): $(SOURCE_FILES)
25-
# @echo Linking...
26-
# @$(OCAMLOPT) $(OCAMLFLAGS) -O2 -o $(OUTPUT) \
27-
# -I +compiler-libs unix.cmxa str.cmxa ocamlcommon.cmxa $(INCLUDES) $(SOURCE_FILES)
28-
# @echo Done!
24+
$(OUTPUT): $(SOURCE_FILES)
25+
@echo Linking...
26+
@$(OCAMLOPT) $(OCAMLFLAGS) -O2 -o $(OUTPUT) \
27+
-I +compiler-libs unix.cmxa str.cmxa ocamlcommon.cmxa $(INCLUDES) $(SOURCE_FILES)
28+
@echo Done!
2929

30-
# build-native: $(OUTPUT) depend
30+
build-native: $(OUTPUT) depend
3131

32-
# dce: build-native
33-
# @echo "git diff makefile dce 1"
34-
# git diff tests/src/expected/Auto.res.txt
35-
# ../node_modules/.bin/reanalyze -dce-cmt src -suppress src/vendor
36-
# @echo "git diff makefile dce 2"
37-
# git diff tests/src/expected/Auto.res.txt
32+
dce: build-native
33+
@echo "git diff makefile dce 1"
34+
git diff tests/src/expected/Auto.res.txt
35+
../node_modules/.bin/reanalyze -dce-cmt src -suppress src/vendor
36+
@echo "git diff makefile dce 2"
37+
git diff tests/src/expected/Auto.res.txt
3838

39-
# tests/node_modules/.bin/rescript:
40-
# @echo "git diff makefile rescript 1"
41-
# git diff tests/src/expected/Auto.res.txt
42-
# @cd tests && npm install
43-
# @echo "git diff makefile rescript 2"
44-
# git diff tests/src/expected/Auto.res.txt
39+
tests/node_modules/.bin/rescript:
40+
@echo "git diff makefile rescript 1"
41+
git diff tests/src/expected/Auto.res.txt
42+
@cd tests && npm install
43+
@echo "git diff makefile rescript 2"
44+
git diff tests/src/expected/Auto.res.txt
4545

46-
# test: dce tests/node_modules/.bin/rescript
47-
# @echo "git diff makefile test 1"
48-
# git diff tests/src/expected/Auto.res.txt
49-
# @cd tests && node_modules/.bin/rescript
50-
# @echo "git diff makefile test 2"
51-
# git diff tests/src/expected/Auto.res.txt
52-
# ./test.sh
46+
test: dce tests/node_modules/.bin/rescript
47+
@echo "git diff makefile test 1"
48+
git diff tests/src/expected/Auto.res.txt
49+
@cd tests && node_modules/.bin/rescript
50+
@echo "git diff makefile test 2"
51+
git diff tests/src/expected/Auto.res.txt
52+
./test.sh
5353

54-
# clean:
55-
# git clean -dfx src
54+
clean:
55+
git clean -dfx src
5656

57-
foo:
58-
@echo "git diff makefile foo"
59-
git diff tests/src/expected/Auto.res.txt
60-
@echo "cat -A Auto.res.txt in makefile"
61-
cat -A tests/src/expected/Auto.res.txt
57+
# foo:
58+
# @echo "git diff makefile foo"
59+
# git diff tests/src/expected/Auto.res.txt
60+
# @echo "cat -A Auto.res.txt in makefile"
61+
# cat -A tests/src/expected/Auto.res.txt
6262

6363
.DEFAULT_GOAL := build-native
6464

analysis/test.sh

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ function exp {
22
echo "$(dirname $1)/expected/$(basename $1).txt"
33
}
44

5+
echo "cat -A test.sh"
6+
cat -A tests/src/expected/Auto.res.txt
7+
echo "done---------"
58
echo "git diff test.sh"
69
git diff tests/src/expected/Auto.res.txt
710
echo "done---------"
@@ -26,6 +29,14 @@ if [[ $diff = "" ]]; then
2629
else
2730
printf "${warningYellow}⚠️ There are unstaged differences in tests/! Did you break a test?\n${diff}\n${reset}"
2831
# node ./checkErrors.js
32+
33+
echo "cat -A test.sh last"
34+
cat -A tests/src/expected/Auto.res.txt
35+
echo "done cat last---------"
36+
echo "git diff test.sh last"
37+
git diff tests/src/expected/Auto.res.txt
38+
echo "done git last---------"
39+
2940
git --no-pager diff --word-diff-regex=. tests/src/expected/Auto.res.txt
3041
exit 1
3142
fi

0 commit comments

Comments
 (0)