Skip to content

Commit b27ea6a

Browse files
authored
Add Cargo.lock and upgrade dependencies. (#2423)
The modern Linebender standard is to include `Cargo.lock` in the repo and this repository in specific would greatly benefit as it would keep a record of a working state as maintenance is non-existent. All the dependency bumps are SemVer compatible and match what the CI was already using. Also pinned the mdBook CI version to match what the actual deployment script uses.
1 parent 3638264 commit b27ea6a

File tree

9 files changed

+3933
-55
lines changed

9 files changed

+3933
-55
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,35 +61,35 @@ jobs:
6161

6262
# Clippy packages in deeper-to-higher dependency order
6363
- name: cargo clippy druid-shell
64-
run: cargo clippy --manifest-path=druid-shell/Cargo.toml --all-targets --no-default-features --features=x11,image,raw-win-handle -- -D warnings
64+
run: cargo clippy --manifest-path=druid-shell/Cargo.toml --locked --all-targets --no-default-features --features=x11,image,raw-win-handle -- -D warnings
6565

6666
- name: cargo clippy druid
67-
run: cargo clippy --manifest-path=druid/Cargo.toml --all-targets --no-default-features --features=svg,image,im,x11,raw-win-handle -- -D warnings
67+
run: cargo clippy --manifest-path=druid/Cargo.toml --locked --all-targets --no-default-features --features=svg,image,im,x11,raw-win-handle -- -D warnings
6868

6969
- name: cargo clippy druid-derive
70-
run: cargo clippy --manifest-path=druid-derive/Cargo.toml --all-targets -- -D warnings
70+
run: cargo clippy --manifest-path=druid-derive/Cargo.toml --locked --all-targets -- -D warnings
7171
# there's no platform specific code here so we only run once
7272
if: contains(matrix.os, 'mac')
7373

7474
- name: cargo clippy book examples
75-
run: cargo clippy --manifest-path=docs/book_examples/Cargo.toml --all-targets -- -D warnings
75+
run: cargo clippy --manifest-path=docs/book_examples/Cargo.toml --locked --all-targets -- -D warnings
7676
if: contains(matrix.os, 'mac')
7777

7878
# Test packages in deeper-to-higher dependency order
7979
- name: cargo test druid-shell
80-
run: cargo test --manifest-path=druid-shell/Cargo.toml --no-default-features --features=x11,image,raw-win-handle
80+
run: cargo test --manifest-path=druid-shell/Cargo.toml --locked --no-default-features --features=x11,image,raw-win-handle
8181

8282
# We use --all-targets to skip doc tests; we run them in a parallel task
8383
# there are no gtk-specific doctests in the main druid crate anyway
8484
- name: cargo test druid
85-
run: cargo test --manifest-path=druid/Cargo.toml --all-targets --no-default-features --features=svg,image,im,x11
85+
run: cargo test --manifest-path=druid/Cargo.toml --locked --all-targets --no-default-features --features=svg,image,im,x11
8686

8787
- name: cargo test druid-derive
88-
run: cargo test --manifest-path=druid-derive/Cargo.toml
88+
run: cargo test --manifest-path=druid-derive/Cargo.toml --locked
8989
if: contains(matrix.os, 'mac')
9090

9191
- name: cargo test book examples
92-
run: cargo test --manifest-path=docs/book_examples/Cargo.toml
92+
run: cargo test --manifest-path=docs/book_examples/Cargo.toml --locked
9393
if: contains(matrix.os, 'mac')
9494

9595
# we test the wayland backend as a separate job
@@ -114,15 +114,15 @@ jobs:
114114
uses: Swatinem/rust-cache@v2
115115

116116
- name: cargo clippy druid-shell
117-
run: cargo clippy --manifest-path=druid-shell/Cargo.toml --all-targets --no-default-features --features=wayland,image,raw-win-handle -- -D warnings
117+
run: cargo clippy --manifest-path=druid-shell/Cargo.toml --locked --all-targets --no-default-features --features=wayland,image,raw-win-handle -- -D warnings
118118

119119
- name: cargo test druid-shell
120-
run: cargo test --manifest-path=druid-shell/Cargo.toml --no-default-features --features=wayland,image,raw-win-handle
120+
run: cargo test --manifest-path=druid-shell/Cargo.toml --locked --no-default-features --features=wayland,image,raw-win-handle
121121

122122
# We use --all-targets to skip doc tests; there are no wayland-specific
123123
# doctests in the main druid crate anyway
124124
- name: cargo test druid
125-
run: cargo test --manifest-path=druid/Cargo.toml --all-targets --no-default-features --features=wayland,svg,image,im,raw-win-handle
125+
run: cargo test --manifest-path=druid/Cargo.toml --locked --all-targets --no-default-features --features=wayland,svg,image,im,raw-win-handle
126126

127127
# we test the gtk backend as a separate job because gtk install takes
128128
# a long time.
@@ -147,15 +147,15 @@ jobs:
147147
uses: Swatinem/rust-cache@v2
148148

149149
- name: cargo clippy druid-shell
150-
run: cargo clippy --manifest-path=druid-shell/Cargo.toml --all-targets --features=image,raw-win-handle -- -D warnings
150+
run: cargo clippy --manifest-path=druid-shell/Cargo.toml --locked --all-targets --features=image,raw-win-handle -- -D warnings
151151

152152
- name: cargo test druid-shell
153-
run: cargo test --manifest-path=druid-shell/Cargo.toml --features=image,raw-win-handle
153+
run: cargo test --manifest-path=druid-shell/Cargo.toml --locked --features=image,raw-win-handle
154154

155155
# We use --all-targets to skip doc tests; there are no gtk-specific
156156
# doctests in the main druid crate anyway
157157
- name: cargo test druid
158-
run: cargo test --manifest-path=druid/Cargo.toml --all-targets --features=svg,image,im,raw-win-handle
158+
run: cargo test --manifest-path=druid/Cargo.toml --locked --all-targets --features=svg,image,im,raw-win-handle
159159

160160
test-stable-wasm:
161161
runs-on: macOS-latest
@@ -179,21 +179,21 @@ jobs:
179179
uses: Swatinem/rust-cache@v2
180180

181181
- name: cargo clippy druid-shell (wasm)
182-
run: cargo clippy --manifest-path=druid-shell/Cargo.toml --all-targets --target wasm32-unknown-unknown -- -D warnings
182+
run: cargo clippy --manifest-path=druid-shell/Cargo.toml --locked --all-targets --target wasm32-unknown-unknown -- -D warnings
183183

184184
# Test wasm32 relevant packages in deeper-to-higher dependency order
185185
# TODO: Find a way to make tests work. Until then the tests are merely compiled.
186186
- name: cargo test compile druid-shell
187-
run: cargo test --manifest-path=druid-shell/Cargo.toml --features=image --no-run --target wasm32-unknown-unknown
187+
run: cargo test --manifest-path=druid-shell/Cargo.toml --locked --features=image --no-run --target wasm32-unknown-unknown
188188

189189
# We use --all-targets to skip doc tests; there are no wasm-specific
190190
# doctests in the main druid crate anyway
191191
- name: cargo test compile druid
192192
# TODO: Add svg feature when it's no longer broken with wasm
193-
run: cargo test --manifest-path=druid/Cargo.toml --all-targets --features=image,im --no-run --target wasm32-unknown-unknown
193+
run: cargo test --manifest-path=druid/Cargo.toml --locked --all-targets --features=image,im --no-run --target wasm32-unknown-unknown
194194

195195
- name: cargo test compile book examples
196-
run: cargo test --manifest-path=docs/book_examples/Cargo.toml --no-run --target wasm32-unknown-unknown
196+
run: cargo test --manifest-path=docs/book_examples/Cargo.toml --locked --no-run --target wasm32-unknown-unknown
197197

198198
## build the special druid-web-examples package.
199199
- name: wasm-pack build examples
@@ -219,7 +219,7 @@ jobs:
219219
uses: Swatinem/rust-cache@v2
220220

221221
- name: cargo test druid --doc
222-
run: cargo test --manifest-path=druid/Cargo.toml --doc --no-default-features --features=svg,image,im,raw-win-handle
222+
run: cargo test --manifest-path=druid/Cargo.toml --locked --doc --no-default-features --features=svg,image,im,raw-win-handle
223223

224224
check-docs:
225225
name: Docs
@@ -244,25 +244,25 @@ jobs:
244244

245245
# Doc packages in deeper-to-higher dependency order
246246
- name: cargo doc druid-shell
247-
run: cargo doc --manifest-path=druid-shell/Cargo.toml --features=image,raw-win-handle --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
247+
run: cargo doc --manifest-path=druid-shell/Cargo.toml --locked --features=image,raw-win-handle --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
248248

249249
- name: cargo doc druid
250-
run: cargo doc --manifest-path=druid/Cargo.toml --features=svg,image,im,raw-win-handle --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
250+
run: cargo doc --manifest-path=druid/Cargo.toml --locked --features=svg,image,im,raw-win-handle --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
251251

252252
- name: cargo doc druid-derive
253-
run: cargo doc --manifest-path=druid-derive/Cargo.toml --no-deps --document-private-items
253+
run: cargo doc --manifest-path=druid-derive/Cargo.toml --locked --no-deps --document-private-items
254254

255255
- name: cargo doc book examples
256-
run: cargo doc --manifest-path=docs/book_examples/Cargo.toml --no-deps --document-private-items
256+
run: cargo doc --manifest-path=docs/book_examples/Cargo.toml --locked --no-deps --document-private-items
257257

258258
# On Linux also attempt docs for X11.
259259
- name: cargo doc druid-shell (X11)
260-
run: cargo doc --manifest-path=druid-shell/Cargo.toml --no-default-features --features=x11,image,raw-win-handle --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
260+
run: cargo doc --manifest-path=druid-shell/Cargo.toml --locked --no-default-features --features=x11,image,raw-win-handle --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
261261
if: contains(matrix.os, 'ubuntu')
262262

263263
# On Linux also attempt docs for Wayland.
264264
- name: cargo doc druid-shell (Wayland)
265-
run: cargo doc --manifest-path=druid-shell/Cargo.toml --no-default-features --features=wayland,image,raw-win-handle --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
265+
run: cargo doc --manifest-path=druid-shell/Cargo.toml --locked --no-default-features --features=wayland,image,raw-win-handle --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
266266
if: contains(matrix.os, 'ubuntu')
267267

268268
mdbook-build:
@@ -281,7 +281,7 @@ jobs:
281281
uses: Swatinem/rust-cache@v2
282282

283283
- name: install mdbook
284-
run: cargo install --vers "^0.4" mdbook
284+
run: cargo install --vers "=0.4.52" mdbook
285285

286286
- name: mdbook build
287287
run: mdbook build

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Rust
22
target/
3-
Cargo.lock
43

54
## Intellij Idea
65
.idea/

0 commit comments

Comments
 (0)