Describe the bug
A clear and concise description of what the bug is.
I had some problems with the check & build process.
在 cargo check 的过程中报错了。
报错内容跟 delicate-utils 的依赖 poem 有关。
[root@2cb22c0d29ba delicate]# cargo check
Compiling delicate-scheduler v0.1.0 (/delicate/delicate-scheduler)
Checking delicate-utils v0.1.0 (/delicate/delicate-utils)
error[E0599]: the method `as_dyn_error` exists for reference `&ParseCookieError`, but its trait bounds were not sati
sfied
--> delicate-utils/src/error.rs:28:13
|
28 | #[error("Parse Cookie fail.")]
| ^^^^^^^^^^^^^^^^^^^^ method cannot be called on `&ParseCookieError` due to unsatisfied trait bound
s
|
::: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/poem-1.0.19/src/error.rs:253:1
|
253 | pub enum ParseCookieError {
| -------------------------
| |
| doesn't satisfy `ParseCookieError: AsDynError`
| doesn't satisfy `ParseCookieError: StdError`
|
= note: the following trait bounds were not satisfied:
`ParseCookieError: StdError`
which is required by `ParseCookieError: AsDynError`
`&ParseCookieError: StdError`
which is required by `&ParseCookieError: AsDynError`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `delicate-utils` due to previous error
I tested it in docker environment.
我分别用了 rust:alpine 和 rust:latest 来测试,结果都出现了一样的错误。
To Reproduce
Steps to reproduce the behavior:
1.install docker
2.pull & run rust:alpine (x86_64-unknown-linux-musl)
docker run -it --name rs-musl rust:alpine
3.git clone this repo
git clone --depth=1 https://github.com/BinChengZhao/delicate
4.copy env file
cd delicate
cp template.env .env
5.install deps
apk update
apk add mariadb-dev postgresql-dev openssl-dev musl-dev
6.run cargo command
7.error (unsatisfied trait bounds)
--> delicate-utils/src/error.rs:28:13
|
28 | #[error("Parse Cookie fail.")]
| ^^^^^^^^^^^^^^^^^^^^ method cannot be called on `&ParseCookieError` due to unsatisfied trait bounds
8.exit this container and run rust:latest (x86_64-unknown-linux-gnu)
docker run -it --name rs-stable rust:latest
9.run container & check deps
docker exec -it rs-stable bash
apt list --installed | grep -E "mysql|mariadb|libssl|libpq"
default-libmysqlclient-dev/now 1.0.7 amd64 [installed,local]
libmariadb-dev-compat/now 1:10.5.12-0+deb11u1 amd64 [installed,local]
libmariadb-dev/now 1:10.5.12-0+deb11u1 amd64 [installed,local]
libmariadb3/now 1:10.5.12-0+deb11u1 amd64 [installed,local]
libpq-dev/now 13.4-0+deb11u1 amd64 [installed,local]
libpq5/now 13.4-0+deb11u1 amd64 [installed,local]
libssl-dev/now 1.1.1k-1+deb11u1 amd64 [installed,local]
libssl1.1/now 1.1.1k-1+deb11u1 amd64 [installed,local]
mariadb-common/now 1:10.5.12-0+deb11u1 all [installed,local]
mysql-common/now 5.8+1.0.7 all [installed,local]
- copy env file & cargo check
I encountered the same error as the alpine (rust musl) container.
Expected behavior
A clear and concise description of what you expected to happen.
1.我想要在 alpine 容器里运行delicate。
I want to run it in a musl environment.
2.我希望开发者能提供预编译的版本。
这样子普通用户就不用操心编译的事情了。
I would like to get the musl binary on the release page.
3.我希望核心配置能在编译后进行修改,而不是重新配置,重新编译。
I would like to be able to change the configuration after compilation rather than recompile it with an .env file.
For example,
template-env.toml
[database]
# pssql or mysql
backend = "postgre"
url = "..."
[redis]
enabled = true
# IP address or hostname
host = "redis-docker"
port = 6379
passwd = "ItIsRedisPassword"
Screenshots

Describe the bug
A clear and concise description of what the bug is.
I had some problems with the check & build process.
在
cargo check的过程中报错了。报错内容跟 delicate-utils 的依赖
poem有关。I tested it in docker environment.
我分别用了 rust:alpine 和 rust:latest 来测试,结果都出现了一样的错误。
To Reproduce
Steps to reproduce the behavior:
1.install docker
2.pull & run rust:alpine (x86_64-unknown-linux-musl)
3.git clone this repo
4.copy env file
cd delicate cp template.env .env5.install deps
6.run cargo command
7.error (unsatisfied trait bounds)
8.exit this container and run rust:latest (x86_64-unknown-linux-gnu)
9.run container & check deps
docker exec -it rs-stable bashI encountered the same error as the alpine (rust musl) container.
Expected behavior
A clear and concise description of what you expected to happen.
1.我想要在 alpine 容器里运行delicate。
I want to run it in a musl environment.
2.我希望开发者能提供预编译的版本。
这样子普通用户就不用操心编译的事情了。
I would like to get the musl binary on the release page.
3.我希望核心配置能在编译后进行修改,而不是重新配置,重新编译。
I would like to be able to change the configuration after compilation rather than recompile it with an .env file.
For example,
template-env.toml
Screenshots