diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e4322948..7c9bc7a1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,11 +12,11 @@ on: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 name: OTP ${{matrix.otp}} strategy: matrix: - otp: [20.3.8.26, 21.3.8.17, 22.3.4.9, 23.3.1, 24.0.5] + otp: [22.3.4.9, 23.3.4.5, 24.3.3, 25.3] emacs: [27.1] # 24.5, 26.3, steps: diff --git a/Makefile b/Makefile index 8276beb1..af210c31 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ # MAKEFLAGS = -s LIBS = lib/edts lib/edts_debug lib/edts_dialyzer lib/edts_xref +DEPS = mochiweb meck MKDIR ?= mkdir MKDIR_FLAGS ?= "-p" GIT ?= git @@ -26,19 +27,21 @@ release: rel/releases rel/releases: $(MKDIR) $(MKDIR_FLAGS) rel/releases -deps/mochiweb: - $(GIT) clone "https://github.com/mochi/mochiweb" $@ - cd $@ && $(GIT) checkout --detach 835b107a4da4550080d032623ff6ae9a18d02c37 +deps/mochiweb/src: + $(GIT) clone "https://github.com/mochi/mochiweb" deps/mochiweb + cd deps/mochiweb && $(GIT) checkout --detach 835b107a4da4550080d032623ff6ae9a18d02c37 +deps/meck/src: + $(GIT) clone "https://github.com/eproxus/meck" deps/meck + cd deps/meck && $(GIT) checkout --detach cc47aab4b64a46a5409c1a93353d44a367b41454 + +deps/mochiweb: deps/mochiweb/src deps/mochiweb/ebin +deps/meck: deps/meck/src deps/meck/ebin + +$(DEPS:%=deps/%/ebin): + $(MKDIR) $(MKDIR_FLAGS) $@ + $(ERLC) +debug_info -o $@ -I$(@:/ebin=/include) -I$(@:/ebin=/src) $(@:/ebin=/src)/*.erl # reltool doesn't support unrecognized options - sed -i '/applications/{N; s/,$$// };/licenses/d;/links/d' $@/src/mochiweb.app.src - $(MAKE) -C $@ MAKEFLAGS="$(MAKEFLAGS)" -deps/meck: - $(GIT) clone "https://github.com/eproxus/meck" $@ - cd $@ && $(GIT) checkout --detach cc47aab4b64a46a5409c1a93353d44a367b41454 - $(MKDIR) $(MKDIR_FLAGS) $@/ebin - $(ERLC) +debug_info -o $@/ebin -I$@/include -I$@/src $@/src/*.erl - sed -i '/env/{ s/,$$// };/licenses/d;/links/{ N; N; N; d }' $@/src/meck.app.src - cp $@/src/meck.app.src $@/ebin/meck.app + sed 'H; $$!d; x; s/[[:space:]]\+%[^\n]\+//g; s/,[[:space:]]\+{licenses[^\n]\+//; s/{links, \[[^]]\+]}//;' $(@:/ebin=/src)/$(@:deps/%/ebin=%).app.src > $@/$(@:deps/%/ebin=%).app .PHONY: $(LIBS) $(LIBS): @@ -64,7 +67,8 @@ dialyzer: erlang.plt edts.plt erlang.plt: $(DIALYZER) --quiet --build_plt --output_plt $@ --apps \ erts kernel stdlib mnesia crypto sasl eunit \ - syntax_tools compiler tools debugger dialyzer + syntax_tools compiler tools debugger dialyzer \ + wx runtime_tools edts.plt: erlang.plt $(DIALYZER) --add_to_plt --plt erlang.plt -r lib/ deps/ --output_plt $@ @@ -109,4 +113,7 @@ byte-compilation-test: .PHONY: $(OTP_TESTS) $(OTP_TESTS): - $(DOCKER) build -f test_data/manual/Dockerfile.$@ . + $(DOCKER) build \ + --ulimit nofile=4096 \ + -f test_data/manual/Dockerfile.$@ . + diff --git a/elisp/edts/edts-alist.el b/elisp/edts/edts-alist.el index a50993fd..5f901147 100644 --- a/elisp/edts/edts-alist.el +++ b/elisp/edts/edts-alist.el @@ -94,12 +94,16 @@ (defun edts-alist-select (predicate alist) - "Return all elements of ALIST for which PREDICATE returns a non-nil value. PREDICATE is a function that takes two argument KEY and VALUE." + "Return all elements of ALIST for which PREDICATE returns a +non-nil value. PREDICATE is a function that takes two argument +KEY and VALUE." (-filter (lambda (el) (funcall predicate (car el) (cdr el))) alist)) (defun edts-alist-filter (predicate alist) - "Remove all elements of ALIST for which PREDICATE returns a non-nil value. PREDICATE is a function that takes two argument KEY and VALUE." + "Remove all elements of ALIST for which PREDICATE returns a +non-nil value. PREDICATE is a function that takes two argument +KEY and VALUE." (-filter (lambda (el) (not (funcall predicate (car el) (cdr el)))) alist)) diff --git a/elisp/edts/edts-code.el b/elisp/edts/edts-code.el index 3e403c5f..603ce270 100644 --- a/elisp/edts/edts-code.el +++ b/elisp/edts/edts-code.el @@ -47,10 +47,6 @@ the module to be compiled as the only argument.") '(edts-code-eunit) "Hooks to run after compilation finishes. Hooks are called with the compilation result as a symbol as the only argument") -(defvaralias ;; Compatibility - 'edts-code-after-compilation-hook - 'edts-code-after-compile-hook - "This variable is deprecated, use `edts-code-after-compile-hook'") (defvar edts-code-buffer-issues nil "A plist describing the current issues (errors and warnings) in the @@ -97,8 +93,8 @@ with severity as key and a lists of issues as values" (plist-put edts-code-buffer-issues type issues))) (defun edts-code-buffer-status () - "Return 'error if there are any edts errors in current buffer, -'warning if there are warnings and 'ok otherwise." + "Return `'error' if there are any edts errors in current buffer, +`'warning' if there are warnings and `'ok' otherwise." (cl-block nil (let ((status 'ok) (issues edts-code-buffer-issues)) diff --git a/elisp/edts/edts-complete-built-in-function-source.el b/elisp/edts/edts-complete-built-in-function-source.el index 3675f1a8..546ff40a 100644 --- a/elisp/edts/edts-complete-built-in-function-source.el +++ b/elisp/edts/edts-complete-built-in-function-source.el @@ -46,9 +46,9 @@ (defun edts-complete-built-in-function-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-built-in-function-candidates)) - ('none (edts-complete-normal-built-in-function-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-built-in-function-candidates)) + (none (edts-complete-normal-built-in-function-candidates)))) (defun edts-complete-normal-built-in-function-candidates () "Produces the completion list for normal (unqoted) local functions." diff --git a/elisp/edts/edts-complete-exported-function-source.el b/elisp/edts/edts-complete-exported-function-source.el index 169a501e..c22de1ca 100644 --- a/elisp/edts/edts-complete-exported-function-source.el +++ b/elisp/edts/edts-complete-exported-function-source.el @@ -56,7 +56,7 @@ (let ((point (or ac-point (point)))) (when (edts-complete-exported-function-p point) (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings + (double-quoted nil) ; Don't complete inside strings (otherwise (edts-log-debug "Initializing exported function completions") (let* ((module (ferl-symbol-at (- point 1))) @@ -66,9 +66,9 @@ (defun edts-complete-exported-function-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-exported-function-candidates)) - ('none (edts-complete-normal-exported-function-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-exported-function-candidates)) + (none (edts-complete-normal-exported-function-candidates)))) (defun edts-complete-normal-exported-function-candidates () "Produces the completion list for normal (unqoted) exported functions." diff --git a/elisp/edts/edts-complete-imported-function-source.el b/elisp/edts/edts-complete-imported-function-source.el index e2889ef0..97b7bc92 100644 --- a/elisp/edts/edts-complete-imported-function-source.el +++ b/elisp/edts/edts-complete-imported-function-source.el @@ -45,9 +45,9 @@ (defun edts-complete-imported-function-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-imported-function-candidates)) - ('none (edts-complete-normal-imported-function-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-imported-function-candidates)) + (none (edts-complete-normal-imported-function-candidates)))) (defun edts-complete-normal-imported-function-candidates () "Produces the completion list for normal (unqoted) imported functions." diff --git a/elisp/edts/edts-complete-keyword-source.el b/elisp/edts/edts-complete-keyword-source.el index 5f03b8b3..1455565e 100644 --- a/elisp/edts/edts-complete-keyword-source.el +++ b/elisp/edts/edts-complete-keyword-source.el @@ -41,9 +41,9 @@ (defun edts-complete-keyword-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-keyword-candidates)) - ('none (edts-complete-normal-keyword-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-keyword-candidates)) + (none (edts-complete-normal-keyword-candidates)))) (defun edts-complete-normal-keyword-candidates () "Produces the completion list for normal (unqoted) local functions." diff --git a/elisp/edts/edts-complete-local-function-source.el b/elisp/edts/edts-complete-local-function-source.el index 1d5d0c00..5e8b9c6f 100644 --- a/elisp/edts/edts-complete-local-function-source.el +++ b/elisp/edts/edts-complete-local-function-source.el @@ -49,7 +49,7 @@ "Initialize local function completions." (when (edts-complete-local-function-p) (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings + (double-quoted nil) ; Don't complete inside strings (otherwise (edts-log-debug "Initializing local function completions") (setq edts-complete-local-function-candidates @@ -57,9 +57,9 @@ (defun edts-complete-local-function-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-local-function-candidates)) - ('none (edts-complete-normal-local-function-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-local-function-candidates)) + (none (edts-complete-normal-local-function-candidates)))) (defun edts-complete-normal-local-function-candidates () "Produces the completion list for normal (unqoted) local functions." diff --git a/elisp/edts/edts-complete-macro-source.el b/elisp/edts/edts-complete-macro-source.el index 3cce962f..4bfd46b0 100644 --- a/elisp/edts/edts-complete-macro-source.el +++ b/elisp/edts/edts-complete-macro-source.el @@ -50,9 +50,9 @@ (defun edts-complete-macro-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-macro-candidates)) - ('none (edts-complete-normal-macro-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-macro-candidates)) + (none (edts-complete-normal-macro-candidates)))) (defun edts-complete-normal-macro-candidates () "Produces the completion list for normal (unqoted) macros." diff --git a/elisp/edts/edts-complete-module-source.el b/elisp/edts/edts-complete-module-source.el index abe70418..a5b8303c 100644 --- a/elisp/edts/edts-complete-module-source.el +++ b/elisp/edts/edts-complete-module-source.el @@ -48,9 +48,9 @@ (defun edts-complete-module-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-module-candidates)) - ('none (edts-complete-normal-module-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-module-candidates)) + (none (edts-complete-normal-module-candidates)))) (defun edts-complete-normal-module-candidates () "Produces the completion list for normal (unqoted) modules." diff --git a/elisp/edts/edts-complete-record-source.el b/elisp/edts/edts-complete-record-source.el index 99963b37..dc3fd9a3 100644 --- a/elisp/edts/edts-complete-record-source.el +++ b/elisp/edts/edts-complete-record-source.el @@ -53,7 +53,7 @@ "Initialize record completions." (when (edts-complete-record-p ac-point) (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings + (double-quoted nil) ; Don't complete inside strings (otherwise (edts-log-debug "Initializing record completions") (cl-flet ((rec-name (rec) (cdr (assoc 'record rec)))) @@ -65,9 +65,9 @@ (defun edts-complete-record-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted (edts-complete-single-quoted-record-candidates)) - ('none (edts-complete-normal-record-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted (edts-complete-single-quoted-record-candidates)) + (none (edts-complete-normal-record-candidates)))) (defun edts-complete-normal-record-candidates () "Produces the completion list for normal (unqoted) records. Unimplemented" diff --git a/elisp/edts/edts-complete-variable-source.el b/elisp/edts/edts-complete-variable-source.el index 73a44932..1099034c 100644 --- a/elisp/edts/edts-complete-variable-source.el +++ b/elisp/edts/edts-complete-variable-source.el @@ -54,9 +54,9 @@ (defun edts-complete-variable-candidates () (cl-case (ferl-point-inside-quotes) - ('double-quoted nil) ; Don't complete inside strings - ('single-quoted nil) ; No single-quoted variables - ('none (edts-complete-normal-variable-candidates)))) + (double-quoted nil) ; Don't complete inside strings + (single-quoted nil) ; No single-quoted variables + (none (edts-complete-normal-variable-candidates)))) (defun edts-complete-normal-variable-candidates () "Generates the auto-complete candidate list for variables. Matches variables diff --git a/elisp/edts/edts-face.el b/elisp/edts/edts-face.el index 3011be0e..174b6d2e 100644 --- a/elisp/edts/edts-face.el +++ b/elisp/edts/edts-face.el @@ -107,7 +107,7 @@ left-fringe or right-fringe." :group 'edts) (defvar edts-face-modeline-remap-cookie nil - "A list of The 'cookies' returned from face-remap-add-relative, so + "A list of The `cookies' returned from face-remap-add-relative, so that we can reset our face remappings.") (make-variable-buffer-local 'edts-face-modeline-remap-cookie) diff --git a/elisp/edts/edts-rpc.el b/elisp/edts/edts-rpc.el index 3845690f..d2292772 100644 --- a/elisp/edts/edts-rpc.el +++ b/elisp/edts/edts-rpc.el @@ -169,7 +169,7 @@ inside a `with-temp-buffer'." (defun edts-rpc--parse-http-response-status () (save-excursion (goto-char (point-min)) - (s-split " " (buffer-substring (point) (point-at-eol))))) + (s-split " " (buffer-substring (point) (line-end-position))))) (defun edts-rpc-command-url (command) "Construct the edts command url." diff --git a/elisp/edts/edts-shell.el b/elisp/edts/edts-shell.el index ceb6001b..07f7f569 100644 --- a/elisp/edts/edts-shell.el +++ b/elisp/edts/edts-shell.el @@ -143,7 +143,9 @@ PWD and running COMMAND." (ignore-errors (make-local-variable 'show-paren-mode) (show-paren-mode 1)) - (linum-mode -1) + (if (version<= "26.0.50" emacs-version) + (display-line-numbers-mode -1) + (linum-mode -1)) (setq show-trailing-whitespace nil) (set-process-query-on-exit-flag (get-buffer-process (current-buffer)) nil) (add-hook 'kill-buffer-hook #'edts-shell--kill-buffer-hook t t) @@ -257,7 +259,7 @@ respectively so we can use them later when fontifying user input." (while (< start end) (let ((temp-end nil)) (cl-case (get-text-property start 'field) - ('output + (output (setq temp-end (edts-shell-output-end start end)) (font-lock-default-fontify-region start temp-end loudly)) (otherwise diff --git a/elisp/edts/edts-test.el b/elisp/edts/edts-test.el index ee88e642..b666d6c3 100644 --- a/elisp/edts/edts-test.el +++ b/elisp/edts/edts-test.el @@ -100,9 +100,9 @@ (defmacro edts-test-case (suite name args desc &rest body) "Define a testcase in SUITE. All other arguments are the same is in `ert-deftest'." + (declare (indent 3)) (unless body (error "edts-test-case: Not enough arguments")) - (declare (indent 3)) `(macroexpand (ert-deftest ,name ,args ,desc :tags '(,suite edts-test-suite) ,@body))) diff --git a/lib/edts/src/edts_eunit.erl b/lib/edts/src/edts_eunit.erl index 7bc21801..641ca861 100644 --- a/lib/edts/src/edts_eunit.erl +++ b/lib/edts/src/edts_eunit.erl @@ -56,6 +56,8 @@ reason/0 ]). +-dialyzer({nowarn_function, get_module_tests/1}). + %%%_* API ====================================================================== %%------------------------------------------------------------------------------ @@ -86,12 +88,16 @@ try_run_tests(Module) -> do_run_tests(Module) -> debug("running eunit tests in: ~p", [Module]), Listener = edts_eunit_listener:start([{parent, self()}]), - Tests = filter_module_tests(Module, eunit_data:get_module_tests(Module)), + Tests = filter_module_tests(Module, get_module_tests(Module)), case eunit_server:start_test(eunit_server, Listener, Tests, []) of {ok, Ref} -> do_run_tests(Ref, Listener, 20000); {error, Err} -> {error, Err} end. +-spec get_module_tests(module()) -> list(). +get_module_tests(Module) -> + eunit_data:get_module_tests(Module). + filter_module_tests(Module, Tests) -> Fun = fun({_Type, TestModule, _Fun} = Test, Acc) when TestModule =:= Module -> [Test|Acc]; diff --git a/lib/edts/src/edts_module_server.erl b/lib/edts/src/edts_module_server.erl index 3ea7e7b0..a4497115 100644 --- a/lib/edts/src/edts_module_server.erl +++ b/lib/edts/src/edts_module_server.erl @@ -108,7 +108,7 @@ init(_Args) -> %%------------------------------------------------------------------------------ %% @doc Handle call messages --spec handle_call(term(), {pid(), atom()}, state()) -> +-spec handle_call(term(), {pid(), any()}, state()) -> {reply, Reply::term(), state()} | {reply, Reply::term(), state(), timeout()} | {noreply, state()} | diff --git a/lib/edts/src/edts_server.erl b/lib/edts/src/edts_server.erl index 42896d66..11729357 100644 --- a/lib/edts/src/edts_server.erl +++ b/lib/edts/src/edts_server.erl @@ -152,7 +152,7 @@ init([]) -> %% Handling call messages %% @end %% --spec handle_call(term(), {pid(), atom()}, state()) -> +-spec handle_call(term(), {pid(), any()}, state()) -> {reply, Reply::term(), state()} | {reply, Reply::term(), state(), timeout()} | {noreply, state()} | diff --git a/lib/edts/src/edts_syntax.erl b/lib/edts/src/edts_syntax.erl index 76602b61..0de0a0d2 100644 --- a/lib/edts/src/edts_syntax.erl +++ b/lib/edts/src/edts_syntax.erl @@ -108,11 +108,18 @@ parse_expressions(String) -> Tokens -> case erl_parse:parse_exprs(Tokens) of {ok, AnnoTerms} -> - {ok, lists:map(fun erl_parse:anno_to_term/1, AnnoTerms)}; + {ok, lists:map(fun anno_to_term/1, AnnoTerms)}; Err -> Err end end. +anno_to_term(T) -> + case code:which(erl_anno) of + non_existing -> + T; + _ -> + erl_parse:anno_to_term(T) + end. %%------------------------------------------------------------------------------ %% @doc diff --git a/lib/edts_dialyzer/edts-dialyzer.el b/lib/edts_dialyzer/edts-dialyzer.el index 003673d1..00b8e4a8 100644 --- a/lib/edts_dialyzer/edts-dialyzer.el +++ b/lib/edts_dialyzer/edts-dialyzer.el @@ -34,11 +34,6 @@ :group 'edts :type 'boolean) -(define-obsolete-variable-alias - 'edts-code-inhibit-dialyzer-on-compile - 'edts-dialyzer-inhibit-on-compile - "2017-04-15") - (defun edts-dialyzer-init () "Initialize edts-dialyzer." (add-to-list 'edts-code-issue-types 'edts-dialyzer) diff --git a/test_data/manual/Dockerfile.byte-compile-test b/test_data/manual/Dockerfile.emacs26 similarity index 70% rename from test_data/manual/Dockerfile.byte-compile-test rename to test_data/manual/Dockerfile.emacs26 index 96ae8148..094b7a3d 100644 --- a/test_data/manual/Dockerfile.byte-compile-test +++ b/test_data/manual/Dockerfile.emacs26 @@ -23,11 +23,6 @@ COPY . . RUN emacs -Q --batch \ -L ${PWD} \ -l test_data/package-install-deps.el \ - -f batch-byte-compile *.el elisp/edts/*.el lib/**/*.el + --eval '(byte-recompile-directory "." 0 t)' \ + 2> "compile.log" -# RUN emacs -Q --batch \ -# -L ${PWD} \ -# -l test_data/package-install-deps.el \ -# --eval '(byte-compile-file "edts-mode.el")' \ -# --eval '(with-current-buffer "*EDTS compile*" (write-file "edts_compile.log"))' && \ -# cat edts_compile.log diff --git a/test_data/manual/Dockerfile.emacs29 b/test_data/manual/Dockerfile.emacs29 new file mode 100644 index 00000000..1b3c8778 --- /dev/null +++ b/test_data/manual/Dockerfile.emacs29 @@ -0,0 +1,20 @@ +FROM silex/emacs:29.1 + +# Remove erlang-mode as there are broken symlinks in manpages-dev package +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973885 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999682 +RUN apt-get -q update && \ + apt-get -qy install \ + build-essential erlang git && \ + apt-get -qy remove erlang-mode && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /edts + +COPY . . + +RUN emacs -Q --batch \ + -L ${PWD} \ + -l test_data/package-install-deps.el \ + --eval '(byte-recompile-directory "." 0 t)' \ + 2> "compile.log" diff --git a/test_data/manual/Dockerfile.otp17 b/test_data/manual/Dockerfile.otp17 new file mode 100644 index 00000000..0d3410cf --- /dev/null +++ b/test_data/manual/Dockerfile.otp17 @@ -0,0 +1,29 @@ +FROM ubuntu:14.04 + +SHELL ["/bin/bash", "-c"] + +RUN apt-get -q update && \ + apt-get -yq install \ + wget libwxbase2.8-0 libwxgtk2.8-0 libsctp1 \ + build-essential emacs git && \ + rm -rf /var/lib/apt/lists/* + +ENV ERLANG_VERSION=17.5.3 \ + ERLANG_EMACS_LIB="/usr/lib/erlang/lib/tools-2.7.2/emacs" + +RUN . /etc/lsb-release && \ + export FILE="esl-erlang_${ERLANG_VERSION}-1~ubuntu~${DISTRIB_CODENAME}_amd64.deb" && \ + wget -q "https://packages.erlang-solutions.com/erlang/debian/pool/$FILE" && \ + dpkg -i $FILE && \ + rm $FILE + +WORKDIR /edts + +COPY . . + +# remove -dialyzer preprocessor commands because OTP17 needs to have +# them declared before function definitions. +RUN make && \ + make deps/meck/src && \ + sed -i '/-dialyzer/d' deps/meck/src/*.erl && \ + make eunit integration-tests ert diff --git a/test_data/manual/Dockerfile.otp25 b/test_data/manual/Dockerfile.otp25 new file mode 100644 index 00000000..229051ab --- /dev/null +++ b/test_data/manual/Dockerfile.otp25 @@ -0,0 +1,27 @@ +FROM ubuntu:22.04 + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update && \ + apt-get -yq install \ + wget libncurses5 libwxgtk3.0-gtk3-0v5 libwxbase3.0-0v5 libsctp1 \ + build-essential emacs git && \ + rm -rf /var/lib/apt/lists/* + +ENV ERLANG_VERSION=25.2.3 \ + ERLANG_EMACS_LIB="/usr/lib/erlang/lib/tools-3.5.3/emacs" + +RUN . /etc/os-release && \ + export FILE="esl-erlang_${ERLANG_VERSION}-1~ubuntu~${VERSION_CODENAME}_amd64.deb" && \ + wget -q "https://packages.erlang-solutions.com/erlang/debian/pool/$FILE" && \ + dpkg -i $FILE && \ + rm $FILE + +WORKDIR /edts + +COPY . . + +RUN make && \ + make test diff --git a/test_data/manual/Dockerfile.otp26 b/test_data/manual/Dockerfile.otp26 new file mode 100644 index 00000000..ef1cb7f3 --- /dev/null +++ b/test_data/manual/Dockerfile.otp26 @@ -0,0 +1,28 @@ +FROM ubuntu:22.04 + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get -q update && \ + apt-get -yq install \ + wget libncurses5 libwxgtk3.0-gtk3-0v5 libwxbase3.0-0v5 libsctp1 \ + build-essential emacs git && \ + rm -rf /var/lib/apt/lists/* + +ENV ERLANG_VERSION=26.0.2 \ + ERLANG_EMACS_LIB="/usr/lib/erlang/lib/tools-3.5.3/emacs" + +RUN . /etc/os-release && \ + export FILE="esl-erlang_${ERLANG_VERSION}-1~ubuntu~${VERSION_CODENAME}_amd64.deb" && \ + wget -q "https://binaries2.erlang-solutions.com/ubuntu/pool/contrib/e/esl-erlang/$FILE" && \ + dpkg -i $FILE && \ + rm $FILE + +WORKDIR /edts + +COPY . . + +RUN make +# && \ + # make test diff --git a/test_data/package-install-deps.el b/test_data/package-install-deps.el index 73ebba17..267e622b 100644 --- a/test_data/package-install-deps.el +++ b/test_data/package-install-deps.el @@ -1,4 +1,4 @@ -;;; edts-pkg.el --- EDTS dependency installation, for test. +;;; package-install-deps.el --- EDTS dependency installation, for test. ;; Copyright 2012-2013 Thomas Järvstrand