Skip to content

Commit 299114f

Browse files
authored
Replace acid_io by core2 (#40)
Hello 👋 [This advisory](GHSA-x4mq-m75f-mx8m) has been bothering me since a while. The origin of it is [`acid_io`](https://github.com/dataphract/acid_io/blob/v0.1.0/Cargo.toml#L28), where the [issue has been fixed](dataphract/acid_io#21), but no release has been publish 😞 (since 3 years!) So, after reading this [discussion/issue](rust-lang/rust#48331), I decided to replace `acid_io` for [`core2`](https://crates.io/crates/core2) (which seems quite used, even if the last release was 2 years ago). The changes was trivial as `acid_io` and `core2::io` have the same API as `std::io`. But, while trying to test those changes, the CI failed (which was also the case [`last week`](https://github.com/dequbed/rsasl/actions/runs/8870496836)). So I started to fix the CI, and made changes to make the CI pass. I also added a `dependabot.yaml`, PR will be created monthly to update the dependencies in the `Cargo.toml` and `ci.yml`. I formatted the `README.md` and `Cargo.toml`. I had to bump MSRV to 1.65. I bumped the dependencies to their latest versions, and pushed the `Cargo.lock`, see [`why`](https://doc.rust-lang.org/cargo/faq.html#why-have-cargolock-in-version-control). And I ran `cargo clippy --fix` and `cargo fmt`, with not much modification from myself. I just finished to write the description of this PR and realize that someone was working on #36, oops
2 parents c52959d + 3706a6b commit 299114f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2336
-381
lines changed

.config/spell.dic

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
1000
2+
ABNF
3+
authcid
4+
authid
5+
authzid
6+
bufs
7+
dtolnay
8+
GSSAPI
9+
lifecycle
10+
linkme
11+
Mechname
12+
miri
13+
OAUTHBEARER
14+
repr
15+
rsasl
16+
rustc
17+
sasl
18+
saslprep
19+
SECURID
20+
stringprep
21+
testutils
22+
thiserror
23+
XOAUTH2
24+
ZST
25+
struct
26+
TLS
27+
CHANGELOG
28+
md
29+
README
30+
queryable
31+
config
32+
base64
33+
storable
34+
pluggable
35+
SSO
36+
Kerberos
37+
OpenID
38+
unprotect
39+
unprotects
40+
XMPP
41+
SMTP
42+
IMAP
43+
gsasl
44+
steps
45+
bugfixes
46+
OAuth
47+
structs
48+
impl
49+
IRCv3
50+
semver
51+
KERBEROS_V5
52+
IdP
53+
provide_any
54+
NTLM
55+
DIGEST_MD5
56+
FFI
57+
CRAM_MD5
58+
changelog
59+
implementor
60+
implementors
61+
IPsec
62+
flavours
63+
OPENID20
64+
dtolnay's
65+
SAML20
66+
msrv
67+
behaviour
68+
behaviours
69+
unencrypted
70+
IANA
71+
enum
72+
unprotects

.config/spellcheck.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
dev_comments = false
2+
skip_readme = false
3+
4+
[hunspell]
5+
lang = "en_US"
6+
search_dirs = ["."]
7+
skip_os_lookups = false
8+
use_builtin = true
9+
tokenization_splitchars = "\",;:.!?#(){}[]|/_-‒'`&@§¶…"
10+
extra_dictionaries = ["spell.dic"]
11+
12+
[hunspell.quirks]
13+
transform_regex = []
14+
allow_concatenation = false
15+
allow_dashes = false
16+
allow_emojis = true
17+
18+
[nlprules]
19+
20+
[reflow]
21+
max_line_length = 80

.github/dependabot.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: monthly

.github/workflows/ci.yml

Lines changed: 61 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,62 @@ on:
66
branches:
77
- development
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
11+
cancel-in-progress: true
12+
913
env:
1014
RUSTFLAGS: -Dwarnings
1115
RUST_BACKTRACE: full
16+
rust_min: 1.65.0
1217

1318
jobs:
1419
rustfmt:
15-
name: rustfmt / stable
1620
runs-on: ubuntu-latest
1721
steps:
18-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
1923
- uses: dtolnay/rust-toolchain@stable
20-
- name: cargo fmt
21-
run: cargo fmt --all -- --check
24+
with:
25+
components: rustfmt
26+
- run: cargo fmt --all -- --check
2227

2328
clippy:
24-
name: clippy / stable
2529
runs-on: ubuntu-latest
2630
steps:
27-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
2832
- uses: dtolnay/rust-toolchain@stable
2933
with:
3034
components: clippy
31-
- name: Install required packages (Linux)
32-
if: runner.os == 'Linux'
33-
run: sudo apt-get update && sudo apt-get install libgssapi-krb5-2 libkrb5-dev
34-
- run: cargo clippy --all-features --all-targets --tests -- -Dwarnings
35+
- if: ${{ runner.os == 'Linux' }}
36+
run: sudo apt update && sudo apt install -y libclang-dev libgssapi-krb5-2 libkrb5-dev
37+
- run: cargo clippy --all-features --all-targets --tests
38+
39+
docs:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: dtolnay/rust-toolchain@master
44+
with:
45+
toolchain: nightly
46+
- if: ${{ runner.os == 'Linux' }}
47+
run: sudo apt update && sudo apt install -y libclang-dev libgssapi-krb5-2 libkrb5-dev
48+
- run: cargo doc --workspace --no-deps --all-features --document-private-items
49+
env:
50+
RUSTFLAGS: --cfg docsrs -Dwarnings
51+
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
3552

3653
check:
37-
name: check / stable
3854
runs-on: ubuntu-latest
3955
steps:
40-
- uses: actions/checkout@v3
56+
- uses: actions/checkout@v4
4157
- uses: dtolnay/rust-toolchain@stable
42-
- name: Setup dependency cache
43-
uses: Swatinem/rust-cache@v2
44-
- name: install cargo-hack
45-
run: cargo install cargo-hack
46-
- name: Install required packages (Linux)
47-
if: runner.os == 'Linux'
48-
run: sudo apt-get update && sudo apt-get install libgssapi-krb5-2 libkrb5-dev
58+
- uses: Swatinem/rust-cache@v2
59+
- run: cargo install cargo-hack
60+
- if: ${{ runner.os == 'Linux' }}
61+
run: sudo apt update && sudo apt install -y libclang-dev libgssapi-krb5-2 libkrb5-dev
4962
- run: cargo hack check --each-feature --features=std --skip=testutils
5063

5164
test:
52-
name: test / ${{matrix.rust}}
5365
runs-on: ubuntu-latest
5466
strategy:
5567
fail-fast: false
@@ -58,57 +70,56 @@ jobs:
5870
include:
5971
- rust: nightly
6072
steps:
61-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v4
6274
- uses: dtolnay/rust-toolchain@master
6375
with:
6476
toolchain: ${{matrix.rust}}
65-
- name: Install required packages (Linux)
66-
if: runner.os == 'Linux'
67-
run: sudo apt-get update && sudo apt-get install libgssapi-krb5-2 libkrb5-dev
77+
- if: ${{ runner.os == 'Linux' }}
78+
run: sudo apt update && sudo apt install -y libclang-dev libgssapi-krb5-2 libkrb5-dev
6879
- run: cargo test --all
69-
env:
70-
RUSTFLAGS: ${{matrix.rustflags}} ${{env.RUSTFLAGS}}
7180

7281
miri:
73-
name: miri / stable
7482
runs-on: ubuntu-latest
7583
steps:
76-
- uses: actions/checkout@v3
84+
- uses: actions/checkout@v4
7785
- uses: dtolnay/rust-toolchain@miri
78-
- name: Install required packages (Linux)
79-
if: runner.os == 'Linux'
80-
run: sudo apt-get update && sudo apt-get install libgssapi-krb5-2 libkrb5-dev
86+
- if: ${{ runner.os == 'Linux' }}
87+
run: sudo apt update && sudo apt install -y libclang-dev libgssapi-krb5-2 libkrb5-dev
8188
- run: cargo miri test --all --all-features
8289
env:
8390
MIRIFLAGS: -Zmiri-strict-provenance
8491

8592
msrv:
86-
name: Rust 1.61.0
8793
runs-on: ubuntu-latest
8894
steps:
89-
- uses: actions/checkout@v3
90-
- uses: dtolnay/rust-toolchain@1.61.0
95+
- uses: actions/checkout@v4
96+
- uses: dtolnay/rust-toolchain@master
9197
with:
98+
toolchain: ${{ env.rust_min }}
9299
components: rust-src
93-
- name: Install required packages (Linux)
94-
if: runner.os == 'Linux'
95-
run: sudo apt-get update && sudo apt-get install libgssapi-krb5-2 libkrb5-dev
100+
- if: ${{ runner.os == 'Linux' }}
101+
run: sudo apt update && sudo apt install -y libclang-dev libgssapi-krb5-2 libkrb5-dev
96102
- run: cargo check --all-features
97-
103+
98104
minimal-versions:
105+
runs-on: ubuntu-latest
106+
steps:
107+
- uses: actions/checkout@v4
108+
- uses: dtolnay/rust-toolchain@nightly
109+
- uses: taiki-e/install-action@cargo-minimal-versions
110+
- uses: taiki-e/install-action@cargo-hack
111+
- if: ${{ runner.os == 'Linux' }}
112+
run: sudo apt update && sudo apt install -y libclang-dev libgssapi-krb5-2 libkrb5-dev
113+
- run: cargo minimal-versions --direct --ignore-private check
114+
115+
spellcheck:
99116
runs-on: ubuntu-latest
100117
steps:
101118
- uses: actions/checkout@v3
102-
- uses: dtolnay/rust-toolchain@1.61.0
119+
- uses: dtolnay/rust-toolchain@master
103120
with:
104-
toolchain: nightly
105-
- name: Install required packages (Linux)
106-
if: runner.os == 'Linux'
107-
run: sudo apt-get update && sudo apt-get install libgssapi-krb5-2 libkrb5-dev
108-
- name: Check
109-
run: |
110-
cargo +nightly update -Z minimal-versions
111-
cargo +1.61 check --workspace --all-targets --all-features
112-
cargo +1.61 test --workspace --all-targets --all-features
113-
env:
114-
RUSTFLAGS: -Dwarnings
121+
toolchain: ${{ env.rust_min }}
122+
- uses: taiki-e/install-action@v2
123+
with:
124+
tool: cargo-spellcheck
125+
- run: cargo spellcheck --code 1

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
target/
2-
Cargo.lock
32
tags
43
/.idea/
54
TODO.md

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"cSpell.customDictionaries": {
3+
"project-words": {
4+
"name": "words",
5+
"path": "${workspaceRoot}/.config/spell.dic",
6+
"description": "Words used",
7+
"addWords": true
8+
},
9+
"custom": true,
10+
"internal-terms": false
11+
}
12+
}

0 commit comments

Comments
 (0)