|
1 | 1 | # How to contribute |
2 | 2 |
|
3 | 3 | **IMPORTANT:** The Druid project is being discontinued. While we will still accept |
4 | | -all contributions, we'll prefer bugfixes and documentations improvements to new |
| 4 | +all contributions, we'll prefer bug fixes and documentation improvements to new |
5 | 5 | features. |
6 | 6 |
|
7 | 7 | If you still want to contribute, here are the guidelines you need to follow. |
|
38 | 38 | echo "cargo fmt" |
39 | 39 | cargo fmt --all -- --check |
40 | 40 | echo "cargo clippy druid-shell" |
41 | | -cargo clippy --manifest-path=druid-shell/Cargo.toml --all-targets -- -D warnings |
| 41 | +cargo clippy --manifest-path=druid-shell/Cargo.toml --all-targets --features=raw-win-handle -- -D warnings |
42 | 42 | echo "cargo clippy druid" |
43 | | -cargo clippy --manifest-path=druid/Cargo.toml --all-targets --features=svg,image,im -- -D warnings |
| 43 | +cargo clippy --manifest-path=druid/Cargo.toml --all-targets --features=svg,image,im,raw-win-handle -- -D warnings |
44 | 44 | echo "cargo clippy druid (wasm)" |
45 | 45 | cargo clippy --manifest-path=druid/Cargo.toml --all-targets --features=image,im --target wasm32-unknown-unknown -- -D warnings |
46 | 46 | echo "cargo clippy druid-derive" |
@@ -126,42 +126,35 @@ old versions of our sub-dependencies and so we shouldn't claim that the old vers |
126 | 126 |
|
127 | 127 | #### Prerequisites for updating the dependency specifications |
128 | 128 |
|
129 | | -An easy way to do this is to use the `cargo upgrade` tool available via [cargo-edit]. |
| 129 | +An easy way to do this is to use the `cargo upgrade` tool available via [`cargo-edit`]. |
130 | 130 |
|
131 | 131 | ```sh |
132 | 132 | cargo install cargo-edit |
133 | 133 | ``` |
134 | 134 |
|
135 | | -#### Performing the update |
| 135 | +*Note that the following instructions were written for `cargo-edit` v0.11. If you have a newer |
| 136 | +major version there may have been changes to the way `cargo-edit` works.* |
136 | 137 |
|
137 | | -All of the following commands must be run from the root workspace. |
| 138 | +#### Performing the update |
138 | 139 |
|
139 | | -First we want to update our `Cargo.lock` file to contain the newest versions |
140 | | -which are still [semver] compatible with what we have specified in our `Cargo.toml` files. |
| 140 | +We want to update our `Cargo.toml` files to specify the newest versions which are still |
| 141 | +[semver] compatible with what we have previously specified in our `Cargo.toml` files. |
141 | 142 |
|
142 | 143 | If you just want to see what would happen you can add the `--dry-run` option. |
143 | 144 |
|
144 | 145 | ```sh |
145 | | -cargo update |
| 146 | +cargo upgrade |
146 | 147 | ``` |
147 | 148 |
|
148 | | -Next we'll update all the versions in the `Cargo.toml` files to match the versions |
149 | | -specified in `Cargo.lock`. We'll do this using the `--to-lockfile` option of `cargo upgrade`. |
150 | | -It's crucial that we use `--to-lockfile` because without it `cargo upgrade` won't respect semver. |
151 | | - |
152 | | -If you just want to see what would happen you can add the `--dry-run` option. |
153 | | - |
154 | | -```sh |
155 | | -cargo upgrade --workspace --to-lockfile |
156 | | -``` |
| 149 | +Running this command will update all the `Cargo.toml` files in the workspace and also `Cargo.lock`. |
157 | 150 |
|
158 | 151 | #### Semver incompatible updates |
159 | 152 |
|
160 | 153 | Incompatible version updates should be done manually after carefully reviewing the changes. |
161 | 154 | However you can still use the `cargo upgrade` tool to find out which dependencies could be updated. |
162 | 155 |
|
163 | 156 | ```sh |
164 | | -cargo upgrade --workspace --dry-run |
| 157 | +cargo upgrade -i --dry-run |
165 | 158 | ``` |
166 | 159 |
|
167 | 160 | Then based on the reported potential updates you should manually go and check out what has changed, |
@@ -201,6 +194,6 @@ Finally, we [create a new Github release](https://docs.github.com/en/github/admi |
201 | 194 | [GitHub Help]: https://help.github.com/articles/about-pull-requests/ |
202 | 195 | [AUTHORS]: AUTHORS |
203 | 196 | [changelog]: CHANGELOG.md |
204 | | -[cargo-edit]: https://github.com/killercup/cargo-edit |
| 197 | +[`cargo-edit`]: https://crates.io/crates/cargo-edit |
205 | 198 | [semver]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html |
206 | 199 | [git `pre-push` hook]: https://githooks.com |
0 commit comments