From 30390e65d4b03238e52f537c6f59ee02ead066fa Mon Sep 17 00:00:00 2001 From: Christian Sunesson Date: Fri, 29 Nov 2024 18:13:39 +0100 Subject: [PATCH 1/8] fix: use exported types from restc --- include/oauth2c.hrl | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/include/oauth2c.hrl b/include/oauth2c.hrl index 2711427..16a659c 100644 --- a/include/oauth2c.hrl +++ b/include/oauth2c.hrl @@ -28,8 +28,8 @@ -type url() :: binary(). %% <<"password">> or <<"client_credentials">> -type at_type() :: binary(). --type headers() :: [header()]. --type header() :: {binary(), binary()}. +-type headers() :: restc:headers(). +-type header() :: restc:header(). -type status_codes() :: [status_code()]. -type status_code() :: integer(). -type reason() :: term(). @@ -37,16 +37,7 @@ -type property() :: atom() | tuple(). -type proplist() :: [property()]. -type options() :: proplist(). --type body() :: proplist() | [proplist()]. --type restc_response() :: { ok - , Status::status_code() - , Headers::headers() - , Body::body()} | - { error - , Status::status_code() - , Headers::headers() - , Body::body()} | - { error, Reason::reason()}. --type response() :: {restc_response(), #client{}}. +-type body() :: restc:body(). +-type response() :: {restc:response(), #client{}}. -type token_type() :: bearer | unsupported. -type client() :: #client{}. From c7eca8a7d8af5947cc8e2388dbf9cd229ff73abd Mon Sep 17 00:00:00 2001 From: Christian Sunesson Date: Thu, 5 Dec 2024 11:49:03 +0100 Subject: [PATCH 2/8] fix: test run on otp 26 and 27 too --- .github/workflows/erlang.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 9456a19..9751b64 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -10,8 +10,9 @@ jobs: name: OTP ${{matrix.otp}} strategy: + fail-fast: false matrix: - otp: ["24", "25"] + otp: ["24", "25", "26", "27"] steps: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1.16.0 From 2602da3cc2b6294e8782bd51bc575bbf071f5151 Mon Sep 17 00:00:00 2001 From: Christian Sunesson Date: Thu, 5 Dec 2024 11:56:35 +0100 Subject: [PATCH 3/8] fix: stop testing for otp 24 --- .github/workflows/erlang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 9751b64..d44fa1d 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - otp: ["24", "25", "26", "27"] + otp: ["25", "26", "27"] steps: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1.16.0 From 41980e29bbbc3ec8ae6a2481d4e8942f56fc5db6 Mon Sep 17 00:00:00 2001 From: Christian Sunesson Date: Thu, 5 Dec 2024 11:57:04 +0100 Subject: [PATCH 4/8] fix: app depend on jsx (dialyzer sad) --- src/oauth2c.app.src | 1 + 1 file changed, 1 insertion(+) diff --git a/src/oauth2c.app.src b/src/oauth2c.app.src index 12126d8..c2ae1c3 100644 --- a/src/oauth2c.app.src +++ b/src/oauth2c.app.src @@ -34,6 +34,7 @@ kernel, stdlib, inets, + jsx, jose, restc ]}, From 9155d5fa03ffbfc0ea79d126e67c89684eb16c46 Mon Sep 17 00:00:00 2001 From: Christian Sunesson Date: Thu, 5 Dec 2024 11:59:15 +0100 Subject: [PATCH 5/8] fix: upgrade restc --- rebar.config | 2 +- rebar.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/rebar.config b/rebar.config index e4f2b0a..6f7dd11 100644 --- a/rebar.config +++ b/rebar.config @@ -25,7 +25,7 @@ %% ---------------------------------------------------------------------------- {deps, - [ {restc, ".*", {git, "https://github.com/kivra/restclient.git", {tag, "0.9.9"}}} + [ {restc, ".*", {git, "https://github.com/kivra/restclient.git", {tag, "0.9.10"}}} , {jose, {git, "https://github.com/potatosalad/erlang-jose.git", {tag, "1.11.6"}}} ]}. diff --git a/rebar.lock b/rebar.lock index ad9be24..4ef5392 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,6 +1,6 @@ {"1.2.0", [{<<"base64url">>,{pkg,<<"base64url">>,<<"0.0.1">>},1}, - {<<"certifi">>,{pkg,<<"certifi">>,<<"2.5.3">>},2}, + {<<"certifi">>,{pkg,<<"certifi">>,<<"2.12.0">>},2}, {<<"erlsom">>,{pkg,<<"erlsom">>,<<"1.5.1">>},1}, {<<"hackney">>,{pkg,<<"hackney">>,<<"1.20.1">>},1}, {<<"idna">>,{pkg,<<"idna">>,<<"6.1.1">>},2}, @@ -10,37 +10,37 @@ 0}, {<<"jsx">>,{pkg,<<"jsx">>,<<"3.1.0">>},1}, {<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2}, - {<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.2.0">>},2}, - {<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.1">>},2}, + {<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.3.0">>},2}, + {<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.4.1">>},2}, {<<"restc">>, {git,"https://github.com/kivra/restclient.git", - {ref,"424f2a81ac478c3560254315b3604debb03a8c62"}}, + {ref,"597d8162b4a9f547046f5ca604c93908b55e7e2a"}}, 0}, - {<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.6">>},2}, + {<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.7">>},2}, {<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.0">>},2}]}. [ {pkg_hash,[ {<<"base64url">>, <<"36A90125F5948E3AFD7BE97662A1504B934DD5DAC78451CA6E9ABF85A10286BE">>}, - {<<"certifi">>, <<"70BDD7E7188C804F3A30EE0E7C99655BC35D8AC41C23E12325F36AB449B70651">>}, + {<<"certifi">>, <<"2D1CCA2EC95F59643862AF91F001478C9863C2AC9CB6E2F89780BFD8DE987329">>}, {<<"erlsom">>, <<"C8FE2BABD33FF0846403F6522328B8AB676F896B793634CFE7EF181C05316C03">>}, {<<"hackney">>, <<"8D97AEC62DDDDD757D128BFD1DF6C5861093419F8F7A4223823537BAD5D064E2">>}, {<<"idna">>, <<"8A63070E9F7D0C62EB9D9FCB360A7DE382448200FBBD1B106CC96D3D8099DF8D">>}, {<<"jsx">>, <<"D12516BAA0BB23A59BB35DCCAF02A1BD08243FCBB9EFE24F2D9D056CCFF71268">>}, {<<"metrics">>, <<"25F094DEA2CDA98213CECC3AEFF09E940299D950904393B2A29D191C346A8486">>}, - {<<"mimerl">>, <<"67E2D3F571088D5CFD3E550C383094B47159F3EEE8FFA08E64106CDF5E981BE3">>}, - {<<"parse_trans">>, <<"16328AB840CC09919BD10DAB29E431DA3AF9E9E7E7E6F0089DD5A2D2820011D8">>}, - {<<"ssl_verify_fun">>, <<"CF344F5692C82D2CD7554F5EC8FD961548D4FD09E7D22F5B62482E5AEAEBD4B0">>}, + {<<"mimerl">>, <<"D0CD9FC04B9061F82490F6581E0128379830E78535E017F7780F37FEA7545726">>}, + {<<"parse_trans">>, <<"6E6AA8167CB44CC8F39441D05193BE6E6F4E7C2946CB2759F015F8C56B76E5FF">>}, + {<<"ssl_verify_fun">>, <<"354C321CF377240C7B8716899E182CE4890C5938111A1296ADD3EC74CF1715DF">>}, {<<"unicode_util_compat">>, <<"BC84380C9AB48177092F43AC89E4DFA2C6D62B40B8BD132B1059ECC7232F9A78">>}]}, {pkg_hash_ext,[ {<<"base64url">>, <<"FAB09B20E3F5DB886725544CBCF875B8E73EC93363954EB8A1A9ED834AA8C1F9">>}, - {<<"certifi">>, <<"ED516ACB3929B101208A9D700062D520F3953DA3B6B918D866106FFA980E1C10">>}, + {<<"certifi">>, <<"EE68D85DF22E554040CDB4BE100F33873AC6051387BAF6A8F6CE82272340FF1C">>}, {<<"erlsom">>, <<"7965485494C5844DD127656AC40F141AADFA174839EC1BE1074E7EDF5B4239EB">>}, {<<"hackney">>, <<"FE9094E5F1A2A2C0A7D10918FEE36BFEC0EC2A979994CFF8CFE8058CD9AF38E3">>}, {<<"idna">>, <<"92376EB7894412ED19AC475E4A86F7B413C1B9FBB5BD16DCCD57934157944CEA">>}, {<<"jsx">>, <<"0C5CC8FDC11B53CC25CF65AC6705AD39E54ECC56D1C22E4ADB8F5A53FB9427F3">>}, {<<"metrics">>, <<"69B09ADDDC4F74A40716AE54D140F93BEB0FB8978D8636EADED0C31B6F099F16">>}, - {<<"mimerl">>, <<"F278585650AA581986264638EBF698F8BB19DF297F66AD91B18910DFC6E19323">>}, - {<<"parse_trans">>, <<"07CD9577885F56362D414E8C4C4E6BDF10D43A8767ABB92D24CBE8B24C54888B">>}, - {<<"ssl_verify_fun">>, <<"BDB0D2471F453C88FF3908E7686F86F9BE327D065CC1EC16FA4540197EA04680">>}, + {<<"mimerl">>, <<"A1E15A50D1887217DE95F0B9B0793E32853F7C258A5CD227650889B38839FE9D">>}, + {<<"parse_trans">>, <<"620A406CE75DADA827B82E453C19CF06776BE266F5A67CFF34E1EF2CBB60E49A">>}, + {<<"ssl_verify_fun">>, <<"FE4C190E8F37401D30167C8C405EDA19469F34577987C76DDE613E838BBC67F8">>}, {<<"unicode_util_compat">>, <<"25EEE6D67DF61960CF6A794239566599B09E17E668D3700247BC498638152521">>}]} ]. From f56bc8ac6896a9f487fd99767f2b720dc595ea05 Mon Sep 17 00:00:00 2001 From: Christian Sunesson Date: Thu, 5 Dec 2024 12:04:22 +0100 Subject: [PATCH 6/8] fix: try using latest rebar3 --- .github/workflows/erlang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index d44fa1d..52ee7b1 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -18,7 +18,7 @@ jobs: - uses: erlef/setup-beam@v1.16.0 with: otp-version: ${{matrix.otp}} - rebar3-version: "3.20.0" + rebar3-version: "latest" - name: Compile run: make - name: Run elvis From 06d99cd78a4f94364c3255ee57592ba449a487f4 Mon Sep 17 00:00:00 2001 From: Christian Sunesson Date: Thu, 5 Dec 2024 12:05:56 +0100 Subject: [PATCH 7/8] fix: install rebar true --- .github/workflows/erlang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 52ee7b1..595a59e 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -18,7 +18,7 @@ jobs: - uses: erlef/setup-beam@v1.16.0 with: otp-version: ${{matrix.otp}} - rebar3-version: "latest" + install-rebar: true - name: Compile run: make - name: Run elvis From e00ac0a48fb0fbe2ebce2f64ae30956bcced1ae4 Mon Sep 17 00:00:00 2001 From: Christian Sunesson Date: Thu, 5 Dec 2024 12:10:35 +0100 Subject: [PATCH 8/8] fix: use rebar3 3.24.0 --- .github/workflows/erlang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 595a59e..ac3a738 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -18,7 +18,7 @@ jobs: - uses: erlef/setup-beam@v1.16.0 with: otp-version: ${{matrix.otp}} - install-rebar: true + rebar3-version: "3.24.0" - name: Compile run: make - name: Run elvis