Skip to content

Commit

Permalink
Migrate to OTP 21 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
neslinesli93 authored Nov 4, 2022
1 parent face6e2 commit 934cdff
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 131 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: push
jobs:
build:
runs-on: ubuntu-latest
container: erlang:20
container: erlang:21
steps:
- name: Check out code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM erlang:20-alpine
FROM erlang:21-alpine

ARG UID=1000
ARG GID=1000
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ct:

clean:
rebar3 clean
rm -rf _build

docker-build:
docker build \
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{deps, [
{ibrowse, ".*", {git, "https://github.com/cmullaparthi/ibrowse.git", {tag, "v4.2.2"} }},
{cowboy, "1.1.2"},
{mochiweb, "2.22.0"}
{mochiweb, "3.1.1"}
]},
{ct_extra_params, "-spec test/test_specs.spec"},
{erl_opts, [debug_info]}
Expand Down
18 changes: 9 additions & 9 deletions src/soap.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@
name :: string(),
operation :: atom(), %% name of function as used in handler module
soap_action = [] :: string(),
wrapper_ns = [] :: string() | undefined, %% namespace for the wrapper element (in
wrapper_ns = [] :: string() | undefined, %% namespace for the wrapper element (in
%% case of rpc style)
op_type :: notification | request_response,
in_type :: [{string(), atom()}] | atom(), %% the list type is only used
%% during construction of the
%% during construction of the
%% interface
out_type :: [{string(), atom()}] | undefined | atom(), %% see above
fault_types :: [atom()]}).
fault_types :: [atom()] | undefined}).
-type op() :: #op{}.

-record(interface, {
service :: string(),
module :: module(), %% The module that makes the interface available
version :: '1.1' | '1.2',
http_client :: module(),
http_server :: module(),
server_handler :: module(),
client_handler :: module(),
http_server :: module() | undefined,
server_handler :: module() | undefined,
client_handler :: module() | undefined,
http_options = [] :: [any()],
target_ns :: string(),
soap_ns :: string(),
style :: string() | undefined, %% "rpc" | "document"
decoders :: [{string(), module}] | undefined,
style :: string() | undefined, %% "rpc" | "document"
decoders :: [{string(), module}] | undefined,
url :: string(),
port :: string(),
binding :: string(),
Expand All @@ -59,7 +59,7 @@
tns_prefix :: string() | undefined, %% used for rpc type wsdl if the target ns
%% is also used as the ns of an operation.
imported = [] :: [{string(), string() | undefined}] %% imported namespaces,
%% {URI, Prefix}, to prevent duplicates and to be able to add the
%% {URI, Prefix}, to prevent duplicates and to be able to add the
%% prefix later on.
}).
-type interface() :: #interface{}.
6 changes: 2 additions & 4 deletions src/soap_parsers.erl
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ callback(Event, State) ->
exit(Message)
end
catch
error:Reason ->
throwError(error, {Reason,erlang:get_stacktrace()}, Event, State);
error:Reason:Stacktrace -> throwError(error, {Reason,Stacktrace}, Event, State);
Class:Exception -> throwError(Class, Exception, Event, State)
end.

Expand Down Expand Up @@ -171,8 +170,7 @@ skip_callback(Event, State) ->
State
end
catch
error:Reason ->
throwError(error, {Reason,erlang:get_stacktrace()}, Event, State);
error:Reason:Stacktrace -> throwError(error, {Reason,Stacktrace}, Event, State);
Class:Exception -> throwError(Class, Exception, Event, State)
end.

Expand Down
Loading

0 comments on commit 934cdff

Please sign in to comment.