Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Commit e14f681

Browse files
bors[bot]thomaseizingerdependabot-preview[bot]Franck Royer
authored
1698: Replace cargo-make with regular Makefile r=mergify[bot] a=thomaseizinger Closes #1046. 1700: Bump http from 0.1.19 to 0.1.20 r=mergify[bot] a=dependabot-preview[bot] Bumps [http](https://github.com/hyperium/http) from 0.1.19 to 0.1.20. <details> <summary>Changelog</summary> *Sourced from [http's changelog](https://github.com/hyperium/http/blob/master/CHANGELOG.md).* > # 0.1.20 (November 26, 2019) > > * Fix possible double-free if `header::Drain` iterator is `std::mem::forgot`en ([#357](https://github-redirect.dependabot.com/hyperium/http/issues/357)). > * Fix possible data race if multiple `header::ValueDrain`s are iterated on different threads ([#362](https://github-redirect.dependabot.com/hyperium/http/issues/362)). > * Fix `HeaderMap::reserve` capacity overflows ([#360](https://github-redirect.dependabot.com/hyperium/http/issues/360)). > * Fix parsing long authority-form `Uri`s ([#351](https://github-redirect.dependabot.com/hyperium/http/issues/351)). </details> <details> <summary>Commits</summary> - [`4a5b64d`](hyperium/http@4a5b64d) v0.1.20 - [`6b07ee4`](hyperium/http@6b07ee4) Refactor Method::is_idempotent for readability ([#348](https://github-redirect.dependabot.com/hyperium/http/issues/348)) - [`6856193`](hyperium/http@6856193) Fix docs indentation ([#347](https://github-redirect.dependabot.com/hyperium/http/issues/347)) - [`d3cae7c`](hyperium/http@d3cae7c) Fix parsing of long host with no scheme ([#351](https://github-redirect.dependabot.com/hyperium/http/issues/351)) - [`8ffe094`](hyperium/http@8ffe094) Make ValueDrain eagerly collect its extra values - [`81ceb61`](hyperium/http@81ceb61) fix capacity overflows in HeaderMap::reserve - [`32f1ae1`](hyperium/http@32f1ae1) Remove unused 'inner label - [`82d53db`](hyperium/http@82d53db) Fix HeaderMap::drain double-free if drain iterator is forgotten - See full diff in [compare view](hyperium/http@v0.1.19...v0.1.20) </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=http&package-manager=cargo&previous-version=0.1.19&new-version=0.1.20)](https://dependabot.com/compatibility-score.html?dependency-name=http&package-manager=cargo&previous-version=0.1.19&new-version=0.1.20) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in the `.dependabot/config.yml` file in this repo: - Update frequency - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> 1701: Bump comit-sdk from 0.6.0 to 0.7.0 in /api_tests r=mergify[bot] a=dependabot-preview[bot] Bumps [comit-sdk](https://github.com/comit-network/comit-js-sdk) from 0.6.0 to 0.7.0. <details> <summary>Release notes</summary> *Sourced from [comit-sdk's releases](https://github.com/comit-network/comit-js-sdk/releases).* > ## Release 0.7.0 > ### Changed > - Make alpha and beta expiries optional in `SwapRequest`. > - `ExecutionParams.ledgers` is now optional and defaulted to mainnet values. `chain_id` is used for Ethereum meaning that `comit-rs:^0.4.0` is needed. > - Improve `TakerNegotiator` API. > - Change `Order` to have all fields in camelCase. > - Rename `Swap.getEntity()` & `SwapEntity` to `Swap.fetchDetails()` & `SwapDetails` for clarity. > - Improve `TryParams` terminology, use of seconds. > - Use nominal amounts (Bitcoin, Ether instead of Satoshi or Wei) in `Order`. </details> <details> <summary>Changelog</summary> *Sourced from [comit-sdk's changelog](https://github.com/comit-network/comit-js-sdk/blob/master/CHANGELOG.md).* > ## [0.7.0] - 2019-11-27 > > ### Changed > - Make alpha and beta expiries optional in `SwapRequest`. > - `ExecutionParams.ledgers` is now optional and defaulted to mainnet values. `chain_id` is used for Ethereum meaning that `comit-rs:^0.4.0` is needed. > - Improve `TakerNegotiator` API. > - Change `Order` to have all fields in camelCase. > - Rename `Swap.getEntity()` & `SwapEntity` to `Swap.fetchDetails()` & `SwapDetails` for clarity. > - Improve `TryParams` terminology, use of seconds. > - Use nominal amounts (Bitcoin, Ether instead of Satoshi or Wei) in `Order`. </details> <details> <summary>Commits</summary> - [`506821c`](comit-network/comit-js-sdk@506821c) Release 0.7.0 - [`6cf8380`](comit-network/comit-js-sdk@6cf8380) Merge pull request [#65](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/65) from comit-network/negotation-follow-up - [`b82e0c4`](comit-network/comit-js-sdk@b82e0c4) Align expiry expectations with cnd's default expiries - [`6c1f1ef`](comit-network/comit-js-sdk@6c1f1ef) Ensure expiry order for mainnet - [`b170ed0`](comit-network/comit-js-sdk@b170ed0) test: Ensure expiry order for mainnet - [`2d903cf`](comit-network/comit-js-sdk@2d903cf) Use nominal amounts in `Order` - [`37c48f8`](comit-network/comit-js-sdk@37c48f8) Improve `TryParams` terminology - [`9d315dc`](comit-network/comit-js-sdk@9d315dc) Rename `SwapEntity` to `SwapDetails` - [`59f1cc4`](comit-network/comit-js-sdk@59f1cc4) Rename `getEntity` to `fetchDetails` - [`7f8ffc0`](comit-network/comit-js-sdk@7f8ffc0) Use camelCase - Additional commits viewable in [compare view](comit-network/comit-js-sdk@0.6.0...0.7.0) </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.6.0&new-version=0.7.0)](https://dependabot.com/compatibility-score.html?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.6.0&new-version=0.7.0) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in the `.dependabot/config.yml` file in this repo: - Update frequency - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> Co-authored-by: Thomas Eizinger <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Franck Royer <[email protected]>
4 parents 585a4d4 + 4a256c0 + b9ea75c + 9b5fde4 commit e14f681

File tree

9 files changed

+124
-275
lines changed

9 files changed

+124
-275
lines changed

.circleci/config.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
- install_node_devlibs
4343
- print_current_versions
4444
- run:
45-
name: Debug build and test using cargo make
46-
command: cargo make ci
45+
name: Debug build and test
46+
command: make ci
4747
- store_artifacts:
4848
path: api_tests/log
4949
- save_caches
@@ -61,11 +61,10 @@ jobs:
6161
- install_node_devlibs
6262
- print_current_versions
6363
- run:
64-
name: Release build and test using cargo make
64+
name: Release build and test
6565
command: |
66-
export CARGO_MAKE_CARGO_BUILD_TEST_FLAGS="--all --release"
6766
export CND_BIN=~/comit/target/release/cnd
68-
cargo make ci
67+
make ci BUILD_ARGS='--release'
6968
- store_artifacts:
7069
path: api_tests/log
7170
- run:
@@ -144,8 +143,6 @@ commands:
144143
# Define variables that need interpolation
145144
# As CircleCI starts a new shell for each `run` declaration, we need to export cargo home to $BASH_ENV
146145
echo 'export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH' >> $BASH_ENV
147-
export CARGO_MAKE_VERSION="0.22.1"
148-
which cargo-make && test "$(cargo make --version)" = "cargo-make ${CARGO_MAKE_VERSION}" || cargo install cargo-make --force --version ${CARGO_MAKE_VERSION}
149146
print_current_versions:
150147
steps:
151148
- run:

.githooks/pre-commit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ dry=0 # Set to 1 to enable dry run.
66

77
function check_rs() {
88
if (( dry == 0 )); then
9-
cargo make check-rs-format
9+
make check_rust_format
1010
else
1111
echo "check_rs ran"
1212
fi
1313
}
1414

1515
function check_ts() {
1616
if (( dry == 0 )); then
17-
cargo make check-ts
17+
make check_ts_format
1818
else
1919
echo "check_ts ran"
2020
fi
2121
}
2222

2323
function check_cargo_toml() {
2424
if (( dry == 0 )); then
25-
cargo make check-cargo-toml-format
25+
make check_toml_format
2626
else
2727
echo "check_cargo_toml ran"
2828
fi

Cargo.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
RUSTUP = rustup
2+
3+
TOOLCHAIN = $(shell cat rust-toolchain)
4+
CARGO = $(RUSTUP) run --install $(TOOLCHAIN) cargo --color always
5+
6+
NIGHTLY_TOOLCHAIN = "nightly-2019-07-31"
7+
CARGO_NIGHTLY = $(RUSTUP) run --install $(NIGHTLY_TOOLCHAIN) cargo --color always
8+
9+
GIT_HOOKS_PATH = ".githooks"
10+
GIT_HOOKS = $(wildcard $(GIT_HOOKS_PATH)/*)
11+
12+
default: init_git_hooks build format
13+
14+
init_git_hooks: $(GIT_HOOKS)
15+
git config core.hooksPath $(GIT_HOOKS_PATH)
16+
17+
install_rust:
18+
$(RUSTUP) install $(TOOLCHAIN)
19+
20+
install_rust_nightly:
21+
$(RUSTUP) install $(NIGHTLY_TOOLCHAIN)
22+
23+
## Dev environment
24+
25+
install_clippy: install_rust
26+
$(RUSTUP) component list --installed --toolchain $(TOOLCHAIN) | grep -q clippy || $(RUSTUP) component add clippy --toolchain $(TOOLCHAIN)
27+
28+
install_rustfmt: install_rust_nightly
29+
$(RUSTUP) component list --installed --toolchain $(NIGHTLY_TOOLCHAIN) | grep -q rustfmt || $(RUSTUP) component add rustfmt --toolchain $(NIGHTLY_TOOLCHAIN)
30+
31+
install_tomlfmt: install_rust
32+
$(CARGO) --list | grep -q tomlfmt || $(CARGO) install cargo-tomlfmt
33+
34+
yarn_install:
35+
(cd ./api_tests; yarn install)
36+
37+
## User install
38+
39+
install:
40+
$(CARGO) install --force --path .
41+
42+
clean:
43+
$(CARGO) clean
44+
45+
## Development tasks
46+
47+
all: format build clippy test doc e2e_scripts
48+
49+
format: install_rustfmt install_tomlfmt yarn_install
50+
$(CARGO_NIGHTLY) fmt
51+
$(CARGO) tomlfmt -p Cargo.toml
52+
(cd ./api_tests; yarn run fix)
53+
54+
ci: check_format doc clippy test build e2e
55+
56+
build:
57+
$(CARGO) build --all --all-targets $(BUILD_ARGS)
58+
59+
clippy: install_clippy
60+
$(CARGO) clippy \
61+
--all-targets \
62+
-- \
63+
-W clippy::cast_possible_truncation \
64+
-W clippy::cast_sign_loss \
65+
-W clippy::fallible_impl_from \
66+
-W clippy::cast_precision_loss \
67+
-W clippy::cast_possible_wrap \
68+
-W clippy::print_stdout \
69+
-W clippy::dbg_macro \
70+
-D warnings
71+
72+
test:
73+
$(CARGO) test --all
74+
75+
doc:
76+
$(CARGO) doc
77+
78+
check_format: check_rust_format check_toml_format check_ts_format
79+
80+
check_rust_format: install_rustfmt
81+
$(CARGO_NIGHTLY) fmt -- --check
82+
83+
check_toml_format: install_tomlfmt
84+
$(CARGO) tomlfmt -d -p Cargo.toml
85+
86+
check_ts_format: yarn_install
87+
(cd ./api_tests; yarn run check)
88+
89+
e2e: build yarn_install
90+
(cd ./api_tests; yarn test)

0 commit comments

Comments
 (0)