|
17 | 17 | # specific language governing permissions and limitations |
18 | 18 | # under the License. |
19 | 19 |
|
20 | | -# Checks for circular dependencies between DataFusion crates with |
21 | | -# `dev/depcheck`, the same way the "Circular Dependency Check" job does. |
| 20 | +# Checks for circular dependencies between DataFusion crates, the same way the |
| 21 | +# "Circular Dependency Check" job does. |
| 22 | +# |
| 23 | +# A cycle prevents publishing the crates to crates.io. A crate can be |
| 24 | +# published only after every DataFusion crate it depends on, including through |
| 25 | +# dev-dependencies, optional dependencies, and dependencies for other targets, |
| 26 | +# so no crate in a cycle can be published first. Cargo refuses to build a |
| 27 | +# cycle of normal dependencies, but it allows one that passes through a |
| 28 | +# dev-dependency, because a dev-dependency is built only for the crate's own |
| 29 | +# tests, examples, and benchmarks. Such a cycle builds and passes tests, and |
| 30 | +# fails only at release time. |
| 31 | +# |
| 32 | +# The check is a publishing dry run. `cargo publish --workspace` packages every |
| 33 | +# crate that does not set `publish = false`, in an order where each crate comes |
| 34 | +# after the DataFusion crates it depends on, and fails if there is no such |
| 35 | +# order. `--dry-run` stops before uploading, and `--no-verify` skips building |
| 36 | +# the packages. The dry run also fails on any other problem that would stop the |
| 37 | +# crates from being published, such as a dependency without a version. |
| 38 | +# `--allow-dirty` lets the check run on a working tree with uncommitted |
| 39 | +# changes. |
22 | 40 |
|
23 | 41 | set -euo pipefail |
24 | 42 |
|
25 | 43 | SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")" |
26 | 44 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
27 | 45 | ROOT_DIR="$(cd "${SCRIPT_DIR}/../.." && pwd)" |
28 | 46 |
|
29 | | -# depcheck is outside the root workspace and finds the root manifest from its |
30 | | -# own directory, so run Cargo from there. |
31 | | -cd "${ROOT_DIR}/dev/depcheck" |
| 47 | +cd "${ROOT_DIR}" |
32 | 48 |
|
33 | | -echo "[${SCRIPT_NAME}] \`cargo run --locked\` in dev/depcheck" |
34 | | -cargo run --locked |
| 49 | +echo "[${SCRIPT_NAME}] \`cargo publish --workspace --dry-run --no-verify --allow-dirty\`" |
| 50 | +cargo publish --workspace --dry-run --no-verify --allow-dirty |
0 commit comments