mirror of
https://github.com/valitydev/limiter-proto.git
synced 2024-11-06 00:35:18 +00:00
TD-312: Bump to valitydev/damsel@dac2cb5 (#21)
Also use valitydev/thrift compiler v0.14.2.3 w/ `app_namespaces`. * Reuse Erlang CI workflow * Specify `damsel` as dependency
This commit is contained in:
parent
ac97053892
commit
c5dfe39a00
44
.github/workflows/erlang-pr.yml
vendored
44
.github/workflows/erlang-pr.yml
vendored
@ -1,37 +1,17 @@
|
|||||||
name: Erlang
|
name: Erlang build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ['*']
|
branches:
|
||||||
push:
|
- "*"
|
||||||
branches: [master]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build and verify
|
uses: valitydev/erlang-workflows/.github/workflows/erlang-simple-build.yml@v1
|
||||||
runs-on: ubuntu-latest
|
with:
|
||||||
steps:
|
otp-version: 24
|
||||||
|
rebar-version: 3
|
||||||
- uses: actions/checkout@v3
|
use-thrift: true
|
||||||
|
thrift-version: 0.14.2.3
|
||||||
- uses: valitydev/action-setup-thrift@v1
|
run-eunit: false
|
||||||
with:
|
run-common-test: false
|
||||||
thrift-version: '0.14.2.2'
|
|
||||||
|
|
||||||
- uses: erlef/setup-beam@v1.9
|
|
||||||
id: beam
|
|
||||||
with:
|
|
||||||
otp-version: '24'
|
|
||||||
rebar3-version: '3.18'
|
|
||||||
|
|
||||||
- name: Restore PLT cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: plt-cache
|
|
||||||
with:
|
|
||||||
key: |
|
|
||||||
${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-plt
|
|
||||||
path: |
|
|
||||||
_build/default/rebar3_*_plt
|
|
||||||
|
|
||||||
- run: rebar3 compile
|
|
||||||
- run: rebar3 xref
|
|
||||||
- run: rebar3 dialyzer
|
|
||||||
|
@ -3,7 +3,7 @@ include "limiter.thrift"
|
|||||||
include "limiter_config.thrift"
|
include "limiter_config.thrift"
|
||||||
|
|
||||||
namespace java dev.vality.limiter.configurator
|
namespace java dev.vality.limiter.configurator
|
||||||
namespace erlang limiter.configurator
|
namespace erlang limproto.configurator
|
||||||
|
|
||||||
typedef string LimitName
|
typedef string LimitName
|
||||||
typedef limiter_config.LimitConfigID LimitConfigID
|
typedef limiter_config.LimitConfigID LimitConfigID
|
||||||
|
@ -4,7 +4,7 @@ include "limiter_base.thrift"
|
|||||||
include "limiter_context.thrift"
|
include "limiter_context.thrift"
|
||||||
|
|
||||||
namespace java dev.vality.limiter
|
namespace java dev.vality.limiter
|
||||||
namespace erlang limiter
|
namespace erlang limproto.limiter
|
||||||
|
|
||||||
typedef string LimitChangeID
|
typedef string LimitChangeID
|
||||||
typedef string LimitID
|
typedef string LimitID
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
include "proto/domain.thrift"
|
include "proto/domain.thrift"
|
||||||
|
|
||||||
namespace java dev.vality.limiter.base
|
namespace java dev.vality.limiter.base
|
||||||
namespace erlang limiter.base
|
namespace erlang limproto.base
|
||||||
|
|
||||||
struct AmountRange {
|
struct AmountRange {
|
||||||
1: required AmountBound upper
|
1: required AmountBound upper
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
namespace java dev.vality.limiter.config
|
namespace java dev.vality.limiter.config
|
||||||
namespace erlang limiter.config
|
namespace erlang limproto.config
|
||||||
|
|
||||||
include "proto/base.thrift"
|
include "proto/base.thrift"
|
||||||
include "proto/domain.thrift"
|
include "proto/domain.thrift"
|
||||||
|
@ -3,7 +3,7 @@ include "proto/domain.thrift"
|
|||||||
include "limiter_payproc_context.thrift"
|
include "limiter_payproc_context.thrift"
|
||||||
|
|
||||||
namespace java dev.vality.limiter.context
|
namespace java dev.vality.limiter.context
|
||||||
namespace erlang limiter.context
|
namespace erlang limproto.context.limiter
|
||||||
|
|
||||||
typedef base.ID ID
|
typedef base.ID ID
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ include "proto/base.thrift"
|
|||||||
include "proto/domain.thrift"
|
include "proto/domain.thrift"
|
||||||
|
|
||||||
namespace java dev.vality.limiter.payproc.context
|
namespace java dev.vality.limiter.payproc.context
|
||||||
namespace erlang limiter.context.payproc
|
namespace erlang limproto.context.payproc
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Контекст, получаемый из сервисов, реализующих один из интерфейсов протокола
|
* Контекст, получаемый из сервисов, реализующих один из интерфейсов протокола
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
namespace java dev.vality.limiter.range
|
namespace java dev.vality.limiter.range
|
||||||
namespace erlang limiter.range
|
namespace erlang limproto.range
|
||||||
|
|
||||||
include "proto/base.thrift"
|
include "proto/base.thrift"
|
||||||
include "proto/domain.thrift"
|
include "proto/domain.thrift"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
namespace java dev.vality.limiter.range.time
|
namespace java dev.vality.limiter.range.time
|
||||||
namespace erlang limiter.time.range
|
namespace erlang limproto.timerange
|
||||||
|
|
||||||
include "proto/base.thrift"
|
include "proto/base.thrift"
|
||||||
include "proto/domain.thrift"
|
include "proto/domain.thrift"
|
||||||
|
12
rebar.config
12
rebar.config
@ -1,6 +1,5 @@
|
|||||||
%% Common project erlang options.
|
%% Common project erlang options.
|
||||||
{erl_opts, [
|
{erl_opts, [
|
||||||
|
|
||||||
% mandatory
|
% mandatory
|
||||||
debug_info,
|
debug_info,
|
||||||
warnings_as_errors,
|
warnings_as_errors,
|
||||||
@ -26,9 +25,7 @@
|
|||||||
]}.
|
]}.
|
||||||
|
|
||||||
{deps, [
|
{deps, [
|
||||||
{damsel,
|
{damsel, {git, "https://github.com/valitydev/damsel.git", {branch, "master"}}}
|
||||||
{git, "https://github.com/valitydev/damsel.git", {branch, "master"}}
|
|
||||||
}
|
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%% XRef checks
|
%% XRef checks
|
||||||
@ -52,18 +49,17 @@
|
|||||||
|
|
||||||
{plugins, [
|
{plugins, [
|
||||||
{rebar3_thrift_compiler,
|
{rebar3_thrift_compiler,
|
||||||
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {branch, "master"}}}
|
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.4"}}}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{provider_hooks, [
|
{provider_hooks, [
|
||||||
{pre, [
|
{pre, [
|
||||||
{compile, {thrift, compile}},
|
{compile, {thrift, compile}},
|
||||||
{clean , {thrift, clean }}
|
{clean, {thrift, clean}}
|
||||||
]}
|
]}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{thrift_compiler_opts, [
|
{thrift_compiler_opts, [
|
||||||
{in_dir, "proto"},
|
{in_dir, "proto"},
|
||||||
{in_files, all},
|
{gen, "erlang:app_namespaces"}
|
||||||
{gen, "erlang:scoped_typenames,app_prefix=lim"}
|
|
||||||
]}.
|
]}.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[{<<"damsel">>,
|
[{<<"damsel">>,
|
||||||
{git,"https://github.com/valitydev/damsel.git",
|
{git,"https://github.com/valitydev/damsel.git",
|
||||||
{ref,"d384c125d16c0204e23b0d96a6ef791244a72315"}},
|
{ref,"dac2cb599499cc0701e60856f4092c9ab283eedf"}},
|
||||||
0}].
|
0}].
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
{vsn, "1.0.0"},
|
{vsn, "1.0.0"},
|
||||||
{applications, [
|
{applications, [
|
||||||
kernel,
|
kernel,
|
||||||
stdlib
|
stdlib,
|
||||||
|
damsel
|
||||||
]}
|
]}
|
||||||
]}.
|
]}.
|
||||||
|
Loading…
Reference in New Issue
Block a user