Skip to content

Commit d38f538

Browse files
authored
Update mochiweb and meck (#286)
1 parent 8fb8640 commit d38f538

File tree

5 files changed

+60
-24
lines changed

5 files changed

+60
-24
lines changed

.github/workflows/test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ jobs:
4545
rebar3: "3.16.1"
4646
- otp: "25.3.2.15"
4747
rebar3: "3.22.1"
48-
# - otp: "26.2.5.5"
49-
# rebar3: "3.22.1"
50-
# - otp: "27.1.2"
51-
# rebar3: "3.22.1"
48+
- otp: "26.2.5.5"
49+
rebar3: "3.22.1"
50+
- otp: "27.1.2"
51+
rebar3: "3.22.1"
5252
steps:
5353
- name: Install Emacs
5454
uses: purcell/setup-emacs@master

Makefile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ rel/releases:
2929

3030
deps/mochiweb/src:
3131
$(GIT) clone "https://github.com/mochi/mochiweb" deps/mochiweb
32-
cd deps/mochiweb && $(GIT) checkout --detach 835b107a4da4550080d032623ff6ae9a18d02c37
32+
cd deps/mochiweb && $(GIT) checkout --detach 611254eb941e502227f221667389b98fd8e72d6f
3333
deps/meck/src:
3434
$(GIT) clone "https://github.com/eproxus/meck" deps/meck
35-
cd deps/meck && $(GIT) checkout --detach cc47aab4b64a46a5409c1a93353d44a367b41454
35+
cd deps/meck && $(GIT) checkout --detach 59d61d87b42408779e7863b6e8544325bcf90efd
3636

3737
deps/mochiweb: deps/mochiweb/src deps/mochiweb/ebin
3838
deps/meck: deps/meck/src deps/meck/ebin
@@ -68,7 +68,8 @@ erlang.plt:
6868
$(DIALYZER) --quiet --build_plt --output_plt $@ --apps \
6969
erts kernel stdlib mnesia crypto sasl eunit \
7070
syntax_tools compiler tools debugger dialyzer \
71-
wx runtime_tools
71+
wx runtime_tools ssl public_key asn1 inets xmerl \
72+
parsetools
7273
edts.plt: erlang.plt
7374
$(DIALYZER) --add_to_plt --plt erlang.plt -r lib/ deps/ --output_plt $@
7475

@@ -78,17 +79,17 @@ manual-tests: $(OTP_TESTS) byte-compilation-test
7879

7980
.PHONY: integration-tests
8081
integration-tests: all test-projects
81-
$(EMACS) -Q --batch \
82-
-L $(ERLANG_EMACS_LIB) \
83-
-l test_data/load-tests.el \
82+
$(EMACS) --quick --batch \
83+
--directory $(ERLANG_EMACS_LIB) \
84+
--load test_data/load-tests.el \
8485
--debug-init \
85-
-f edts-test-run-suites-batch-and-exit
86+
--funcall edts-test-run-suites-batch-and-exit
8687

8788
.PHONY: ert
8889
ert: test-projects
89-
$(EMACS) -Q --batch \
90-
-L $(ERLANG_EMACS_LIB) \
91-
-l test_data/load-tests.el \
90+
$(EMACS) --quick --batch \
91+
--directory $(ERLANG_EMACS_LIB) \
92+
--load test_data/load-tests.el \
9293
--debug-init \
9394
--eval "(ert-run-tests-batch-and-exit '(not (tag edts-test-suite)))"
9495

@@ -108,8 +109,10 @@ byte-compilation-test:
108109
-u $(shell id -u) \
109110
silex/emacs \
110111
/bin/bash -c \
111-
'emacs -Q --batch -L ${PWD} -l test_data/package-install-deps.el \
112-
-f batch-byte-compile *.el elisp/edts/*.el lib/**/*.el'
112+
'emacs --quick --batch \
113+
--directory ${PWD} \
114+
--load test_data/package-install-deps.el \
115+
--funcall batch-byte-compile *.el elisp/edts/*.el lib/**/*.el'
113116

114117
.PHONY: $(OTP_TESTS)
115118
$(OTP_TESTS):

lib/edts_dialyzer/src/edts_dialyzer.erl

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ create_plt(BasePlt0, OutPlt, Files) ->
168168
BasePlt =
169169
case BasePlt0 of
170170
undefined ->
171-
try dialyzer_plt:get_default_plt()
172-
catch throw:{dialyzer_error, _} -> undefined
173-
end;
171+
try_get_default_plt();
174172
_ when is_list(BasePlt0) -> BasePlt0
175173
end,
176174
VarOpts =
@@ -181,6 +179,22 @@ create_plt(BasePlt0, OutPlt, Files) ->
181179

182180
dialyzer:run(BaseOpts ++ VarOpts).
183181

182+
-ifndef(OTP_RELEASE). % OTP-19 and lesser
183+
-def(OTP_RELEASE, 1).
184+
-endif.
185+
186+
-if(?OTP_RELEASE >= 26).
187+
try_get_default_plt() ->
188+
try dialyzer_iplt:get_default_iplt_filename()
189+
catch throw:{dialyzer_error, _} -> undefined
190+
end.
191+
-else.
192+
try_get_default_plt() ->
193+
try dialyzer_plt:get_default_plt()
194+
catch throw:{dialyzer_error, _} -> undefined
195+
end.
196+
-endif.
197+
184198
get_included_files(Plt) ->
185199
{ok, Info} = dialyzer:plt_info(Plt),
186200
{files, Files} = lists:keyfind(files, 1, Info),

test_data/manual/Dockerfile.otp26

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:20.04
22

33
SHELL ["/bin/bash", "-c"]
44

@@ -11,7 +11,7 @@ RUN apt-get -q update && \
1111
rm -rf /var/lib/apt/lists/*
1212

1313
ENV ERLANG_VERSION=26.0.2 \
14-
ERLANG_EMACS_LIB="/usr/lib/erlang/lib/tools-3.5.3/emacs"
14+
ERLANG_EMACS_LIB="/usr/lib/erlang/lib/tools-3.6/emacs"
1515

1616
RUN . /etc/os-release && \
1717
export FILE="esl-erlang_${ERLANG_VERSION}-1~ubuntu~${VERSION_CODENAME}_amd64.deb" && \
@@ -23,6 +23,5 @@ WORKDIR /edts
2323

2424
COPY . .
2525

26-
RUN make
27-
# && \
28-
# make test
26+
RUN make && \
27+
make test

test_data/manual/Dockerfile.otp27

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM erlang:27.1.2
2+
3+
SHELL ["/bin/bash", "-c"]
4+
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
RUN apt-get -q update && \
8+
apt-get -yq install \
9+
wget \
10+
emacs git && \
11+
rm -rf /var/lib/apt/lists/*
12+
13+
ENV ERLANG_EMACS_LIB="/usr/local/lib/erlang/lib/tools-4.1/emacs"
14+
15+
WORKDIR /edts
16+
17+
COPY . .
18+
19+
RUN make && \
20+
make test

0 commit comments

Comments
 (0)